Game Development Community

Terrain texture with full transparency

by Lukas Joergensen · in Torque 3D Professional · 06/23/2014 (5:57 pm) · 3 replies

Hey guys, this is not gonna make a lot of sense to you, but I've encountered an issue where having around 0 in the alpha value results in the terrain texture having a blend of 0.

Do you know how the alpha channel affects the blending calculation? Perhaps with a value of 0 it's optimized away or something, somewhere? Any help is greatly appreciated!

#1
06/23/2014 (9:33 pm)
Generally 0.0 -or- 0 alpha is Transparent (Not visible) and 1.0 -or- 255 (8bit) is opaque (solid). So an alpha value of 0 means draw nothing.
#2
06/23/2014 (10:46 pm)
@Nathan well yeah, but where does it excluded? My research shows me that the textures are still rendered, the blendvalue is just calculated to 0 when alpha is close to 0.

it sort of makes sense, but it ruins some of the changes I made to the terrain blending.
#3
06/24/2014 (1:52 am)
It'd seem the issue stems from detailIdStrengthParallax being set to 0.
Does anyone have an idea of how to work around this? And does anyone know what effect it has on the blending?

Edit: Even further digging shows that the used information in detailIdStrengthParallax is equivalent to "matInfo->layerID".

So for some reason the detail material is not set when alpha = 0.