Transparent Texture Shadow

Hello,

I’m struggling with Transparent Texture Shadow with the Black Mesa Retail version.

I’d like to achieve this effect with a fence:

(Image extracted from the following Interlopers tutorial: https://www.interlopers.net/tutorials/27738)

But it’s simply not working.
Result I have:

I’m using the ‘models/props_wasteland/interior_fence002c.mdl’ model as a prop_static with the property of 'Generate (and use) lightmap for this static set as ‘Yes’. Lightmap resolution of X and Y set to 2.

Compilation done with:
-final -StaticPropPolys -StaticPropLighting -TextureShadows -hdr

The lights.rad file contains two lines for this model:
forcetextureshadow props_wasteland/interior_fence002c.mdl
forcetextureshadow models/props_wasteland/interior_fence002c.mdl (I added this line with models/ at start)

I’m missing something?

Cheers

I don’t think it would prevent the shadows from compiling directly, but I beleive the “generate and use lightmaps for this static prop” option is for generating lightmaps on the model, not from it, which makes the shadows on the mesh more defined than the default vertex lighting. Which is somewhat unneeded for something with that much alpha in its material.

Also shouldn’t prevent the shadows from compiling properly, but the extra line with the models/ won’t work, as it would make the compiler check for “models/models/props_wasteland/interior_frence002c.mdl”. (Unless something has changed with the tools recently)

A few issues here. The lightmap setting shouldn’t be set within the fence model. Turn that off. As Jeff said, that controls lightmaps cast ONTO the prop, which only works under very specific circumstances (the prop has to have unique UVs), and is not needed for this type of prop anyway. Additionally, prop lightmaps are the inverse of regular lightmaps - regular lightmaps are measured in units per luxel (so lower values = higher resolution), whereas prop lightmaps are measured in texture resolution of the lightmap (so higher values = higher resolution). A lightmap value of 2 on a prop would achieve nothing - a 2 pixel lightmap doesn’t really accomplish anything! It has to be 512 or above to have any kind of noticeable effect.

That tangent aside, this is likely happening because you haven’t set the lightmap scale on the wall which is RECEIVING the shadow correctly. Select the wall / floor parts which are supposed to be receiving the shadow, go to the texture edit dialog and set the lightmap resolution on those faces to 2. It should now work, given you’re using the -textureshadows VRAD command line switch.

Hope this helps!

Thanks for the clarifications on the lightmap setting within a prop_static.
I never noticed it was possible to cast soft shadows on props.

I removed this extra line which was a desperate attempt to make it work

The wall receiving the shadow is already set with a lightmap grid of 2 / 4 so it’s weird.

Another strange example:

In this screenshot the railing is a func_detail with a texture alpha. I blocked out the whole railing with blocklight texture tool.
After a compilation with -hdr option:

After a compilation with -both -final -StaticPropPolys -StaticPropLighting -TextureShadows :

I’m expecting a weird compilation of the tool I’m using. The compilation is done with the excellent ‘Hazard Team Compile Tool’ Version 0.5.0 BETA.
I’ll try to make the compilation from Hammer but I need to configure everything first.

Which HTCT compile preset are you using?

I’m using HC final and changed the -both for -hdr because I don’t need -ldr

Founded in 2004, Leakfree.org became one of the first online communities dedicated to Valve’s Source engine development. It is more famously known for the formation of Black Mesa: Source under the 'Leakfree Modification Team' handle in September 2004.