A Simple Memory-Insensitive Technique X , Y , Z Data 0 0 0 X , Y , Z n 1 1 1 vertices Dereferenced X , Y , Z n n n Sampling I , I , I , I 00 01 03 02 I , I , I , I Sorted t 10 11 12 13 tetrahedra Compose I , I , I , I t0 t3 t1 t2 Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Data XYZ XYZ XYZ XYZ 00 01 02 03 XYZ XYZ XYZ XYZ Dereferenced 10 11 12 13 Sampling XYZ XYZ XYZ XYZ t0 t1 t2 t3 Sorted Compose Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Data Dereferenced Pix Z Alpha 0 Pix Z Alpha Sampling 1 Sorted Pix Z Alpha P Compose Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Data Dereferenced Pix Z Alpha 0` Pix Z Alpha Sampling 1` Sorted Pix Z Alpha P` Compose Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Data Dereferenced Projected Sorted Compose Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Features of Memory-Insensitive Algorithm • Dataset can be arbitrarily large • Easily to implement • Cell intersection code • Sample Integration code • External Memory sort • Transfer function modifications for same viewpoint are fast! (also for time-varying data) Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Complexity Analysis N-by-N pixels c cells Number of Intersections: O(c N 2 ) 1. Time: sorting intersections takes too long! Problems: 2. Memory: storage too high! Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Sorting Application Object-Space Sorting Rasterization Image-Space Sorting Display Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Approximate Object-Space Sorting 1 Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
1 2 Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
3 1 2 Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
3 5 1 4 2 Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
3 6 7 5 1 4 2 Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
3 7 6 5 1 4 2 A Solution: Use an insertion Use an insertion- -sort A sort A- -buffer! buffer! A Solution: Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
3 7 6 5 1 4 2 What about the space problem space problem ? ? What about the � Use a conservative bound on the intersections � Use a conservative bound on the intersections Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
ZSWEEP: Sort in Image and Object Space Do an approximate sorting of the cells (e.g., based on the order of the vertices), and use an insertion sort for the intersections – solves the sorting overhead Propose a conservative technique for limiting the memory usage, by performing compositing on the intersections, anytime the lists become “too large” – solves the memory overhead Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
ZSWEEP - DEMO Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Blocking for Out-Of-Core Rendering Meta- -cell cell Meta Chiang, Silva, Schroeder 1998 Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Out-Of-Core ZSWEEP: Data Management [Farias Farias and Silva 2001a] and Silva 2001a] [ dump B fetch B Meta-cell dump A Sweep Plane Event: fetch A Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Tile-Based ZSWEEP SGI R10K L2 – 2MB ZSWEEP: 56% hit rate TB-ZSWEEP: 94% hit rate Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Out-Of-Core ZSWEEP Results Generating 2048x2048 Image (sec) Original ZSWEEP OOC-ZSWEEP Memory Time Memory Time Blunt Fin 330 331 386 6.2 Combustion Chamber 330 407 423 6.2 Oxygen Post 350 775 667 13.2 Delta Wing 380 639 24.2 537 Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Video QuickTime™ and a Photo decompressor are needed to see this picture. Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Outline • Introduction to Volume Rendering • Out-Of-Core Techniques • Introduction to External Memory Algorithms • Isosurface Generation • Direct Volume Rendering • Hardware-Assisted Techniques • Introduction to Programmable Hardware • Direct Volume Rendering • Isosurface Generation (remarks) Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Hardware-Assisted Volume Rendering • Introduction to Programmable Hardware • Texture-Based Volume Rendering • Rendering Unstructured Grids Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Introduction to Programmable Hardware • Graphics Pipeline • Programmable Graphics Pipeline Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Graphics Pipeline Joao Comba, UFRGS 3D Application or Game 3D API commands 3D API: OpenGL or Direct 3D Vertices Colored Pixel Transformed Fragments Fragments Updates Vertices Vertex Primitive Assembly Fragment Texturing Raster FB Transformation and Rasterization and Coloring Operations Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Graphics Pipeline Joao Comba, UFRGS glBegin(GL_TRIANGLES); 3D Application glVertex3f(0.0,0.0,0.0); or Game glVertex3f(1.0,0.0,0.0); 3D API commands glVertex3f(0.5,1.0,0.0); 3D API: ... OpenGL or glEnd(); Direct 3D Vertices Colored Pixel Transformed Fragments Fragments Updates Vertices Vertex Primitive Assembly Fragment Texturing Raster FB Transformation and Rasterization and Coloring Operations Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Graphics Pipeline Joao Comba, UFRGS 1 3D Application or Game 3D API commands 4 2 3D API: OpenGL or Direct 3D Vertices 3 Colored Pixel Transformed Fragments Fragments Updates Vertices Vertex Primitive Assembly Fragment Texturing Raster FB Transformation and Rasterization and Coloring Operations Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Graphics Pipeline Joao Comba, UFRGS 1 3D Application or Game 3D API commands 4 2 3D API: OpenGL or Direct 3D 4 Vertices 3 3 1 1 2 3 Colored Pixel Transformed Fragments Fragments Updates Vertices Vertex Primitive Assembly Fragment Texturing Raster FB Transformation and Rasterization and Coloring Operations Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Graphics Pipeline Joao Comba, UFRGS 3D Application or Game 3D API commands 3D API: OpenGL or Direct 3D 4 Vertices 3 1 1 2 3 Colored Pixel Transformed Fragments Fragments Updates Vertices Primitive Assembly Fragment Texturing Raster Vertex FB and Rasterization and Coloring Operations Transformation Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Graphics Pipeline Joao Comba, UFRGS 3D Application or Game 3D API commands 3D API: OpenGL or Direct 3D Vertices 4 2 3 1 3 Colored Pixel Transformed Fragments Fragments Updates Vertices Primitive Assembly Fragment Texturing Raster Vertex FB and Rasterization and Coloring Operations Transformation 1’ Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Graphics Pipeline Joao Comba, UFRGS 3D Application or Game 3D API commands 3D API: OpenGL or Direct 3D Vertices 3 1 3 4 Colored Pixel Transformed Fragments Fragments Updates Vertices Primitive Assembly Fragment Texturing Raster Vertex FB and Rasterization and Coloring Operations Transformation 2’ 1’ Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Graphics Pipeline Joao Comba, UFRGS 3D Application or Game 3D API commands 3D API: OpenGL or Direct 3D Vertices 1 3 4 Colored Pixel Transformed Fragments Fragments Updates Vertices Primitive Assembly Fragment Texturing Raster Vertex FB and Rasterization and Coloring Operations Transformation 3’ 2’ 1’ Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Graphics Pipeline Joao Comba, UFRGS 1’ 3D Application or Game 3D API commands 2’ 3D API: OpenGL or Direct 3D Vertices 3’ 1 3 4 Colored Pixel Transformed Fragments Fragments Updates Vertices Vertex Primitive Assembly Fragment Texturing Raster FB Transformation and Rasterization and Coloring Operations Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Graphics Pipeline Joao Comba, UFRGS 1’ 3D Application or Game 3D API commands 2’ 3D API: OpenGL or Direct 3D Vertices 3’ 1 3 4 Colored Pixel Transformed Fragments Fragments Updates Vertices Vertex Primitive Assembly Fragment Texturing Raster FB Transformation and Rasterization and Coloring Operations Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Graphics Pipeline Joao Comba, UFRGS 3D Application or Game 3D API commands 3D API: OpenGL or Direct 3D Vertices Colored 3 4 Pixel Fragments Transformed Fragments Updates Vertices Vertex Primitive Assembly Fragment Texturing Raster FB Transformation and Rasterization and Coloring Operations 1’ Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Graphics Pipeline Joao Comba, UFRGS 3D Application or Game 3D API commands 3D API: OpenGL or Direct 3D Vertices Colored 4 Pixel Fragments Transformed Fragments Updates Vertices Vertex Primitive Assembly Fragment Texturing Raster FB Transformation and Rasterization and Coloring Operations 3’ 1’ Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Graphics Pipeline Joao Comba, UFRGS 3D Application or Game 3D API commands 3D API: OpenGL or Direct 3D Vertices Colored Pixel Fragments Transformed Fragments Updates Vertices Vertex Primitive Assembly Fragment Texturing Raster FB Transformation and Rasterization and Coloring Operations 4’ 3’ 1’ Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Graphics Pipeline Joao Comba, UFRGS 3D Application or Game 3D API commands 3D API: OpenGL or Direct 3D Vertices Colored Pixel Transformed Fragments Fragments Updates Vertices Vertex Primitive Assembly Fragment Texturing Raster FB Transformation and Rasterization and Coloring Operations Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Graphics Pipeline Joao Comba, UFRGS 3D Application or Game 3D API commands 3D API: OpenGL or Direct 3D Vertices Colored Pixel Transformed Fragments Fragments Updates Vertices Vertex Primitive Assembly Fragment Texturing Raster FB Transformation and Rasterization and Coloring Operations Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Graphics Pipeline Joao Comba, UFRGS 3D Application or Game 3D API commands 3D API: OpenGL or Direct 3D Vertices Colored Pixel Transformed Fragments Fragments Updates Vertices Vertex Primitive Assembly Fragment Texturing Raster FB Transformation and Rasterization and Coloring Operations Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Graphics Pipeline Joao Comba, UFRGS 3D Application or Game 3D API commands 3D API: OpenGL or Direct 3D Vertices Colored Pixel Transformed Fragments Fragments Updates Vertices Vertex Primitive Assembly Fragment Texturing Raster FB Transformation and Rasterization and Coloring Operations Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Graphics Pipeline: Parallelization Joao Comba, UFRGS 3D Application or Game 3D API commands 3D API: OpenGL or Direct 3D Vertices Colored Pixel Transformed Fragments Fragments Updates Vertices 1 Vertex Primitive Assembly Fragment Texturing Raster FB Transformation and Rasterization and Coloring Operations 2 Vertex Transformation 3 Vertex Transformation Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Graphics Pipeline: Parallelization Joao Comba, UFRGS 3D Application or Game 3D API commands 3D API: OpenGL or Direct 3D Vertices Transformed Colored Pixel Vertices Fragments Fragments Updates 1’ Vertex Primitive Assembly Fragment Texturing Raster FB Transformation and Rasterization and Coloring Operations 2’ Vertex Transformation 3’ Vertex Transformation Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Graphics Pipeline: Parallelization Joao Comba, UFRGS 3D Application or Game 3D API commands Fragment Texturing 3D API: and Coloring OpenGL or Direct 3D Fragment Texturing and Coloring Vertices Fragment Texturing Pixel Colored Transformed Fragments and Coloring Fragments Updates Vertices Fragment Texturing Raster Vertex Primitive Assembly FB Operations and Coloring Transformation and Rasterization Fragment Texturing and Coloring Fragment Texturing and Coloring Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Graphics Pipeline: Parallelization Joao Comba, UFRGS 3D Application or Game 3D API commands Fragment Texturing 3D API: and Coloring OpenGL or Direct 3D Fragment Texturing and Coloring Vertices Fragment Texturing Pixel Colored Transformed Fragments and Coloring Fragments Updates Vertices Fragment Texturing Raster Vertex Primitive Assembly FB Operations and Coloring Transformation and Rasterization Fragment Texturing and Coloring Fragment Texturing and Coloring Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Programmable Graphics Pipeline Joao Comba, UFRGS 3D Application or Game 3D API commands 3D API: OpenGL or Direct 3D CPU – GPU Boundary Vertices Colored Pixel Transformed Fragments Fragments Updates Vertices Vertex Primitive Assembly Fragment Texturing Raster FB Transformation and Rasterization and Coloring Operations Programmable Program Vertex Processor Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Programmable Graphics Pipeline Joao Comba, UFRGS 3D Application or Game 3D API commands 3D API: OpenGL or Direct 3D CPU – GPU Boundary Vertices Colored Pixel Transformed Fragments Fragments Updates Vertices Primitive Assembly Fragment Texturing Raster FB and Rasterization and Coloring Operations Vertex Processor Program Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Programmable Graphics Pipeline Joao Comba, UFRGS 3D Application or Game 3D API commands 3D API: OpenGL or Direct 3D CPU – GPU Boundary Vertices Colored Pixel Transformed Fragments Fragments Updates Vertices Fragment Texturing Primitive Assembly Raster FB and Rasterization and Coloring Operations Vertex Processor Programmable Fragment Processor Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah Program
Programmable Graphics Pipeline Joao Comba, UFRGS 3D Application or Game 3D API commands 3D API: OpenGL or Direct 3D CPU – GPU Boundary Vertices Colored Pixel Transformed Fragments Fragments Updates Vertices Raster Primitive Assembly FB Operations and Rasterization Fragment Vertex Processor Processor Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah Program
Programmable Graphics Pipeline Joao Comba, UFRGS 3D Application or Game 3D API commands 3D API: OpenGL or Direct 3D CPU – GPU Boundary Vertices Colored Pixel Transformed Fragments Fragments Updates Vertices Fragment Processor Raster Primitive Assembly FB Operations and Rasterization Fragment Processor Vertex Processor Fragment Processor Fragment Processor Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah Program
Graphics Pipeline: The Big Picture Joao Comba, UFRGS 3D Application or Game 3D API commands 3D API: OpenGL or Direct 3D CPU – GPU Boundary Vertices Colored Pixel Transformed Fragments Fragments Updates Vertices Raster Primitive Assembly FB Operations and Rasterization Fragment Processor Vertex Processor Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Graphics Pipeline: The Big Picture Joao Comba, UFRGS 3D Application GPU is a stream processor or Game • Multiple programmable processing 3D API commands units 3D API: • Connected by data flows OpenGL or Direct 3D CPU – GPU Boundary Vertices Colored Pixel Transformed Fragments Fragments Updates Vertices Raster Primitive Assembly FB Operations and Rasterization Fragment Vertex Processor Processor Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Programmable Graphics Pipeline Joao Comba, UFRGS 3D Application or Game 3D API commands 3D API: OpenGL or Direct 3D CPU – GPU Boundary Vertices Colored Pixel Transformed Fragments Fragments Updates Vertices Primitive Assembly Fragment Texturing Raster FB Vertex Processor and Rasterization and Coloring Operations Vertex Processor Vertex Processor Program Vertex Processor Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Texture-Based Volume Rendering Slice Rendering of Decom position Final I m age textures slices (Proxy Geometry) Trilinear Com positing Hardw are ( Blending) I nterpolation Rezk-Salama Visualization 2002 Tutorial Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Rendering Unstructured Grids Brian Wylie, Sandia CPU GPU Cell Contribution Visibility Sort Programmable for each cell in order Hardware find thickest Software model with cell distance decompose millions of cells to triangles compute compute each cell’s screen triangle’s projection parameters graphics card final image of model PC (CPU) Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Visibility Sorting B 7 5 6 A 3 4 2 p 1 A < B p Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Williams’ MPVO Idea: Define ordering relations B < A by looking at shared faces. A < C B < E D D C < E C < D C C A A F F E < F B B D < F E E Viewing direction Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Shirley-Tuchman (ST) Algorithm Brian Wylie, Sandia Class 1 Class 2 Class 3 Class 4 Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Wylie et al’s GPU-based ST Brian Wylie, Sandia Moves all of the following functions from the CPU the GPU: • Transform to screen space • Determine projection class • Calculate thick vertex location • Determine depth at thick vertex • Compute color and opacity for thick vertex • Apply exponential attenuation texture Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
GPU Limitations Brian Wylie, Sandia � Each instance of a vertex shader program works independently on a single vertex in SIMD fashion � No support dynamic vertex creation or topology modification within the vertex program � No branching � No knowledge of neighboring vertices � Cannot change execution based on past information Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Idea: Morph a Canonical Graph Brian Wylie, Sandia V 2 ’ V 4 ’ V 3 ’ V 1 ’ V 0 ’ Basis Graph Isomorphic to all projection cases Example later… Scientific Computing and Imaging Institute, University of Utah Scientific Computing and Imaging Institute, University of Utah
Recommend
More recommend