Having trouble getting transparency working properly
by Bryce · in Torque Game Engine · 12/24/2009 (3:06 pm) · 6 replies
Hello everyone,
I've created a nice looking ghillie suit sniper model in milkshape by adding cylinder shapes over the limbs and applying a "leaf" texture with an alpha channel. This is what I've got working in Milkshape:

It displays properly there. However, when I exported it, it looks like this in-game:

It doesn't correctly render the leaf texture in front, however, it renders it around the back edges...I'm not sure what's causing this, I also tried reversing the vertex order in Milkshape, but that didn't help.
Here's a link to the file, would somebody be willing to take a look?
www.mediafire.com/?zuolcmmx4mx
Thanks,
Bryce
I've created a nice looking ghillie suit sniper model in milkshape by adding cylinder shapes over the limbs and applying a "leaf" texture with an alpha channel. This is what I've got working in Milkshape:

It displays properly there. However, when I exported it, it looks like this in-game:

It doesn't correctly render the leaf texture in front, however, it renders it around the back edges...I'm not sure what's causing this, I also tried reversing the vertex order in Milkshape, but that didn't help.
Here's a link to the file, would somebody be willing to take a look?
www.mediafire.com/?zuolcmmx4mx
Thanks,
Bryce
#2

That's the texture I use. I can't tell if this is an engine issue or something wrong with the way PNGs are exported from GIMP...
12/28/2009 (2:35 pm)
I'm using GIMP...all I did was take the default grass1 foliage texture, clone it so it fills the edges, and set the alpha threshold so it would look more like leaves and less like smudges.
That's the texture I use. I can't tell if this is an engine issue or something wrong with the way PNGs are exported from GIMP...
#3

Somehow, the leaf texture needs to be drawn over the main body shape. Depth sorting rings a bell, but if I knew how it worked I'd be a bit better off...
12/28/2009 (3:05 pm)
Ok. Based on this picture, what I've figured out is that the main body shape is being drawn over the transparent leaf texture.
Somehow, the leaf texture needs to be drawn over the main body shape. Depth sorting rings a bell, but if I knew how it worked I'd be a bit better off...
#4
Here's one of the more informative threads:
www.torquepowered.com/community/forums/viewthread/31187
12/28/2009 (3:18 pm)
Ok, I've tried searching up some threads and trying some of the my own ideas but havnt had any success either...Here's one of the more informative threads:
www.torquepowered.com/community/forums/viewthread/31187
#5
this is mostly for 3ds max, but may help.
12/28/2009 (3:18 pm)
tdn.garagegames.com/wiki/DTS/3dsmax/Z_Sorting_Explainedthis is mostly for 3ds max, but may help.
#6
12/28/2009 (3:37 pm)
This is a complex, animated shape, so sorting isn't an option...Sounds as simple as "draw the main body first, then draw the leaf shapes OVER it", but it never is. Or am I totally missing something here?
Torque Owner CSMP
MP Studios
Btw: awesome looking ghillie suit!