Game Development Community

Ohhh, the transparency.....

by Tod · in Torque 3D Beginner · 07/11/2010 (4:29 pm) · 2 replies

I've been fighting with alpha transparency for a while now, and have come to my wits end.

I have a single mesh with a single PNG material with an alpha channel. This works well enough for simple model meshes, but when things get more complex, the transparency seems to have a mind of its own. I've minimized everything down to a simple hair mesh (removing the inside hair mesh) and not using double sided materials.

A video shows the issue far better. I first show the mesh without transparency, then with transparency enabled. It appears there are some rendering issues when faces of the same material and mesh are behind others. The PNG used has a complete opaque alpha channel other than a few small area's.

I am using T3D 1.1 beta.

HairTransparency.wmv

Any ideas guys? Is it necessary to split the hair mesh up into smaller meshes and apply a transparent material only to the faces that absolutely must have it?

Thanks

#1
07/18/2010 (10:41 pm)
Hey Tod,

Try using Alpha Threshold. Turn off the transparency, click to turn the Alpha Threshold on, then move the slider bar up to your desired level.
#2
07/19/2010 (1:53 am)
Yea... no engine shipping today does alpha transparency within a single mesh like your expecting. It would require per-pixel sorting for that to work.

Most games either break up the mesh or use alpha test for hair.

A new technique in DX11 allows you to do per-pixel sorting...



... i don't think any games are using it yet, but it will start to appear in the next year or so. Of course that technique will require a DX11 card and Windows Vista/7.

My suggestion would be to use alpha test with a high resolution DXT compressed texture. I've seen many games have very nice looking hair using that technique.