Re: [Maya2osg-users] Triangle winding question (maya usage)
Status: Alpha
Brought to you by:
jtaibo
From: Javier T. <jav...@gm...> - 2011-10-14 17:19:49
|
Hi J-S, Just a quick answer, without thinking too much... O:) Take a look at: Mesh > Cleanup (especially the "Nonmanifold geometry" option in "Remove Geometry" section) Normals > Conform I don't know if any of this is going to solve your problem, but these are the first places I would look. Just my two cents... good luck! Regards, On Fri, Oct 14, 2011 at 7:13 PM, Jean-Sébastien Guay < jea...@cm...> wrote: > Hi guys, > > This is a Maya usage question... Hope you don't mind. > > Our modelers often create symmetric pieces by first creating half, then > duplicating that half, scaling it by -1, reversing the normals and then > freezing the transforms. > > This seems to work fine, at least in Maya, except that I notice now that > triangle winding (vertex order) is still inversed when they do that. > This manifests itself in two ways in our realtime app: Lighting > considers the wrong side of a face (light seems to come from the > opposite side) and backface culling is reversed (faces are culled when > looking from the outside instead of from the inside). > > I wonder, is there a way in Maya to reverse the triangle winding? I can > write a script (or search the net for one), but is there something > built-in? > > I was thinking of writing a script that would go through all polygons of > a model and compare the "implicit normal" (calculate a normal using the > vertex order in the triangle) to the saved normal (in the normal array) > and if it doesn't point in roughly the same direction, reverse the > vertex order. This assumes that the artist has made his normals all > point in the correct direction, so the normals are used as reference to > correct the triangle winding. I could then put this script on preExport > in the plugin. > > My question is really, do I have to do this myself or is there something > already there I can use? > > Thanks in advance, > > J-S > -- > ______________________________________________________ > Jean-Sébastien Guay jea...@cm... > http://www.cm-labs.com/ > http://whitestar02.dyndns-web.com/ > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure contains a > definitive record of customers, application performance, security > threats, fraudulent activity and more. Splunk takes this data and makes > sense of it. Business sense. IT sense. Common sense. > http://p.sf.net/sfu/splunk-d2d-oct > _______________________________________________ > Maya2osg-users mailing list > May...@li... > https://lists.sourceforge.net/lists/listinfo/maya2osg-users > -- Javier Taibo |