gpu construction and transparent gpu construction and
play

GPU Construction and Transparent GPU Construction and Transparent - PowerPoint PPT Presentation

GPU Construction and Transparent GPU Construction and Transparent Rendering of Iso-Surfaces Rendering of Iso-Surfaces Peter Kipfer Peter Kipfer Rdiger Westermann Rdiger Westermann computer graphics & visualization computer graphics


  1. GPU Construction and Transparent GPU Construction and Transparent Rendering of Iso-Surfaces Rendering of Iso-Surfaces Peter Kipfer Peter Kipfer Rüdiger Westermann Rüdiger Westermann computer graphics & visualization computer graphics & visualization Vision, Modeling and Visualization 2005, Erlangen Vision, Modeling and Visualization 2005, Erlangen P. Kipfer – Computer Graphics and Visualization Group P. Kipfer – Computer Graphics and Visualization Group

  2. Introduction Introduction - Indirect volume visualization: display of an iso Indirect volume visualization: display of an iso surface surface - Fragment-based Fragment-based direct volume rendering direct volume rendering with special transfer with special transfer function for immediate function for immediate display display - Geometry-based Geometry-based compute level set inside compute level set inside grid cell and store for grid cell and store for further processing and display further processing and display Vision, Modeling and Visualization 2005, Erlangen Vision, Modeling and Visualization 2005, Erlangen P. Kipfer – Computer Graphics and Visualization Group P. Kipfer – Computer Graphics and Visualization Group computer graphics & visualization

  3. Previous work Previous work Marching tetrahedra for indirect volume rendering Marching tetrahedra for indirect volume rendering Works for all grids by splitting other element types Works for all grids by splitting other element types Simple classification with less cases than marching cubes Simple classification with less cases than marching cubes Only first order approximation of level set Only first order approximation of level set More elements More elements  Perform extraction on the GPU Perform extraction on the GPU  Avoids bus transfer bottleneck and exploits memory Avoids bus transfer bottleneck and exploits memory bandwidth and parallelism for interactive rendering bandwidth and parallelism for interactive rendering  Expect a speedup ! Expect a speedup ! Vision, Modeling and Visualization 2005, Erlangen Vision, Modeling and Visualization 2005, Erlangen P. Kipfer – Computer Graphics and Visualization Group P. Kipfer – Computer Graphics and Visualization Group computer graphics & visualization

  4. Previous GPU work Previous GPU work Implementation of the element classification Implementation of the element classification - in the vertex shader in the vertex shader [Reck et al. 2004] [Reck et al. 2004] compatible with CPU acceleration structures compatible with CPU acceleration structures send all element data all the times send all element data all the times - in the fragment shader in the fragment shader [Klein et al. 2004] [Klein et al. 2004] more compute power and memory bandwidth more compute power and memory bandwidth allows to store the surface vertices using OpenGL allows to store the surface vertices using OpenGL SuperBuffers SuperBuffers interpolation of vertex attributes very expensive interpolation of vertex attributes very expensive hardware restrictions (shader length) hardware restrictions (shader length) no acceleration structures no acceleration structures Vision, Modeling and Visualization 2005, Erlangen Vision, Modeling and Visualization 2005, Erlangen P. Kipfer – Computer Graphics and Visualization Group P. Kipfer – Computer Graphics and Visualization Group computer graphics & visualization

  5. Marching Tetrahedra revisited Marching Tetrahedra revisited Classic approach: element-centric classification Classic approach: element-centric classification 1. mark element vertices wrt. iso value 1. mark element vertices wrt. iso value 2. lookup intersected edges according to marker 2. lookup intersected edges according to marker 3. interpolate surface position along selected edges 3. interpolate surface position along selected edges  To avoid redundant interpolations, needs to store To avoid redundant interpolations, needs to store and access intermediate results and access intermediate results  On GPUs, vertex/fragment processing is On GPUs, vertex/fragment processing is independent independent  Repeated classification and interpolation Repeated classification and interpolation Vision, Modeling and Visualization 2005, Erlangen Vision, Modeling and Visualization 2005, Erlangen P. Kipfer – Computer Graphics and Visualization Group P. Kipfer – Computer Graphics and Visualization Group computer graphics & visualization

  6. Marching Tetrahedra revisited Marching Tetrahedra revisited New approach: edge-based processing New approach: edge-based processing v 0 v 0 e 0 e e 2 e 0 2 e 1 e 1 v 1 v 1 e 4 e v 3 v 4 3 e 3 e e 5 e 3 5 three four three three four three v 2 v intersections intersections intersections intersections intersections intersections 2 v 0 ≤ ≤ v v 1 ≤ ≤ v v 2 ≤ ≤ v v 3 ≤ ≤ v v 4 v 0 1 2 3 4 - Surface uniquely defined by edge intersections Surface uniquely defined by edge intersections - If vertices are sorted, element is implicitly classified If vertices are sorted, element is implicitly classified by intersection status of edge e 3 by intersection status of edge e 3 Vision, Modeling and Visualization 2005, Erlangen Vision, Modeling and Visualization 2005, Erlangen P. Kipfer – Computer Graphics and Visualization Group P. Kipfer – Computer Graphics and Visualization Group computer graphics & visualization

  7. Pass 1: Geometry (interpolation) Pass 1: Geometry (interpolation) fixed point floating point floating point fixed point floating point floating point other other other other edges e 3 edges e 3 edges e edges e edges edges edges edges 3 3 edges vertices interpolated edges vertices interpolated intersections intersections - Compute intersection along each edge and mark Compute intersection along each edge and mark iso value smaller than v 1 iso value smaller than v -1 -1 1 valid intersection between v 1 and v 2 valid intersection between v 1 and v [0;1] [0;1] 2 iso value larger than v 2 iso value larger than v -2 -2 2 Vision, Modeling and Visualization 2005, Erlangen Vision, Modeling and Visualization 2005, Erlangen P. Kipfer – Computer Graphics and Visualization Group P. Kipfer – Computer Graphics and Visualization Group computer graphics & visualization

  8. Pass 1: Geometry (interpolation) Pass 1: Geometry (interpolation) - Simple and short shader code Simple and short shader code edge = tex2D(Edges,TCoord[0]); edge = tex2D(Edges,TCoord[0]); v0 = tex2D(Vertices,edge.xy); v0 = tex2D(Vertices,edge.xy); v1 = tex2D(Vertices,edge.zw); v1 = tex2D(Vertices,edge.zw); // we know that v0 has smaller scalar (stored in w comp.) // we know that v0 has smaller scalar (stored in w comp.) d = max(v1.w - v0.w, epsilon); d = max(v1.w - v0.w, epsilon); i = clamp((Iso - v0.w) / d); i = clamp((Iso - v0.w) / d); result = lerp(v0,v1,i); result = lerp(v0,v1,i); if (Iso > v1.w) result.w = -2; if (Iso > v1.w) result.w = -2; else if (Iso < v0.w) result.w = -1; else if (Iso < v0.w) result.w = -1; else result.w = i; else result.w = i; Vision, Modeling and Visualization 2005, Erlangen Vision, Modeling and Visualization 2005, Erlangen P. Kipfer – Computer Graphics and Visualization Group P. Kipfer – Computer Graphics and Visualization Group computer graphics & visualization

  9. Pass 2: Topology (global indices) Pass 2: Topology (global indices) fixed point fixed point floating point fixed point fixed point fixed point floating point fixed point other other edges e 3 edges e edges edges 3 global index maps interpolated global indices global index maps interpolated global indices intersections intersections - Fetch global indices according to local index Fetch global indices according to local index triangle-quad [ 0 1 2 2 ] triangle-quad marker = -1 : marker = -1 : [ 0 1 2 2 ] quad [ 1 2 3 4 ] quad marker in [0;1] : marker in [0;1] : [ 1 2 3 4 ] triangle-quad [ 2 2 4 5 ] triangle-quad marker = -2 : marker = -2 : [ 2 2 4 5 ] Vision, Modeling and Visualization 2005, Erlangen Vision, Modeling and Visualization 2005, Erlangen P. Kipfer – Computer Graphics and Visualization Group P. Kipfer – Computer Graphics and Visualization Group computer graphics & visualization

Recommend


More recommend