← Users | Developers → | |||||||||||||||||||
Intro | News | view3dscene | The Castle | All Programs | Forum | Donate | Engine | VRML/X3D | Blender |
NURBS componentThis component defines nodes for rendering and animating along smooth NURBS curves and surfaces. See also X3D specification of NURBS component.
Contents: 1. DemosFor demos and tests of these features, see the nurbs subdirectory inside our VRML/X3D demo models. 2. X3D supportFull support for NurbsPatchSurface, NurbsCurve, NurbsPositionInterpolator, NurbsSurfaceInterpolator, NurbsOrientationInterpolator. Any >= 2 value of order is allowed (X3D spec requires only 2,3,4 support). NurbsTrimmedSurface has only partial support: it is rendered just like NurbsPatchSurface, ignoring trimmingContour. 3. VRML 2.0 (97) supportAlso basic VRML 97 NURBS nodes (defined in VRML 97 Amendment 1 specification) are handled: NurbsSurface, NurbsCurve, NurbsPositionInterpolator. VRML 97 versions are similar, but not 100% the same as their X3D counterparts.
4. Control points are in homogeneous coordinatesNote that in VRML and X3D, NURBS control points are expressed in homogeneous coordinates. That is, the control point is actually a 4D vector (x, y, z, weight), which means that it's actual 3D position is (x/weight, y/weight, z/weight). This may be a little confusing, if you're used to normal NURBS equation definition like from here or at wikipedia. Instead of usual equation: P(u) = (sum of basis * control point * weight) / (sum of basis * weight) VRML/X3D uses a simpler equation: P(u) = (sum of basis * control point) / (sum of basis * weight) That is, "X3D control point" (as specified in VRML/X3D file) is assumed to be already multiplied by weight. If you want to intuitively pull the curve toward the control point, you should
In other words, if you just want to increase the weight 2 times, then the corresponding control point should also be multiplied * 2, to make things behave intuitive. In particular, when writing an exporter from normal 3D modelling programs, like Blender, note that you have to multiply Blender control points * Blender weights to get correct X3D control points. When you use White Dune, a NURBS 3D modeller especially suited for working with VRML/X3D, this non-intuitive behevior is somewhat hidden (the curve "handles" you see in White Dune are actually "X3D control points / divided by weight"). Our behavior is compatible with other X3D browsers/editors (at least White Dune, Octaga, InstantPlayer, BitManagement). |