[x3d-public] Nurbs for x3dom

Andreas Plesch andreasplesch at gmail.com
Mon Sep 3 18:06:40 PDT 2018


Hi Joe,

Octaga was mentioned as a good Nurbs implementation but I did not test
it. I think most other x3d browser also have some support.

Given that Nurbs is not supported on a hardware level, there is a
necessary tessellation step. OpenGL has Nurbs support but also only on
the CPU. WebGL does not have it.

For real animation support it would be therefore necessary to use
shader/cuda code to help with tessellation or perhaps raytracing as
much as possible. I could not find existing shader code but there is a
lot of research as it is a pretty obvious target, in the Nurbs,
engineering domain.

Thinking out loud, without really understand Nurbs more than as a
remapping of UV space to XYZ space using polynomials, I suppose it may
be possible in a fragment shader to determine the U and V of the
fragment and then calculate the corresponding XYZ using the splines.
These coordinates can be retrieved as an RGB float texture, and reused
as vertices and triangulated using the UV connectivity, eg. UV
neighbors should stay XYZ neighbors. So there probably would need to
be UV rendering as well. This procedure will make ugly triangles but
perhaps not too bad.

Perhaps there is a way to avoid complete re-tessellation with new
control points, eg. to efficiently calculate an adjustment of the
existing mesh based just on the changes in control points ?

I think there may be enough value, albeit perhaps not so much fun,
with static rendering of Nurbs surfaces. Machine parts, nuts and
bolts, engines and such do not deform easily :).

-Andreas

On Mon, Sep 3, 2018 at 5:55 PM Joseph D Williams <joedwil at earthlink.net> wrote:
>
>
>
>
>
> Animation and lines do not work.
>
>
>
>
>
> So, basically not current x3d Nurbs right out of the box. The x3d nurbs are designed to be animated, not simply as carriers for already composed piece of frozen art. Will look, but is there any conforming x3d implementation you have found? The current spec has been through a couple of technical revs up to now, but I don’t remember any thinking there is a level of capability for an x3d nurbs implementation about being able to use or not use the various nurb ins and outs supporting actual realtime animation using interppolators. Maybe what you have is a sort of process that takes some common nurbsburg characteristics and delivers it back to x3d as some other form of geometry. Looking for some examples, but please look for a tool that can play with real active [in,out] events, and, not sure there is an x3dom markup that just takes all our precious nurby [in,out]s and makes them []s, I hope.
>
>
>
> How about checking with the most world-reknowned vrml/x3d NURBS Component implementers? There has to be one or two somewhere.
>
>
>
> I memory is fading, but seems I remember some fun. If you don’t have SFNode [in,out] controlPoint(s) []    [X3DCoordinateNode] and stuffs like add/removeGeometry [NurbsSurface] and profiles and  trajectory, and add/removeTrimmingContour [Contour2D] and some usable realtime interpolators, then the tool is just a little geometry exporter maybe suitable for off-board making a frame of a video. Not much fun without the old ins-outs, and yes, some transparency. What we wish for is a complete documentation of collections and sets of nurbsthings over time, with the same sorts of best-practice data structures and animations as expected for any other x3d geometries.
>
>
>
> Thanks and All Best,
>
> Joe
>
>
>
>
>
> From: Andreas Plesch
> Sent: Monday, September 3, 2018 1:04 PM
> To: x3dom-developer mlist
> Cc: X3D Graphics public mailing list
> Subject: [x3d-public] Nurbs for x3dom
>
>
>
> 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
>
>
>
> _______________________________________________
>
> x3d-public mailing list
>
> x3d-public at web3d.org
>
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
>



-- 
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list