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.

-Ben

-----Original Message-----
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@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-----
Hash: SHA1

Hi,

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.

Regards,

Jan

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

iD8DBQFJy34Vn11XseNj94gRAlKlAJ49ebboolwzo75PcdLNog6W5y5vtgCggSZC
2e+pdTpYqi/E3IcYBd6wj1E=
=+rJG
-----END PGP SIGNATURE-----
_______________________________________________
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