Transparency - help me
by Harvey Greensall · in Torque Game Engine Advanced · 04/15/2008 (1:29 am) · 2 replies
Right, we've had transparent objects for years right?, I've been exporting .pngs with transparency for ages, and they work right? I've got transparent shaders in my material.cs right? like this...
new Material(DamnBloodyFlare1)
{
baseTex[0] = "~/data/tavern/Flare1.png";
translucent = true;
translucentBlendOp = None;
But for the life of me, I can't get this to display, I've been chasing it for about 2 hours and am about to hoof my PC out of the studio. It's the first object with transparency I've tried to get working in 1.7 by the way, but obviously it works as there are trees in there, particles etc. so obviously transparency works, what on earth could I be doing wrong? Is there a different way we need to export from photoshop or something?
I've tried exporting as 24 bit alpha, the same with an actual alpha channel, tried DDs export with explicit alpha, everything, I can get it to display if I export with no alpha at all, but as soon as I export the texture with alpha, it's completely invisible in the scene.. ...
man, can someone please shed a bit of light here, I've done this soooooo many times it's second nature, suddenly it doesn't seem to want to play ball anymore...
new Material(DamnBloodyFlare1)
{
baseTex[0] = "~/data/tavern/Flare1.png";
translucent = true;
translucentBlendOp = None;
But for the life of me, I can't get this to display, I've been chasing it for about 2 hours and am about to hoof my PC out of the studio. It's the first object with transparency I've tried to get working in 1.7 by the way, but obviously it works as there are trees in there, particles etc. so obviously transparency works, what on earth could I be doing wrong? Is there a different way we need to export from photoshop or something?
I've tried exporting as 24 bit alpha, the same with an actual alpha channel, tried DDs export with explicit alpha, everything, I can get it to display if I export with no alpha at all, but as soon as I export the texture with alpha, it's completely invisible in the scene.. ...
man, can someone please shed a bit of light here, I've done this soooooo many times it's second nature, suddenly it doesn't seem to want to play ball anymore...
#2
This is my entry in material.cs
new Material(tavern_flare)
{
baseTex[0] = "~/data/fx/flare1";
//bumpTex[0] = "";
translucent = true;
translucentBlendOp = None;
};
I'm not sure quite why it's working, but I copied the model and texture into a folder called data/fx and with just this one entry in that folders material.cs and *doink* worked straight away. Is there any info. anywhere on the differences between LerpAlpha etc. by the way,
Cheers Joseph,
H.
04/15/2008 (4:33 am)
Blimey, can you believe it's taken me 5 hours to get ONE texture working ??? aaargh!!!!!!This is my entry in material.cs
new Material(tavern_flare)
{
baseTex[0] = "~/data/fx/flare1";
//bumpTex[0] = "";
translucent = true;
translucentBlendOp = None;
};
I'm not sure quite why it's working, but I copied the model and texture into a folder called data/fx and with just this one entry in that folders material.cs and *doink* worked straight away. Is there any info. anywhere on the differences between LerpAlpha etc. by the way,
Cheers Joseph,
H.
Torque Owner Redacted