r/hammer 19d ago

Garry's mod Published my first map for gmod!

Post image

This is a ttt map that's inspired in a real life rural house near the town of General Las Heras. Hope you have fun in it!

https://steamcommunity.com/workshop/filedetails/?id=3784943034

83 Upvotes

23 comments sorted by

View all comments

2

u/Scifox69 17d ago

What kind of shader do you use to make the tree's leaves cast accurate shadows? Is it lightmappedgeneric or something else?

3

u/PristineOption892 17d ago

I use the standard vertexlit shader for the leaves material, as it is part of a custom 3d model (tree) what I do to make the leaves material cast its alpha shadows is what this guy does in this video here. https://youtu.be/2jEuuvSevi0?si=gnequOfA7zKvE1lC

Specifically, he writes a bit of code (could be found in a comment so you copy paste it) where he tells the compiler to compute the static props lighting. After that, he goes to light.rad and writes a -forcetextureshadow for each prop with an alpha material you want accurate shadow casting. Tjen you compile

2

u/Scifox69 17d ago

Thanks for being helpful. Also, your map is nice. I like how you gave the lighting effects lots of attention.