Re: [Maya2osg-users] Winding again!
Status: Alpha
Brought to you by:
jtaibo
From: Javier T. <jav...@gm...> - 2011-10-22 21:27:59
|
Hi all, At least I have some time again to deal with Maya2OSG... :) On Sat, Oct 22, 2011 at 8:43 PM, PP CG <pp...@cg...> wrote: > Hi, found the place ( code ) of confusion, Line 281 in Mesh.cpp > > // Revert normals if opposite (needed for correct lihgting when using > FFP) > // If we are using GLSL instead of FFP, we do not reverse the normals > because > // it is already done in the shader > bool reverse_normals = !Config::instance() -> getArgBool( "-useGLSL" ) > && !doubleSided(mDagPath.node()) && opposite(mDagPath.node()); > float normalDirection = ( reverse_normals ? -1.0f : 1.0f ) ; > > What to do about it ? I think we should keep the setting, but need to > switch the culling ( backface, frontface ) as well, and that shoud fix J-S > issue, right ? > This is how I left this code, and AFAIK it should be working OK. I don't really know the meaning of the "flip normals if surface mode is opposite" option, that I can see in current trunk is not present anymore. As I said, I think it is working OK right now. The test model I use is the one in "tests/project/scenes/test_geometry.ma". It has all the combinations of single/double/opossite and smooth and hard edges and so on... I tested it with FFP and GLSL shaders and the look is just as seen in the Maya viewport. @J-S: Can you test if the problem you detected still exists and in such case could you add an example of your offending geometry to the " test_geometry.ma" test model so we can use it for fixing the problem and keep it for future tests? Regards, -- Javier Taibo |