13.07.2015 Views

NURBS in VRML

NURBS in VRML

NURBS in VRML

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

NurbsCurve2D or Polyl<strong>in</strong>e2D and must be enumerated <strong>in</strong> thechild field <strong>in</strong> consecutive order accord<strong>in</strong>g to the topology of thecontour.NurbsCurve2DNurbsCurve2D {field MFFloat knot []field SFInt32 order 3exposedField MFVec2f controlPo<strong>in</strong>t []exposedField MFFloat weight []exposedField SFInt32 tessellation 0}suitable tessellation bound simply based on the desiredsmoothness. In addition, this value can be used to weight thepolygon budget of objects. Essential objects are given a hightessellation value to ensure a smooth surface; less importantobjects get a lower tessellation value because some coarseness istolerable.The NurbsCurve2D node def<strong>in</strong>es a trimm<strong>in</strong>g segment that is partof a trimm<strong>in</strong>g contour <strong>in</strong> the u-v doma<strong>in</strong> of the surface. If theNurbsCurve2D forms a closed contour, it may be used as aContour2D node.Polyl<strong>in</strong>e2DPolyl<strong>in</strong>e2D {exposedField MFVec2f po<strong>in</strong>t []}The Polyl<strong>in</strong>e2D node def<strong>in</strong>es a l<strong>in</strong>ear curve segment as a part of atrimm<strong>in</strong>g contour <strong>in</strong> the u-v doma<strong>in</strong> of a surface.3. IMPLEMENTATIONOur implementation <strong>in</strong> the <strong>VRML</strong> browser blaxxun Contact [bla2,web] proves the usage of <strong>NURBS</strong> <strong>in</strong> the <strong>VRML</strong> doma<strong>in</strong>. Allproposed nodes except the NurbsTextureSurface have beensuccessfully implemented. In favour of fast and stable process<strong>in</strong>ga uniform tessellation was applied as recommended <strong>in</strong> [KML96].Various render<strong>in</strong>g pipel<strong>in</strong>es fullfill the requirements of differentplatforms (Figure 2). As a reference implementation we used theOpenGL tessellator located <strong>in</strong> the glu-library. The <strong>NURBS</strong>surface parameters are directly handed over to the correspond<strong>in</strong>gOpenGL functions. This method is easy to implement, butperformance is low.To use the built <strong>in</strong> render<strong>in</strong>g pipl<strong>in</strong>e <strong>in</strong> our client, we polygonize<strong>NURBS</strong> models and store the result<strong>in</strong>g mesh data. If no dynamictessellation is required, the performance penalty is avoidedalltogether. For low-end CPUs or complex models, this methodcan be used to tessellate <strong>NURBS</strong> surfaces <strong>in</strong> a preprocess<strong>in</strong>g step.In case of dynamic tessellation (view-depended render<strong>in</strong>g) the<strong>in</strong>troduction of thresholds for the tessellation values m<strong>in</strong>imizes thecomputational load. If the tessellation value is altered by morethan 10% the vertex cache is flushed and a new tessellation cycleis <strong>in</strong>voked.Current chip architectures like the Intel ISSE or the AMD3DNow! allow to parallelize the computations <strong>in</strong>volved <strong>in</strong> thepolygonization. An ISSE optimized tessellation with additionallyoptimized light<strong>in</strong>g and transformation showed best results. Thispipel<strong>in</strong>e exploits the fact that CVs are <strong>in</strong>variant undertransformations. Transform is sped up by apply<strong>in</strong>g the costlymatrix multiplication to the small amount of CVs. After thetessellation process the transformed vertices are lit.In the current implementation stage no step size computation isperformed. As a first step we encourage the content author to set aFigure 2: pipel<strong>in</strong>es for tessellation and render<strong>in</strong>gView dependent render<strong>in</strong>gThe implementation is targeted to dynamic tessellation whichallows view-dependend render<strong>in</strong>g. Like the classical LOD,<strong>NURBS</strong> objects can be scaled down accord<strong>in</strong>g to the viewer’sdistance from the object. We have <strong>in</strong>troduced a quality factordescrib<strong>in</strong>g the render<strong>in</strong>g quality by means of triangles per screensize of the object. This value is comparable with the screen basedtolerance shown <strong>in</strong> section 1, because both values specify theresolution of an object. In contrast to the screen based tolerancethe computation is very simple but is not directly related to thecurvature of the objecttriangles(scale)Quality =bbox(dist)Withtriangles ( scale)= ( uTess + 1) * scale*(vTess + 1) * scale* 2Quality:triangles(scale):bbox(dist):Describes render<strong>in</strong>g quality of an objectNumber of triangles of an objectDiameter of the bound<strong>in</strong>g box <strong>in</strong> screen spaceThe quality factor is specified by the tessellation values <strong>in</strong> <strong>VRML</strong>.If the quality is assumed to be constant the scale value alters withthe distance of the viewer to the object. An additional feedbackloop can scale the quality factor accord<strong>in</strong>g to the CPU speedreflect<strong>in</strong>g <strong>in</strong> the frame rate. The algorithm keeps the framerateconstant by scal<strong>in</strong>g the <strong>NURBS</strong> content at any given CPU speed.Of course, this implies that the whole scene has to be designed forscal<strong>in</strong>g: There has to be reasonable space for upscal<strong>in</strong>g anddownscal<strong>in</strong>g the tessellation and thus the appearance of an objectif mov<strong>in</strong>g away from the target platform. However, scalability isnot unlimited: In the average scene <strong>NURBS</strong> content is scaleddown very fast with CPU frequency s<strong>in</strong>ce certa<strong>in</strong> portions of theoverall computational effort do not decrease. The drawbacks ofCPU based scal<strong>in</strong>g are that the authors lose control over theappearance of the object s<strong>in</strong>ce the client itself cont<strong>in</strong>uously altersthe object’s resolution. Proper lower bounds have to be def<strong>in</strong>ed to

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!