[x3d-public] Nurbs for x3dom
Andreas Plesch
andreasplesch at gmail.com
Mon Sep 3 13:03:41 PDT 2018
Ayam is 3d modeler focused on Nurbs: http://ayam.sourceforge.net/ . It
turns out that it comes with a functional implementation of Nurbs
surfaces for x3dom which may be possible to adopt for the main x3dom
distribution.
As a start, for testing, I transferred the ayam js nurbs code to a
x3dom Nurbs branch:
https://github.com/andreasplesch/x3dom/tree/Nurbs/src/nodes/NURBS
It works pretty well. Here is the Four Ducks web3d Nurbs example:
https://rawgit.com/andreasplesch/x3dom/Nurbs/test/functional/nurbs/inline.html
Many other examples work as well. Animation and lines do not work. The
ayam code uses web workers for tessellating. Using a pool of more than
1 worker seems to be fragile.
Here is another nice js Nurbs library:
https://github.com/pboyer/verb
But it would be most realistic to make the existing ayam code more
robust and complete, at least first.
- Define all x3d nodes in the standard x3dom way.
- Investigate web worker crashes (perhaps in FreeWorkerThread).
- less aggressive default tessellation.
- try without web workers
- investigate x3d text example crash (too many triangles?).
- animation: skip when last tessellation not yet finished
- curves. interpolators
The common approach would be anyways to tessellate before exporting to
X3D, and then use a binary format (binary X3D, SRC, glTF).
Any feedback or contribution welcome, -Andreas
[There is a lot of work on GPU based tessellation/evaluation as well.
A common approach is to tessellate the non-trimmed patch and then use
a texture mask to hide the trimmed portions.]
--
Andreas Plesch
Waltham, MA 02453
More information about the x3d-public
mailing list