Hi Carsten, 

the patch works fine. Now, all file loaders produce the same result. Will this 
patch be commited to the git-repository? 

Best regards, 
Daniel


-------- Original-Nachricht --------
> Datum: Fri, 13 Jul 2012 09:39:18 -0500
> Von: Carsten Neumann <carsten_neum...@gmx.net>
> An: opensg-users@lists.sourceforge.net
> Betreff: Re: [Opensg-users] Inconsitent behavior off file loaders

>       Hello Daniel,
> 
> On 07/13/2012 05:23 AM, Daniel Weber wrote:
> > i've observed problems with the automatic computation of normals when
> reading triangular meshes from .off files. The direction of the normals is
> simply wrong. I know that there has already been a discussion on this mailing
> list, suggesting to simply flip the normals after the node has been
> generated.
> >
> > But when I use other file formats the normals are computed correctly. I
> therefore used Meshlab (and Blender) to generate a simple sphere and saved
> it in different file formats: .wrl. obj. and .off. (I've attached the
> files). In the attached example, the lighting looks wrong for the .off, 
> whereas
> .obj and .wrl.are rendered correctly. I assume, that it is a bug in the
> .off file reader that accidentally flips indices of the triangles. If I load
> different file formats, I always need to check the file ending for flipping
> the normals afterwards or not. For me it would help a lot, if this
> distinction was not necessary. Can anybody point me to the routines for 
> loading the
> .off files and (automatically) computing the normals? Maybe, i can send a
> patch then.
> 
> it appears the .off file reader reverses the order of vertices in a 
> face. The file format descriptions I could find with a quick search 
> don't mention if the faces are given in CCW or CW order. Given the 
> problem you are running into it seems to me the loader should better 
> preserve the orientation from the file, the attached patch should do that.
> Could you give it a try please?
> 
>       Cheers,
>               Carsten

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to