Inside-out models from Maya

My development team has been using Maya 7 to create our models. However, when we run maya2egg7 the model appears to be inside out, i.e. the inside is drawn and the outside is invisible. This of course has been worked around by include -bf backface culling but it is not a permanent solution.

I was wondering if anyone knew of how to make Panda or the egg converter respect the image that we can see in Maya. Since we have a good deal of model work done I would not like to have to manually invert the models in Maya.

Another issue that we are having is making a world in Maya and using polygons as walls. If I apply a CollisionHandlerPusher to the wall, it pushes only in the direction of the original face. Essentially, if the wall is inverted and you walk up to it the pusher will drag the character into the wall and cannot go back through. This happens with -bf as well. Is there a way to make both sides of the wall have collisions in the same direction.

On idea I had was to invert the normals on the polygons. I don’t know how to do this in Maya since I work only with the code but was wondering if it would work and if I could either convert .egg files or invert the faces on model load.


You can enable 2-sided in Panda3D if you want.
The simplest way is just to inverse the normals in Maya - I wouldn’t know how to do that. Maybe check google.

The 2-sided rendering is the -bf flag he is talking about.

But the real problem is that your normals are inverted in Maya. This is apparently easy to do accidentally in Maya; and it is also easy to correct (though I don’t know the precise steps to do to correct it, not being a Maya user myself).

If you figure out how to invert the normals in Maya, it will solve both problems. The normals should be facing towards the front of the polygon.

Note that a CollisionPolygon is never double-sided; it always must be single-sided, and it faces in the direction of its normal.


I’ll try it out later. Like I said I’m not familiar with Maya.

I suppose that I could invert the normals in the .egg file by writing a simple program. I notice that there are vertex normals and polygon normals in the file. Would I have to invert both? I know using egg-trans has the option to recalcuate one type of normal from the other.

Edit Polygon > Normals > Reverse
If there are still inverted normals, try to use Normals > Conform, which will set the minority direction to follow the majority (inside or outside).
If there’s no change, first you should select the faces whose normal are pointing to the same direction, Reverse them, then exit to object mode, select the object and Conform !
I used to play around with those two, and they work best together.