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

Dave A dave at realmofconcepts.com
Thu Feb 10 22:13:10 PST 2011


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.

On 2/10/2011 3:03 PM, Michalis Kamburelis wrote:
> dave at realmofconcepts.com wrote:
>> I'm looking for examples of per-vertex normals on IFS's. Does anyone know
>> of a tool which export these?
> You can take a look at my old VRML 97 normals test in
> https://vrmlengine.svn.sourceforge.net/svnroot/vrmlengine/trunk/kambi_vrml_test_suite/vrml_2/normals.wrl
>
> But it was written by hand. At least Blender export scripts to VRML 97
> and X3D don't generate explicit normal information, at least in the last
> release.
>
>> Is there a documented algorithm for how this
>> should be done, especially regarding vertex splitting, smoothing, etc.?
>>
> The X3D specification about IndexedFaceSet is pretty clear about how to
> set explicit normals: set non-NULL "normal" field, and optionally set
> normalPerVertex, normalIndex. These allow various ways of providing
> normal vectors. The most flexible is when you use non-empty normalIndex,
> then you have per-vertex normals and still the same vertex (the "same"
> in Coordinate node) may have different normals depending on which face
> it is on.
>
> It's up to the generator how such normals are generated... Maybe use
> something like creaseAngle, maybe use some information specific to your
> generator (e.g. Blender could use "sharp edges" marks and EdgeSplit
> modifier information, in addition to AutoSmooth setting).
>
> Michalis
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1204 / Virus Database: 1435/3434 - Release Date: 02/10/11
>
>



More information about the X3D-Public mailing list