[X3D-Public] Does anyone export per-vertex normals?

Bederov, Sergey bederov at cortona3d.com
Fri Feb 11 04:20:00 PST 2011


Hello Dave,

Usually there is no need to create a new mesh, you might just create new
vertices with identical coordinates. Having many meshes can impact
performance, so usually one mesh is better.

The specification is a bit vague about the interpretation of
creaseAngle: it talks about faces while in fact we have to generate
normals for vertices (or, more specifically, for each corner of each
face). Actually you will have to find groups of faces with "smooth"
edges around a vertex and calculate an average normal for each group.

                                                    Sergey Bederov



> -----Original Message-----
> From: x3d-public-bounces at web3d.org
[mailto:x3d-public-bounces at web3d.org] On
> Behalf Of Dave A
> Sent: Friday, February 11, 2011 9:13 AM
> To: Michalis Kamburelis
> Cc: x3d-public at web3d.org
> Subject: Re: [X3D-Public] Does anyone export per-vertex normals?
> 
> Thanks Michalis. I'm actually writing an importer/player, and was
wondering
> how this works. The player tech uses per-vertex normals. I think this
means
> that, and check me if I'm wrong:
> 
> If only a crease angle is given, I should, at each vertex, find the
angle
> between faces, and if greater than crease, create a 'smooth'
> normals based on surrounding faces. If less (flat), create a NEW mesh,
> removing that face from the rest, and for each of its vertices, set
the
> normals same as the face's normal. If flat shaded, might as well
create a
> separate mesh for each face, with such normals.
> 
> Does that sound about right?
> 
> Dave A.
> 



More information about the X3D-Public mailing list