Day of Defeat

Day of Defeat

Not enough ratings
[MAPPING] Giving models shadows
By LiveWire
Model`s in half-life don`t cast shadows or block light, this guide shows you how to create fake shadows.
   
Award
Favorite
Favorited
Unfavorite
How to
Here is the effect in game, as you can see the left tree seems to float and looks very unrealistic, the fake shadow on the tree to the right grounds it so it looks much better.



For this to work you will need to use Vluzacn`s compile tools, don`t worry you can have these installed as well as other compilers. Just create a new game configration for it in hammer and when you load up hammer it will ask you which one to use.

http://forums.svencoop.com/showthread.php/38059-ARCHIVE-Custom-ZHLT-by-vluzacn

First make a flat null textured box about the size of the tree.

Texture the side that faces the light as {SHRUB1A and in face properties use fit to fill the whole face. (you can use any transparent texure that begins with { )



Now make the brush a func_illusionary with these settings

Render Fx = normal
Render mode = soild
Fx amount = 0
Light flags = Opaque (Blocks Light)

Add a wood brush for clipping, make this a func_wall but use the same settings as above.




add your model and then set your light_environment as below pic, you will need to play around with the yaw to get the light in the correct direction.



Thats it just compile, download a sample here

http://forum.17buddies.net/index.php?act=attach&type=post&id=2364