CSM - Dynamic shadows for turrets and gun barrels

Lots of cool and useful tips to mod either serverside or clientside
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: CSM - Dynamic shadows for turrets and gun barrels

Post by fo0k »

yeah dynamic would be awesome on objects.. but thats old and sad news :(

any way of doing it with patch terrain? make an object appear to be patch terrain and get shadows on it?
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: CSM - Dynamic shadows for turrets and gun barrels

Post by Senshi »

Yes but the shadow-topic was discussed multiple times as there seem to be some loose ends in the code that allow for manipulation, but all attempts failed utterly. We dragged this through quite some pages on ssm.com some months ago. Stuff is hardcoded.

Another interesting bit of information fo0k found out some weeks ago: Shadow quality differs according to object type. Everything in BF has "bad" resolution (vehicles, weapons, soldiers), but projectiles have kickass-HD-shadows. He noticed that on a thrown grenade. It's easy to verify, because the ExpPack and the landmine have HD shadows too once they are thrown (though their shadow is hardly visible as they are lying directly on the ground ;) . So if anyone has an idea how to sticky projectiles to PCOs we could have HD vehicle shadows using Apache's "attach"-method...but AFAIK there is no way to do that, as "isSticky" doesn't work anymore.
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: CSM - Dynamic shadows for turrets and gun barrels

Post by Apache Thunder »

isSticky actually does work...just not on projectiles that have network info. I found that out when doing the sticky TNT in the BFHeroes mod. it seems quite stable once you take the network info off the projectile that's using it.
ImageImageImage
I have cameras in your head!
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: CSM - Dynamic shadows for turrets and gun barrels

Post by Senshi »

Then the problem remains that we'd need to spawn a projectile :/ Any ideas for a workaround on that?
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: CSM - Dynamic shadows for turrets and gun barrels

Post by fo0k »

how about using ObjectTemplate.visibleDummyProjectileTemplate

im not so familiar with weapons but could that show the shadow of the projectile when on the vehicle..?
User avatar
Senshi
Posts: 697
Joined: Sun Oct 18, 2009 1:14 pm
Location: Germany
Contact:

Re: CSM - Dynamic shadows for turrets and gun barrels

Post by Senshi »

Yes, that would work, but isn't the problem ;) . The problem is AFAIK that if you addTemplate projectiles -> CTD. Same goes for "spawning" projectiles.
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: CSM - Dynamic shadows for turrets and gun barrels

Post by fo0k »

but we just want a projectile object attached to a 'car' for example so that the hd shadow is displayed.. basically we attach an invisible 'projectile' object but one which has the shadow mesh of the car instead.. the car has no shadow mesh as such. if we can add dummy projectiles they could possible show the shadow mesh? they are part of the projectile template.. :/

I guess my short point is that if you can addtemplate a dummy projectile cant that be enough to get the shadow?
User avatar
Apache Thunder
Posts: 1210
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: CSM - Dynamic shadows for turrets and gun barrels

Post by Apache Thunder »

Yes I recall trying that. However nothing happened. :(

I don't recall getting a CTD. Perhaps you tried adding a projectile that has point physics turned on? (if it is left undefined on projectiles, default is on).

Adding point physics to something like a jeep for example will cause a CTD. The same holds true if you put a projectile with point physics onto a vehicle that shouldn't have point physics. I don't really know what Point physics is for, but it causes CTDs for things that shouldn't have it.

Nonetheless I already tried addTemplating a projectile to a vehicle....didn't have any effect. :(
ImageImageImage
I have cameras in your head!
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Re: CSM - Dynamic shadows for turrets and gun barrels

Post by freddy »

how would it look like if you make a object have two shadows?
User avatar
fo0k
Posts: 1433
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: CSM - Dynamic shadows for turrets and gun barrels

Post by fo0k »

can we make a dll to do all this shit ? :)

ful self shadowing objects.. heheh

im no pro but i have started the code.. can anyone finish it and compile to a dll?

Code: Select all

if_$something=closetosomethingelse_then[shadowtheshit]now_$%
Post Reply