Page 3 of 4

Re: CSM - Dynamic shadows for turrets and gun barrels

Posted: Tue Jan 05, 2010 1:33 am
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?

Re: CSM - Dynamic shadows for turrets and gun barrels

Posted: Tue Jan 05, 2010 12:19 pm
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.

Re: CSM - Dynamic shadows for turrets and gun barrels

Posted: Tue Jan 05, 2010 7:33 pm
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.

Re: CSM - Dynamic shadows for turrets and gun barrels

Posted: Wed Jan 06, 2010 1:26 pm
by Senshi
Then the problem remains that we'd need to spawn a projectile :/ Any ideas for a workaround on that?

Re: CSM - Dynamic shadows for turrets and gun barrels

Posted: Wed Jan 06, 2010 3:30 pm
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..?

Re: CSM - Dynamic shadows for turrets and gun barrels

Posted: Wed Jan 06, 2010 6:45 pm
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.

Re: CSM - Dynamic shadows for turrets and gun barrels

Posted: Wed Jan 06, 2010 7:37 pm
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?

Re: CSM - Dynamic shadows for turrets and gun barrels

Posted: Wed Jan 06, 2010 8:35 pm
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. :(

Re: CSM - Dynamic shadows for turrets and gun barrels

Posted: Wed Jan 06, 2010 10:11 pm
by freddy
how would it look like if you make a object have two shadows?

Re: CSM - Dynamic shadows for turrets and gun barrels

Posted: Wed Jan 06, 2010 11:36 pm
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_$%