I'll attempt to make a guess on what may be happening... Since materials only makes sense with lighting enabled, the lighting normal may be dependent upon vertex order (auto normal generation). Specifying osg::Material::FRONT_AND_BACK option simply says to apply the material to both front and back faces of the polygon. If your lighting normal is facing opposite of the light source, the polygon face will be black (assuming ambient lighting/material is 0).
-Shayne -----Original Message----- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Gianni Ambrosio Sent: Tuesday, November 08, 2011 2:39 AM To: osg-users@lists.openscenegraph.org Subject: Re: [osg-users] set material basic question Hi All, I got the point. The vertex order of some faces of the wheel causes it. I modified one face of the wheel inverting the vertex order and after that modification I can see that face correctly coloured. Now, since I used the osg::Material::FRONT_AND_BACK option, why it doesn't work? In attachment the scene dump. Regards Gianni ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=43755#43755 Attachments: http://forum.openscenegraph.org//files/wheel_red_927.zip _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or g _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org