2
\$\begingroup\$

I'm exporting from Maya 2009 to OBJ. The mesh I'm exporting has in it's Render Stats "Double Sided" checked, but when the polygon is exported, only a single side is actually exported.

What really needs to happen is for each polygon that is double sided, two polygons need to be exported, facing in opposite directions..

I can do this manually, but is there a way to make the OBJ exporter do it for me?

\$\endgroup\$
1
  • \$\begingroup\$ How are you drawing them? That's where it's at. Just draw the polygons with both clockwise and counter-clockwise winding. \$\endgroup\$
    – House
    Commented Oct 7, 2012 at 15:59

1 Answer 1

2
\$\begingroup\$

The mesh is just exported vertices. The order in which they're exported is the standard for defining which face is drawn. If you want to have both faces drawn, simply configure your model rendering code to draw faces defined by both clockwise winding and counter clockwise winding.

With OpenGL or DirectX this can be as simple as disabling backface culling. See the documentation regarding backface culling for the technology you're using.

\$\endgroup\$
7
  • \$\begingroup\$ Yes but, I only need some faces (that are easiest marked in Maya!) to be rendered double-sided. For instance, a plane with a tailfin that is a single polygon. Only that polygon needs to be double sided. \$\endgroup\$
    – bobobobo
    Commented Oct 7, 2012 at 16:19
  • 1
    \$\begingroup\$ Then separate those polygons into their own mesh object in Maya. Then when rendering, set the device to not cull backfaces when that object is rendered then set the device to cull as necessary for the other mesh objects. \$\endgroup\$
    – Steve H
    Commented Oct 7, 2012 at 16:44
  • \$\begingroup\$ Well, that's a bit inefficient. I'm trying to leave the CULLMODE setting unchanged, and have this one triangle render with two polygons. I can do it manually by adding an f 33/32/12 type statement (in reverse order) in the OBJ file manually, but that is tedious \$\endgroup\$
    – bobobobo
    Commented Oct 7, 2012 at 17:21
  • 2
    \$\begingroup\$ The tailfin on the plane should be two polygons then, one with counterclockwise winding and the other with clockwise winding. This is in line with what other's have suggested, but I would go a step further and say not to create the model this way. A mesh with a flat segment like that is undesirable. Consider what happens when you view the plane head-on: the tailfin looks like it's not there. I suggest giving some depth to the fin. \$\endgroup\$ Commented Oct 7, 2012 at 23:22
  • \$\begingroup\$ @ktodisco Yes, I know. Now how to make Maya export select polygons as two, oppositely wound polygons? \$\endgroup\$
    – bobobobo
    Commented Oct 9, 2012 at 0:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .