stefan roettger university of stuttgart a two-step approach for interactive pre-integrated volume...

25
Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids Stefan Roettger and Thomas Ertl VIS Group University of Stuttgart

Upload: lindsay-wilkins

Post on 27-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

A Two-Step Approach forInteractive Pre-Integrated Volume

Renderingof Unstructured Grids

Stefan Roettger and Thomas Ertl

VIS Group

University of Stuttgart

Page 2: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

Outline of the Talk

• Introduction to Unstructured Volume Rendering• Previous 3D Texturing Approach• Drawbacks

• First Step: Hardware-Accelerated Pre-Integration• Second Step: 2D Ray Integral Reparametrization

• Results for each step• Conclusion

Page 3: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

Unstructured Volume Rendering

• Given an irregular data set that consists of volumetric cells (typically from FEM simulation)

• How can the volume be displayed accurately?

• Numerous approaches:– Ray casting– Ray tracing– Sweep plane algorithms (e.g. ZSWEEP)– PT algorithm of Shirley and Tuchman

Page 4: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

PT algorithm of Shirley and Tuchman

• Decompose each cell into tetrahedra

• Sort the tetrahedra in a back to front fashion

• Project each tetrahedron and render its decomposition into 3 or 4 triangles

Two different non-degenerateclasses of the projected tetrahedra

Page 5: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

Volume Density Optical Model

• For the Volume Density Optical Model of Williams et al. the emission and absorption along a light ray is defined by the transfer functions (f(x,y,z)) and (f(x,y,z)) with f(x,y,z) being the scalar function

• Usually the transfer functions are given as a linear or piecewise linear function, or as a lookup table

Page 6: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

Composing of the Tetrahedra

• For each rendered pixel the ray integral of the corresponding ray segment has to be computed

• Observation: The ray integral depends only on Sf, Sb, and l for the Volume Density Optical Model of Williams et al.

Page 7: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

3D Texturing Approach

• Compute the three-dimensional ray integral by numerical integration and store the integrated chromaticity and opacity in a 3D texture

• Assign appropriate texture coords (Sf,Sb,l) to the projected vertices of each tetrahedron

Page 8: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

Pros / Cons

• Pros:– Object order method– Hardware-accelerated approach– Per-pixel exact rendering

• Cons:– 3D textures not available everywhere– 3D textures are SLOW– Numerical integration can take several minutes

interactive updates not possible yet

Page 9: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

First Step

• Goal: Accelerate pre-integration of the ray integral with graphics hardware!

Page 10: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

Setup of 3D Texture

• Numerical Pre-Integration:

iterate over l iterate over Sb

iterate over Sf

chromaticity C0=0 transparency T0=1 iterate over #steps (i=0...n-1) S=(1-i/(n-1))Sb+i/(n-1)Sf

compute emission=(S)*l/(n-1) compute absorption=exp(-(S)*l/(n-1)) Ci+1=Ci*absorption+emission Ti+1=Ti*absorption

Tex3D(Sf,Sb,l)=(Cn-1,1-Tn-1)

Page 11: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

Hardware-Accelerated Pre-Integration

• Hardware-Accelerated Pre-Integration means that the numerical pre-integration is accelerated by the graphics hardware:

• Compute one slice of the 3D texture for l=const in parallel using the graphics hardware

• Store transfer function in 1D texture with Tex1D(s)=((s)l/(n-1),exp(-(s)l/(n-1)))

• Render n slices into frame buffer with the following setup for the 1D texture coordinate s:

Page 12: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

Hardware-Accelerated Pre-Integration

• Setup for the 1D texture coordinate s:

Page 13: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

Hardware-Accelerated Pre-Integration

• Speed Results on an SGI Octane MXI with 250 MHz MIPS R10k processor:

Page 14: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

Hardware-Accelerated Pre-Integration

• Quantization artifacts due to 12/8 bits of accuray:

Page 15: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

Second Step

• Goal: Replace 3D with 2D texturing approach

• 2D-Reparametrization of the Ray Integral means that in cylinder coordinates the three-dimensional ray integral reduces to a two-dimensional ray integral for each tetrahedron.

• Claim: All the rasterized pixels of a tetrahedron lie on a plane in texture coordinate space

Page 16: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

2D-Reparametrization of the Ray Integral

• Proof: The texture coordinates of the thick vertex are (Sf,Sb,l) but for a silhouette vertex the texture coordinates are just (Sb,Sb,0).

Page 17: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

2D-Reparametrization of the Ray Integral

• The front diagonal is the cylinder axis and the thick vertex defines the rotational parameter .

Page 18: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

2D-Reparametrization of the Ray Integral

• The 3D texture is resampled by a set of planes with different

• To yield uniform slices each plane is projected onto the nearest base plane with =0,90, or 180

• Then the ray integral can be reconstructed for each tetrahedron from the corresponding two planes with the nearest using two-pass multi-texturing

Page 19: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

2D-Reparametrization of the Ray Integral

• The resampling of the 3D texture is performed with the following mapping:

Page 20: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

2D-Reparametrization of the Ray Integral

• For each tetrahedron the 3D texture coordinates of the thick vertex are transformed as follows:

• For a silhouette vertex this reduces to (0,Sb)

Page 21: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

2D-Reparametrization of the Ray Integral

• Example:

8 slices of a 64^3 3D texture

Corresponding polarized textures

Transfer function

Page 22: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

2D-Reparametrization of the Ray Integral

• Spherical distance volume rendered with the previous 2D texture map and a bonsai tree:

Page 23: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

2D-Reparametrization of the Ray Integral

• Performance comparison between 3D and 2D texture mapping:

Page 24: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

Conclusion

• Pre-Integrated Unstructured Volume Rendering improved for practical application:

• Update rate of the transfer function was increased by almost a factor of hundred comfortable exploration of unstructured data sets by changing the transfer functions interactively

• 2D texture mapping approach allows faster rasterization and application on a broader range of graphics accelerators (e.g. on this iBook)

Page 25: Stefan Roettger University of Stuttgart A Two-Step Approach for Interactive Pre-Integrated Volume Rendering of Unstructured Grids VolVis '02 A Two-Step

Stefan RoettgerUniversity of Stuttgart

A Two-Step Approach for Interactive Pre-IntegratedVolume Rendering of Unstructured GridsVolVis '02

Thank You!!!

Questions?