Ayam Icon
Ayam

Start
News
Gallery
Features
Download
Community
Docs

X3DOM NURBS Playground

Welcome to the playground. This page displays the current state of our NURBS tessellator for x3dom.

Since initial release the tessellator now:

  • creates almost perfect trim outlines,
  • adjusts itself properly to highly curved regions of the surface,
  • generates texture coordinates, albeit only the current parametric values (knots) are transmitted,
  • can be controlled via the uTessellation and vTessellation attributes,
  • supports also parametric space based sampling,
  • runs in a pool of webworkers to not block the main thread and utilize multi core CPUs,
  • shows an initial, coarse representation of the NURBS that can even be interacted with, while the tessellation is running in the background,
  • properly responds to DOM attribute changes,
  • displays an indicator while tessellating.

Some examples from the Web3D Consortiums X3D NURBS example archive:

Simple Trimmed Surface  

Simple Texture Coordinates for an Image Texture  

 
A heavy one: about 130 trimmed patches that tessellate to approximately 250.000 triangles (see also the XHTML). Allow some time for complete tessellation.

Many Trimmed NURBS Patches  
 
Next is a well known X3D example improved by a flame texture image from Michael Green & Paul Echevarria (XHTML file size 51K, tessellates to ~105.000 triangles).

Hurricane Lantern  

 
Another old friend, the SGI cube (XHTML file size 23K, tessellates to ~82.500 triangles). This example demonstrates how DOM attribute changes lead to a re-tessellation. If your browser has problems with the, admittedly wild, iframe size changes, just use the direct link to the XHTML.

SGI Cube  

 
We conclude with an older scene of our own that shows the limits of the object space sampling strategy, which is the default. See also the XHTML file, which is about 24K and tessellates to 60.000 triangles.

Limits of Object Space Based Sampling  

Note the coarse sampling on the spoon and the errors on the tip of the ice cream (the current x3dom rendering is actually a bit better than the preview image, due to improved curvature detection, however, a few critical errors remain).

Fortunately, the tessellator also supports a sampling method that works in the parametric space and delivers better results for those problematic cases:

Parametric Space Based Sampling  

Parametric space based sampling can be activated by setting a negative value for the uTessellation attribute.

See also the current source of the NURBS tessellator
and the preliminary user level documentation.


Randolf Schultz, 22. Mar 2016
randolf.schultz@gmail.com