Game Development Community

TSE Transparent textures on Interiors

by PrvtHudson · in Torque Game Engine Advanced · 12/17/2006 (3:32 pm) · 7 replies

I created a .png with adobe ( using superping ).
I use this texture on an interior for a fence ( cube ).
The fence does not appear.
If I shoot the fence ... the texture shows up.
I am able to make .dts transparent fence but I'd like to keep it in the .map if possible.

Any idea ?

<--------------------------------------------------------------------------------------------------------------->

new Material(rg_grates_001)
{

baseTex[0] = "rg_grates_001";
translucent = true;
translucentBlendOp = LerpAlpha;
alphaTest = true; // default value
alphaRef = 1; // or 128 // alpha less than 128 in brightness (255 is max) will not be rendered

};

Here's a pic of the fence w/ test .png showing up when I fire along side it.

www.randygast.com/gg/transparency.jpg
Added Image

#1
01/04/2007 (4:03 pm)
Make sure your alpha channel isn't set such that the fence is fully transparent.
#2
01/04/2007 (8:54 pm)
Thanx Brian. I have been messing around with the pngs. Is there an example of a working transparency somewhere that I could test with?

Here's mine ... version 83 ;)

www.randygast.com/gg/link.png
#3
01/05/2007 (2:39 pm)
That texture looks alright. The fence is the wall on the right in the picture?
#4
01/05/2007 (3:49 pm)
Yes it is. That picture isn't the above texture anymore, however, after a 'few' iterations. If I set the emissive[0] = true; then the outline of non-transparent areas show up, the light, that is. not the texture itself.
#5
01/18/2007 (3:19 pm)
Another kick at the can ...

I included a tree(dts) with transparent foliage and it works. I used a www.matthewcjones.com model.
I created this material for the supplied texture.

new Material(Main_Maple) {
baseTex[0] = "Game01/data/textures/transparent/Main_Maple";
translucent = true;
translucentBlendOp = LerpAlpha;
alphaTest = true;
alphaRef = 128;
};

Then ... I tried to use the same texture in my .map and it doesn't work. Same scenario as above.

My engine is almost stock ( I have a ladder resource ). Could someone email me a working .dif and transparent texture. In TGE, I had to add a resource to create .dif transperencies. TSE DOES support .dif transperencies out of the box doesn't it ? lol
#6
01/22/2007 (3:10 pm)
Well yes and no. You can make walls translucent, but it won't guarantee that two walls that are translucent and near each other are sorted properly. I don't think this is the case that you are running into though.
#7
01/26/2007 (7:12 pm)
Here is finally worked for me. Notice the emissive = true. Also, I switched from Photoshop to PS Pro and exported my .PNGs using the export process, creating an alpha.

new Material("rg_grates_002") {
baseTex[0] = "RGGame01/data/textures/transparent/rg_grates_002";
mapTo = "rg_grates_002.png";
translucent = true;
emissive[0] = true;
translucentBlendOp = LerpAlpha;
};