Re: [Maya2osg-users] Winding again!
Status: Alpha
Brought to you by:
jtaibo
From: PP CG <pp...@cg...> - 2011-10-19 07:43:44
|
Hi J-S, > Hi guys, > > I think I found the case where winding will affect surfaces. > > An object scaled by -1 will have its normals inverted and winding will > be inverted too. Maya sets the "opposite" mode on this. It makes it look > OK in Maya. If, in the plugin, I set "flip normals if surface mode is > opposite", then the plugin will invert the normals (* -1) but the > winding will still be wrong, so they will be culled by CULL_FACE even > though lighting is correct. > > If I reverse the normals in Maya, my guess is that Maya also reverses > winding, because then all is OK. > > So I think the plugin should warn when the surface mode is set to > opposite AND single sided, as that will not work unless triangle winding > is reversed (which is maybe too complex for an export plugin to do). At > least with a warning artists can see there is a problem and fix it on > the affected surfaces. If the data is wrong, fix the data! :-) Wouldn't just reversing the Vertex or Element Arrays do trick ? Cheers, PP |