Ray Casting of Trimmed NURBS Surfaces on the GPU Hans-Friedrich Pabst Jan P. Springer Andr´ e Schollmeyer Robert Lenhardt Christian Lessig Bernd Fr¨ ohlich Bauhaus University Weimar · Faculty of Media · Virtual Reality Systems Group IEEE Symposium on Interactive Ray Tracing 2006 1 / 21
30
Embed
Ray Casting of Trimmed NURBS Surfaces on the GPU · on the GPU Hans-Friedrich Pabst JanP. Springer Andr´e Schollmeyer Robert Lenhardt Christian Lessig Bernd Fr¨ohlich Bauhaus University
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Ray Casting of Trimmed NURBS Surfaceson the GPU
Hans-Friedrich Pabst Jan P. Springer Andre SchollmeyerRobert Lenhardt Christian Lessig Bernd Frohlich
Bauhaus University Weimar · Faculty of Media · Virtual Reality Systems Group
IEEE Symposium on Interactive Ray Tracing 2006
1 / 21
OverviewI GPUCAST system
I Framework for single pass ray casting on the GPUI Generic library: algorithms, data structuresI Type/value transform iterators on the GPUI Shader metaprogrammingI Scene graph integration
I PublicationI Pabst, Springer, Schollmeyer, Lenhardt, Lessig, Froehlich:
Ray Casting of Trimmed NURBS Surfaces on the GPU
Introduction 2 / 21
Motivation
I Trimmed NURBS surfacesI CAD standard
I Ray castingI Direct renderingI Pixel-accurate
I GPUI Lots of gigaflops per value
Main Goal
Interactive rendering of trimmed NURBS surfaces using ray castingon commodity hardware.
Introduction 3 / 21
Motivation
I Trimmed NURBS surfacesI CAD standard
I Ray castingI Direct renderingI Pixel-accurate
I GPUI Lots of gigaflops per value
Main Goal
Interactive rendering of trimmed NURBS surfaces using ray castingon commodity hardware.
Introduction 3 / 21
NURBS
I NURBS surfaces providelocal and explicit control
I Primitives included, e. g.curve, sphere, cone, cube
I Compact representation
I Continuity between curves and patches
I Trimming allows complex boundaries and topologies
Introduction 4 / 21
Outline
I Integrate NURBS primitives into hardware graphics pipeline
I Ray-NURBS intersection and accurate trimming on the GPU
I Demonstration
I Results and conclusions
Introduction 5 / 21
Surface Rendering: Algorithm Overview
Transform
Create Rays
Shading
IntersectionCalc.
Primitive
Result
I PreprocessingI Create bounding volume
(convex hull)I Send vertices and
parametric data
I For each surfaceI Transform convex hullI Rasterize convex hullI Compute ray-surface
intersectionI TrimmingI Shading
Surface Rendering 6 / 21
Surface Rendering: Algorithm Overview
Screen
CPU
Transform
Create Rays
Shading
IntersectionCalc.
Primitive
Result
I PreprocessingI Create bounding volume
(convex hull)I Send vertices and
parametric data
I For each surfaceI Transform convex hullI Rasterize convex hullI Compute ray-surface
intersectionI TrimmingI Shading
Surface Rendering 6 / 21
Surface Rendering: Algorithm Overview
Screen
CPU
VertexUnit
RasterUnit
Transform
Create Rays
Shading
IntersectionCalc.
Primitive
Result
I PreprocessingI Create bounding volume
(convex hull)I Send vertices and
parametric data
I For each surfaceI Transform convex hullI Rasterize convex hullI Compute ray-surface
intersectionI TrimmingI Shading
Surface Rendering 6 / 21
Surface Rendering: Algorithm Overview
Screen
CPU
FragmentUnit
VertexUnit
RasterUnit
Transform
Create Rays
Shading
IntersectionCalc.
Primitive
Result
I PreprocessingI Create bounding volume
(convex hull)I Send vertices and
parametric data
I For each surfaceI Transform convex hullI Rasterize convex hullI Compute ray-surface
intersection
I TrimmingI Shading
Surface Rendering 6 / 21
Surface Rendering: Algorithm Overview
CPU
RenderTarget
Transform
Create Rays
Shading
IntersectionCalc.
Primitive
Result
RasterUnit
Mem
ory
FragmentUnit
VertexUnit
Screen
I PreprocessingI Create bounding volume
(convex hull)I Send vertices and
parametric data
I For each surfaceI Transform convex hullI Rasterize convex hullI Compute ray-surface
intersection
I TrimmingI Shading
Surface Rendering 6 / 21
Numeric Intersection Computation
I Evaluation: (uv)→ (x , y , z)Solving: (x , y , z)→ (uv)
I Methods: general root finding vs. geometrical contextI SubdivisionI Numerical (iterative)I AlgebraicI Hybrid
I Newton IterationI Only parameters of one step necessaryI Only function values and partial derivatives neededI Quadratic convergence
Surface Rendering 7 / 21
Initial Values for the Newton Iteration
Problem: An approximate solution is needed to get a solution
� Information about geometrical context can be used
Ray
I Two complementary approaches: subdivision and uv -texturing
I Motivation: good initial values will result in fast convergence
Surface Rendering 8 / 21
Subdivision of the Convex Hull
I Quadratically increasing tightnessI Trade-off between ray casting and
standard graphics pipelineI Minimizes number of fragments/raysI Number of vertices increased
I Adaptive subdivisionI Minimizes number of
generated vertices
I Union of all convex hullsI Approximation of the surface
Surface Rendering 9 / 21
uv -Texturing
I Idea: interpolated guess for each rayI Associate an initial value (vertex
attribute) with each vertexI Complement outer control pointsI Mapping parameter range between
I Subdivision-aware
I Subdivsion increases qualityI Problem
I Good heuristic for points of thecontrol mesh
I Invalid for some edges/faces ofthe convex hull
0
⅓ ⅔
1
t = 0.75
Surface Rendering 10 / 21
Trimming: Algorithm Overview
I Ray casting in parameter domain
I Similar to point-in-polygon test
I Bezier form provides exactrepresentation of NURBS curves
I Accurate intersection computationusing Bezier Clipping
odd
odd
even
Trimming 11 / 21
Bezier Clipping
I Numerical root finding algorithm (subdivision)
I Makes use of the convex hull property
u
d2
d0
d3
d1
v
td1
d
d0
d2
d3
⅔
⅓
1
I Transformation into local equidistant coordinate system,invariant with respect to the intersection points
Trimming 12 / 21
Bezier Clipping (cont.)
t
d
t
d
tmax
tmin
I Compute convex hull intersections with t-axis
I Split curve at tmin and tmax (”clipping”)
I Interval contraction driven by clipping and subdivision