FlashLight

M

madmad

Guest
hello, is it possible to code the flashlight and make it cast shadow like doom 3??
 
I dont think you want to sit and code dynamic shadowing...
 
It would be somewhat possible, but does require coding i think.
Cause the only thing that can cast dynamic shadows in HL2 is the Sun.

So you could code the sun to be on your rifle/flashlight whenever you turn it on. Not sure what would happen with the map's sun though. Maybe you could make 2 suns, but what would happen with most shadows then ?
Also the flashlight shape and "dust" would still have to be there since otherwise no notable visible flashlight would be seen.
But superimposing the old, standard flashlight and the sun's shadow casting should give some pretty cool effect.

To have even more dramatic shadows you'd have to put the sun somewhat ahead of your gun, that way shadows casted will be larger from your own point of view.

Just doing some dreaming here, as afterall I'm not sure wheter the sun could be twice in a stage. You'd have to take special care in multiplayer sessions, where you should only duplicate your own sun/flashlight combo cause if you do other players as well, they will disturb and most probably overlight the entire stage. Not to mention the huge impact on the CPU all that dynamic shadow casting would make.
 
Back
Top