Game Development Community

Texturing Backfaces on Objects with Translusents

by David Mac · in Torque Game Engine · 06/27/2004 (2:38 pm) · 8 replies

I've spent about 2 hours pouring through the forums now, picked up some good tips, but still nothing concrete.

I'm new to Torque, and I'm attempting to import Milkshape static objects (specifically trees) into the engine.

The trees look as they are supposed to in Milkshape (I.E. using alpha masked png textures to make leaves on a basically flat 3d mesh). When I import them into the engine, the backfaces become invisible.

I've tried duplicating the mesh, reversing the faces and welding the vertices back together, but I end up with a translucent backface with no image and the image on the same translucent feild on the front side.

And I really don't want to double the polygon count by creating a whole new set of meshes to compensate for the backfaces.

The stock trees look like they use an alpha masked transparency png over a flat surface. I've loaded them up into both Photoshop and Milkshape and can't decern that they are in any way different from my own textures, so.... What am I doing wrong? :/

Can anyone shed some light on this?

#1
06/27/2004 (3:34 pm)
The polygon count will be doubled anyway, you can do it manually, or let the exporter do it for you.
#2
06/27/2004 (8:17 pm)
That's unfortunate, I was rather pleased with the look I was getting with only a couple hundred polygons :/

But if that's the way it is... Then I guess I'll have to deal with it.

But even considering that, I'm not seeing anything obvieous in the stock exporter that would seem to toggle backfacing in any way. Of the 6 options there, none seem to be directly related.

I see the DTS Plus Milkshape exporter has some options for sorting and Billboarding. but I've only recently set it up. I'll experiment with those and see if I can't get some better results.

Thanx...
#3
06/28/2004 (6:00 am)
I dont know about Milkshape, but in max there is an option to make a material 2-sided. The problem is that double sided polys are not lit correctly in the engine (they only get ambient light, no direct).

The best solution is to copy the polys and reverse them, but dont weld the vertices together.
#4
06/28/2004 (6:19 am)
I was talking about the max exporter, I don't know about milkshape. For the max exporter you just have to use double sided materials, the exporter makes the extra polygons then... so there's no such thing as a "double sided poly"
I'm sure you can do it with the milkshape exporter too, and if not, then you'll just have to do it manually. So, indeed, creating the polys manually and don't weld them.
#5
06/28/2004 (7:10 am)
Hehe, well, maybe one of these days I'll be rich enough to afford a licensed copy of 3dmax, until then - It's Milkshape.

I really appreciate the help & advice guys, (I can use all the help and advice I can get!) but Max isn't in the picture here ;]

I am simply trying to get stuff imported into the game looking at least similar to the way it looked when I created it in Milkshape. I'll keep at it, I'm sure I'll figure something out.
#6
06/29/2004 (9:09 pm)
Ok... For the bennifit of any other noobs having this problem, I've come up with a kind-of work around.

When I duplicate the front face and mirror it in Milkshape, the back face disappears completely when exported to DTS. This occurs whether or not I wield the vertices, or whether or not I offset the depth/distance to/from the front mesh object.

What I WAS able to do, is hand draw a new identical face, not connected, and slightly offset depth wise.

The in-Torque result was the front face being correct, and the back-face loosing color range and darkening, but visible and with all the transparent parts transparent on both sides.

I'll try for a screenshot here:

purgatory7.bravehost.com/InconsistantTextures1.jpg
This was done using the milkshape DTS Exporter Plus.

There has got to be a better way though. Animating hair textures for instance, in Milkshape using this technique is going to be a nightmare. :/

Still hoping some all-knowing Milkshape-to-Torque Guru has a quick fix and is willing to share ;]
#7
06/30/2004 (2:58 am)
I dont know everything but for my two sided planes I made a duplicate shape then mirror it in opposite direction, (edit, i use this for shapes inside of shapes..)then I reversed the vertex order. then I had a 2 sided object.. :)
there is probably a better way but thats what I am doing..
#8
06/30/2004 (10:03 am)
Yeah, that's kinda what I did here. But for some reason the duplicate didn't work for me :/

Maybe it's in the way I'm exporting it?