Game Development Community

3dModel appears insideout

by Tim Heldna · in Torque Game Engine · 01/13/2005 (5:11 pm) · 4 replies

This is the first time this has happened and i dont know what i did different.
The model is fine in max but in torque it appears the texture is on the inside
of the model, making it appear semi transparant.
Does anyone know how to fix this problem?

#1
01/13/2005 (5:17 pm)
Sounds like your normals are facing the wrong way. Polygons are only one sided and normals point in the direction the polygon is facing. Your polys may all be facing the inside of your model. If you are looking thru the backside of a polygon it will appear invisible.
I do not have 3dsmax here at home, so i cant tell you the procedure for flipping normals, but i'm sure with a little research in your manual or on google you can find a solution.
Also, look into 'double sided' polygons using the exporter. Although this may fix your problem, you will be doubling the number of polygons in your shape and may adversely affect your framerate.
Jameson
#2
01/13/2005 (5:26 pm)
To flip your normals in 3DSMax, just add a "Normal" modifier to the mesh, and select the option to "Flip" them.
#3
01/13/2005 (5:45 pm)
Thanks for that! the modifier in max fixed the problem.
#4
01/14/2005 (9:04 am)
In case you are curious what causes this here is the answer:

Any time you use a mirror tool inside of a 3D application, what the application does is give the model an inverse scale. ie) A model will normally have a scale value of 100, 100, 100, but after a mirror this models scale value is -100, -100, 100.

The end result of this negative scale value is that normals are read incorrectly by the DTS exporter since their winding is flipped thus causing the "inside out" flipped normal view in the game engine.

How do you fix this? There are a variety of ways such as unifying the normals or performing the box trick on the mesh. AFAIK though there is no surefire way that the DTS exporter can catch this though since applications tend to not report negative scale values back properly on a query sometimes (trust me I have looked into this one while trying to update the box trick script)

Logan