El Martes 13 Mayo 2008ES 13:59:45 lucas Grijander escribió: > Dear all, > > I'm having a problem when importing an OBJ model. I load the v positions > (vertices), the indices and the vn positions (normals). Then I create a > geometry with these data. I'm having a bad result (see image attached), it > is like the normals are not well defined. I have the same vertices as > normals, so I define the normal array as: > > mesh->setNormalArray( &n ); > mesh->setNormalBinding( osg::Geometry::BIND_PER_VERTEX ); > > Does anyone has an idea of what could be the problem? > > thanks
Your normals are wrong. Some are pointing out of the mesh while the rest aren't, that's why you get dark zones. OSG loads OBJ files (osgDB::readNodeFile), so there is no need of loading the file by yourself. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org