Game Development Community

TranslucentZWrite issue

by Vincent BILLET · in Torque Game Engine Advanced · 05/04/2006 (9:21 am) · 23 replies

Multiple objects with TranslucentZwrite=true materials seems to disapear. I explain : I Try to put some grass objects with translucentZwrite materials. Far grass do not render. Grass in front of camera, render correctly, but where alpha = 0 in the texture, it render terrain, sky or water colors, instead of objects behind the transparent one.

Any Idea, perhaps Brian?
Page«First 1 2 Next»
#21
05/27/2006 (12:44 am)
@C2 : do you use particle Emitter?
#22
05/27/2006 (6:22 pm)
The above video is definitely not a particle emitter.. lol. It's a few translucent planes as part of the weapon .dts model. Your change was not designed to solve the alpha texture issues that developers face with muzzle flare or other semi-transparent images, only those who use the "TranslucentZWrite" for grass and such. I was just stating "for the record" so no one thinks that the other issues are solved yet. :)
#23
05/28/2006 (1:13 am)
Have you tried to replace in tsMesh.cpp @ line 966 GFX->setAlphaRef( 1 ); with :
GFX->setAlphaRef( materials->getMaterialInst(matIndex)->getMaterial()->translucentAlphaRef );

And after, setting your material with a higher translucentAlphaRef.

As I understand the problem, translucentAlphaRef is usefull to say the engine at which level of alpha a given pixel is render or not (but I'm not sure). There is many place in the TSE source code where setAlphaRef is setted to 1. The above updates works well for TSStatics. tsMesh wasn't included. So I think this might correct your issue. To make this work, you must do my previous updates. there is also some other issues with particleEmiiter, precipitation and so on. I'm looking forward to solve each of these case to win my cup of beer :p
Page«First 1 2 Next»