Game Development Community

Two sided alpha transparency materials - LOGGED

by Tod · in Torque 3D Professional · 06/21/2010 (6:10 am) · 3 replies

I've been having a bit of an issue with materials marked as two sided that have transparency. I believe years ago, TGE didn't support this (maybe I am wrong, its been a while). I've since tried getting it to work properly in T3D 1.1 beta. Still no luck. I recorded a video in T3D of that I am seeing and the affect I am trying to achieve.. Just much easier to explain that way :-)

Transparency Example

The effect I'd like to achieve is a semi transparency around the bottom of the hair line. In the video, I only did a broad brush stroke to remove 50% of the alpha just for an example. This can work great, but only if two sided textures are turned off. Clearly something goes haywire with the normals if two sided is on.

I would guess that one solution would be to add a second hair mesh inside the first with the normals flipped, but that seems more like a kludge than a real fix.

Any help?

Thanks

Tod

#1
06/21/2010 (9:08 am)
Quote:I would guess that one solution would be to add a second hair mesh inside the first with the normals flipped, but that seems more like a kludge than a real fix.
That's the standard way of doing it, IMO. "Double sided" materials just disable backface culling, but the backside will be lit wrong because it's normals point away from the screen. You need double the polygons to have different normals for each side.
#2
06/21/2010 (10:43 am)
There's some cool code if you do a search for "interlaced normals". This will only work under advanced lighting.
#3
06/21/2010 (2:57 pm)
Thanks :-) I'll check that out