Re: [osg-users] VRML Normals

2008-05-14 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Robert Osfield wrote:
> Hi Ben,
> 
> The answer to the question "Has this bug been fixed in version 2.4" 
> can be found by browsing the SVN repository online:
> 
> http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/src/osgPlugins/vrml/ReaderWriterVRML2.cpp
> 
> 
>> From this:
> "3) Smoothed normals are computed if no normal field is provided. "
> 
> So I'd guess that it is now fixed.
> 

Ah, didn't know about this :) So my previous mail is moot then ...

I am glad that people are actively improving this code.

Regards,

Jan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org

iD8DBQFIKwLun11XseNj94gRAnFLAKCQOQ3zphxr/6jRFIdJdKyBXBK1VQCdF9P/
Cp0KEKwFJQem+DtKIsOO6Y0=
=Xctu
-END PGP SIGNATURE-
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] VRML Normals

2008-05-14 Thread Jan Ciger
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Ben Axelrod wrote:
> 
> 
> I noticed that OSG 2.2 does not properly calculate the normals of VRML
> files.  It seems like it points all the normals at (0, -1, 0).  This is
> only when the normals are not explicitly specified in the file.  If you
> open a VRML file like this in osgviewer, you can see that the coloration
> of the mesh is only accurate when looking at the top of the object.  If
> the normals are specified in the VRML file, then the mesh coloration
> looks correct in osgviewer.  I can supply an example VRML files that
> demonstrate this bug, and also how to fix it.
> 
>  
> 
> Has this bug been fixed in version 2.4? 

There is no code for normal generation in the plugin, if you do not
specify the normals for the mesh, they will be wrong. You need to
specify either the vertex or face normals.

The goal was to write an importer for VRML generated by 3DS Max and
similar tools, not to implement the full VRML spec (which says that the
browser should generate normals if they are not provided). However, feel
free to contribute a patch if you need this functionality.

Regards,

Jan
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org

iD8DBQFIKwJun11XseNj94gRApRGAKDNN7yAYLy9rTxm+tifhbYnJuLlIgCg2dnm
Uju2pIaQS05eZzUWkIiJUg8=
=RFSB
-END PGP SIGNATURE-
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] VRML Normals

2008-05-14 Thread Robert Osfield
Hi Ben,

The answer to the question "Has this bug been fixed in version 2.4"
can be found by browsing
the SVN repository online:

http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/src/osgPlugins/vrml/ReaderWriterVRML2.cpp

>From this:
"3) Smoothed normals are computed if no normal field is provided. "

So I'd guess that it is now fixed.

Robert.


On Wed, May 14, 2008 at 3:21 PM, Ben Axelrod <[EMAIL PROTECTED]> wrote:
> I noticed that OSG 2.2 does not properly calculate the normals of VRML
> files.  It seems like it points all the normals at (0, -1, 0).  This is only
> when the normals are not explicitly specified in the file.  If you open a
> VRML file like this in osgviewer, you can see that the coloration of the
> mesh is only accurate when looking at the top of the object.  If the normals
> are specified in the VRML file, then the mesh coloration looks correct in
> osgviewer.  I can supply an example VRML files that demonstrate this bug,
> and also how to fix it.
>
>
>
> Has this bug been fixed in version 2.4?
>
>
>
> Thanks,
>
> -Ben
>
> ___
> 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


[osg-users] VRML Normals

2008-05-14 Thread Ben Axelrod
I noticed that OSG 2.2 does not properly calculate the normals of VRML files.  
It seems like it points all the normals at (0, -1, 0).  This is only when the 
normals are not explicitly specified in the file.  If you open a VRML file like 
this in osgviewer, you can see that the coloration of the mesh is only accurate 
when looking at the top of the object.  If the normals are specified in the 
VRML file, then the mesh coloration looks correct in osgviewer.  I can supply 
an example VRML files that demonstrate this bug, and also how to fix it.

Has this bug been fixed in version 2.4?

Thanks,
-Ben
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org