Alpha materials on DIF
by Mark Pilkington · in Game Design and Creative Issues · 11/15/2008 (5:10 pm) · 2 replies
I've knocked up a test cube with a wirefence texture inside Constructor, When I set up the shader and drop it into a level it appears to draw over everything except for the blue sky cube.
Here is my shader parameters:
-----------------------------------------
new Material(wire_fence2)
{
mapTo = "wire_fence2_d";
basetex[0] = "wire_fence2_d";
bumptex[0] = "wire_fence2_local";
translucent = true;
translucentBlendOp = LerpAlpha;
translucentZWrite = true;
alphaRef = 10;
pixelSpecular[0] = true;
specular[0] = "1.0 1.0 1.0 1.0";
specularPower[0] = 32.0;
};
------------------------------------------
I haven't tried the texture on a DTS shape yet and I have read somewhere that alpha materials don't work on DIF objects. The material is working....just very bizarrely.
Any help would be much appreciated, I have searched the demo projects for examples and clues but I've not been succesful.
Here is my shader parameters:
-----------------------------------------
new Material(wire_fence2)
{
mapTo = "wire_fence2_d";
basetex[0] = "wire_fence2_d";
bumptex[0] = "wire_fence2_local";
translucent = true;
translucentBlendOp = LerpAlpha;
translucentZWrite = true;
alphaRef = 10;
pixelSpecular[0] = true;
specular[0] = "1.0 1.0 1.0 1.0";
specularPower[0] = 32.0;
};
------------------------------------------
I haven't tried the texture on a DTS shape yet and I have read somewhere that alpha materials don't work on DIF objects. The material is working....just very bizarrely.
Any help would be much appreciated, I have searched the demo projects for examples and clues but I've not been succesful.
About the author
#2
11/15/2008 (5:52 pm)
Right oh, thanks for confirming that Surge, applying the textures straight onto a DIF object would have been quicker but I can export out DTS objects for what I need.
Torque Owner Surge
MDNAMEDIA
And so far ive never been able to get Alpha Transparencey to work on DIF.
DTS Shapes no Problems.
My solution is to try it out on a DTS.
And it might be that youll have to mix a DIF and DTS together to get what you want.
That being said,on a DIF I can get an alpha glow mask to work on a second pass;)
Click here to see the actual docs on the subject!