[x3d-public] [x3dom-developers] Nurbs for x3dom

Leonard Daly Leonard.Daly at realism.com
Mon Sep 3 16:34:59 PDT 2018


Andreas,

Great find.

Am I correct in that you haven't had a chance to fully investigate the 
reasons for fragility? It looks like there are a number of ways you have 
found where the library fails (doesn't work as well as hoped) including 
# web workers and tessellation detail. Is animation even a reasonable 
consideration given the time it takes to tessellate a NURBS surface? 
It's probably the case that simple/careful animations on a limited NURBS 
would work, but something complex would not.

A few resources on the issue of automatic and/or real-time tessellation.

Maya has a mode for determining automatic tessellations. See the article 
at 
https://knowledge.autodesk.com/support/maya/learn-explore/caas/CloudHelp/cloudhelp/2018/ENU/Maya-Rendering/files/GUID-F4CCA0A7-C964-4BA5-AE5C-81A6696820F6-htm.html

Intel has an article (and sample code) for doing tessellation in 
real-time; however, it's in C++: 
https://software.intel.com/en-us/articles/using-nurbs-surfaces-in-real-time-applications

There is a research paper on efficient tessellation on trimmed NURBS at 
http://cg.cs.uni-bonn.de/en/publications/paper-details/balazs-2004-efficient/. 
I have not read this.

This video shows the result of real-time tessellation on the graphics 
card. I don't know if this is standard WebGL calls (I think not), but it 
could be done as vertex shaders. https://www.youtube.com/watch?v=F9oLyOwbFp0

This article claims 40,000 Bézier patches at 7-15 fps (almost real-time) 
on hardware almost 20 years old. I don't know how their equipment (SGI 
Onyx with three 200 MHz R4400 CPUs and a Reality Engine graphics 
accelerator) compares to web-browser technology today. 
http://gamma.cs.unc.edu/RENDER/render.html

My quick review though these materials and others implies that 
constructing a general purpose algorithm is not easy; and perhaps to the 
level that the application needs to be tailored to a specific 
application (or perhaps input ranges) for things to work out real-time.

Leonard Daly



> 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.]
>

-- 
*Leonard Daly*
3D Systems & Cloud Consultant
LA ACM SIGGRAPH Past Chair
President, Daly Realism - /Creating the Future/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180903/32d5a814/attachment-0001.html>


More information about the x3d-public mailing list