[X3D-Public] Does anyone export per-vertex normals?
michalis.kambi at gmail.com
Thu Feb 10 15:03:12 PST 2011
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
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
>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).
More information about the X3D-Public