[osg-users] VRML Normal Issue
baxelrod at coroware.com
Thu Mar 26 13:35:36 PDT 2009
But normals per primitive or per vertex are 'global' for the entire shape. Aren't they? The crease angle is a 'local' feature so that you can have a shape with some smooth and some sharp edges.
Can normals per primitive and normals per vertex both be used in a single shape?
If not, the only way I can imagine having a shape with some smooth and some sharp edges is if there is one normal per vertex per face. Just like the diagram in the VRML spec shows, if a vertex has 2 faces connected to it, it needs 2 normals for a sharp edge, and either 1 or 2 for a smooth edge.
From: osg-users-bounces at lists.openscenegraph.org [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Jan Ciger
Sent: Thursday, March 26, 2009 9:08 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] VRML Normal Issue
-----BEGIN PGP SIGNED MESSAGE-----
Ben Axelrod wrote:
> Thanks for the info.
> I took a look at the code. Adding crease angle support does seem
> tricky since I think we would have to create new vertex points on the
> fly to accommodate 2 or more different normal vectors at that point.
> Here is some off the cuff pseudo code.
I do not see why you would want to do that. Just set the normal binding
to be per primitive/face and not per vertex if you want to have sharp
edges and define face normals.
Otherwise, if the corners/edges are to be smoothed, you use normal
binding per vertex and calculate normal as an average of the face
normals of the faces adjacent to the vertex.
There is no need to duplicate any vertices - in fact, that would only
give you artifacts.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mandriva - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
osg-users mailing list
osg-users at lists.openscenegraph.org
More information about the osg-users