[x3d-public] x3dom nurbs support

Andreas Plesch andreasplesch at gmail.com
Sat Sep 29 09:33:02 PDT 2018


Based on the initial Ayam x3dom Nurbs node support for PatchSurface
and TrimmedSurface, I am working on more complete and animation
capable Nurbs component implementation in my x3dom NURBS branch.

Here are examples of working nodes:

https://rawgit.com/andreasplesch/x3dom/Nurbs/test/functional/nurbs/inline.html

I added NurbsCurve and the interpolators. In addition, the web worker
code can now be bundled, and is optimized to support animation of
control points and weights which do not require retriangulation. This
makes the AnimatedNurbsPatchSurfaceHead example borderline ok to
animate on a regular desktop but also shows the limits off CPU (via
js) only animation although there is additional room for further
optimization (for example using transferables for communicating with
workers). A more substantial improvement has to come from shaders.

I think most Nurbs examples from Basic Archive are working, after
fixing them as previously reported.

Some details: The Curve tessellation is strictly subdivision following
the tessellation hints as speced. The Ayam surface tessellation is
adaptive with a threshold being influenced by the tessellation hints
as well.
The tessellation (and animation by deformation) will spawn web
workers/threads. The maximum number of workers is aggressively set and
can max out CPUs. I probably should expose the number in a scene
setting to scenes. It is defined in the x3dom-nurbs-pool.js file.
Vertex animation does not recalculate automatic normals currently for
performance but that could be added.

The SweptSurface and SwungSurface are not implemented and I do not
have a good idea how to.
The NurbsTextureCoordinate is not implemented. Is it used ? Are the
default texture coordinates usually ok ?

Any comment or feedback welcome,

-Andreas




-- 
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list