lucas Grijander wrote:


yes, i tried with the OSG reader and it works. So it should be something concerning the format of the data?

More likely your interpretation of the data. Did you check against the .obj specification (as far as there is one, other than from old Alias documentation), e.g.
http://www.martinreddy.net/gfx/3d/OBJ.spec ?

Paul


> Date: Tue, 13 May 2008 14:19:35 +0200
> From: [EMAIL PROTECTED]
> To: osg-users@lists.openscenegraph.org
> Subject: Re: [osg-users] problems with normals
>
> lucas Grijander wrote:
>
> > Hi,
> >
> > I've created the OBJ file with 3DStudio, and I've verified that all
> > the normals are pointing out, so it should work anyway? I think it
> > depends on the way I'm reading the data...
>
> So does OSG's .obj reader show the correct results?
>
> Paul
>
> >
> >
> >
> >
> > > From: [EMAIL PROTECTED]
> > > To: osg-users@lists.openscenegraph.org
> > > Date: Tue, 13 May 2008 14:13:12 +0200
> > > Subject: Re: [osg-users] problems with normals
> > >
> > > 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
> >
> > ------------------------------------------------------------------------
> > Invite your mail contacts to join your friends list with Windows Live
> > Spaces. It's easy! Try it!
> > <http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us>
> >
> >
> >------------------------------------------------------------------------
> >
> >_______________________________________________
> >osg-users mailing list
> >osg-users@lists.openscenegraph.org
> >http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> >
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

------------------------------------------------------------------------
Discover the new Windows Vista Learn more! <http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE>

------------------------------------------------------------------------

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to