Game Development Community

3DS Max Eporter inverting normals on export

by Adam Beer · in Torque Game Engine Advanced · 07/08/2008 (1:56 pm) · 5 replies

It seems that the 3ds max exporter is exporting the normals inverted on one of my models. There is only 1 model where it is doing this and I have no idea why. I have to invert the normals each time I export out of max in order for the model to not be inside out when I load it in-game. It is a rigged mesh (has bones) so if anyone has any idea on how to make it so normals arent inverted and dont have to be inverted, please post here.

#1
07/08/2008 (6:52 pm)
Normals get flipped on export because the winding for the face normal is reversed. This is something that is pretty easy for an artist to accidentally do in any 3D application from something as simple as a mirror (which applies an inverted scale to the mesh which flips the winding).

3D apps however are smart enough to correct the display for the winding of the normal, however when you export, the exporter just reads the raw data in the scene and sees that the normal is wound reversed and as such thinks thats what you intended so it exports it that way.

The easiest way to fix it in 3DS Max is to simply add a normal modifier to your mesh and click on "unify" and possibly "flip".

Logan
#2
07/08/2008 (7:17 pm)
The only problem with doing that, is when I apply the normal modifier and select flip, the faces all go black in max and the texture goes basically inside out. But when it is exported into Torque, it works just fine (with the normals flipped). This is not an efficient way of modeling, so do you know of anything else I can do so that I dont have to apply modifier every time I want to export?
#3
07/09/2008 (8:42 am)
Don't mirror? Go into the eMesh or ePoly SO mode and flip and/or unify the faces there? Reset the models transforms (via box trick or other methods) before you skin your model to your rig to that it fixes the winding.

Plenty of ways to skin this cat (probably a few I neglected to mention), almost all of them are relatively quick and simple solutions. You just need to choose the one that works best for your situation.
#4
07/09/2008 (11:47 pm)
Hi !

I won't get in to deeper technical details why Max does this (a feature :)), but:

As a rule of thumb:

ALWAYS use Reset XForm modifier (in utilities tab, if not added already then add) before you export your model, it applies not only in Torque but with any other engine too.

Basically it is recommended to do especially after any scale,transform, rotation operations with the model.

If you have a skinned character then add the Reset XForm BEFORE you skin your character as you have to
collapse the stack after you add the Xform modifier.

And ALWAYS with mirrored meshes.

Hope that helps :)
#5
07/10/2008 (9:47 am)
Basicly this isnt a 3DS Max problem but a problem with how 3D applications do certain things in general.