real-time volume graphics [03] gpu-based volume rendering

27
REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Real-Time Volume Graphics [03] GPU-Based Volume Rendering

Upload: risa

Post on 19-Jan-2016

46 views

Category:

Documents


4 download

DESCRIPTION

Real-Time Volume Graphics [03] GPU-Based Volume Rendering. Volume Rendering. Image order approach:. Data Set. Image Plane. Eye. For each pixel { calculate color of the pixel }. Volume Rendering. Image order approach:. Object order approach:. Data Set. Image Plane. Eye. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Real-Time Volume Graphics

[03] GPU-Based Volume Rendering

Page 2: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Volume Rendering

Image Plane

Image order approach:

For each pixel {

calculate color of the pixel

}

Data Set

Eye

Page 3: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Volume Rendering

Image Plane

Image order approach:

For each slice {

calculate contribution to the image

}

Data Set

Eye

Object order approach:

For each pixel {

calculate color of the pixel

}

Page 4: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Texture-based Approaches

Proxy geometry (Polygonal Slices)

No volumetric hardware-primitives!

Page 5: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

How does a texture work?

Texture

R G B A

For each fragment:interpolate the

texture coordinates(barycentric)

Texture-Lookup:interpolate thetexture color(bilinear)

Page 6: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

2D Textures

Decompostition into axis-aligned slices

Draw the volume as a stack of 2D texturesBilinear Interpolation in Hardware

3 copies of the data set in memory

Page 7: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Implementation

Page 8: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Implementation

Page 9: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Fragment Program

We assume here that the RGBA texture already contains emission/absoption coefficients.

Transfer functions are discussed later

Page 10: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Compositing

The standard alpha blending causes color bleeding!

Vertex A:

Vertex B:

Vertex C:

RGBA = (1,0,0,1)

RGBA = (0,0,1,1)

RGBA = (0,1,0,1)

RGBA = (1,0,0,0)

RGBA = (0,0,1,1)

RGBA = (0,1,0,0)

Solution: Associated Colors:

RGB values must be pre-multiplied by opacity A!

RGBA = (0,0,0,0)

RGBA = (0,0,1,1)

RGBA = (0,0,0,0)

Page 11: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Compositing

Maximum Intensity ProjectionNo emission/absorptionSimply compute maximum value along a ray

Page 12: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Compositing

Emission/Absorption Maximum Intensity Projection

Page 13: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

2D Textures: Drawbacks

Sampling rate is inconsistent

dd´ ≠ d

Emission/absorption slightly incorrectSuper-sampling on-the-fly impossible

Page 14: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

3D Textures

R G B A

R

GB

For each fragment:interpolate the

texture coordinates(barycentric)

Texture-Lookup:interpolate thetexture color(trilinear)

Don‘t be confused: 3D textures are not volumetric rendering primitives!

Only planar polygons are supported as rendering primitives.

Page 15: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

3D Textures

Slices parallel to the image plane

3D Texture: Volumetric Texture ObjectTrilinear Interpolation in Hardware

One large texture block in memory

Page 16: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Resampling via 3D Textures

Sampling rate is constant

d d

Supersampling by increasing thenumber of slices

Page 17: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Bricking

What happens if data set is too large to fit into local video memory?

Divide the data set intosmaller chunks (bricks)

One plane of voxels must be duplicated toenable correct interpolation across brick boundaries

incorrect interpolation!

Page 18: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

GPU

Bus

Bricking

What happens if data set is too large to fit into local video memory?

Divide the data set intosmaller chunks (bricks)

Problem: Bus-BandwidthProblem: Bus-Bandwidth

Unbalanced Load for GPU und Memory Bus

transfer brick Transfer brick

drawdraw

TimeInefficient!

Page 19: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Bricking

What happens if data set is too large to fit into local video memory?

Divide the data set intosmaller chunks (bricks)

Problem: Bus-BandwidthProblem: Bus-Bandwidth

Keep the bricks small enough! More than one brick must fit into video memory !

Transfer and Rendering can be performed in parallel Increased CPU load for intersection calculation! Effective load balancing still very difficult!

Page 20: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Cube-Slice Intersection

Question: Can we compute this in a vertex program?

Vertex program: Input: 6 Vertices Output: 6 Vertices

P0: Intersection with red path

P2: Intersection with green path

P4: Intersection with blue path

P1: Intersection with dotted red edge or P0

P3: Intersection with dotted green edge or P1

P5: Intersection with dotted blue edge or P2

Page 21: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Back to 2D Textures

fixed number of object aligned slicesvisual artifacts due to bilinear interpolation

Utilize Multi-Textures (2 textures per polygon) to implement trilinear interpolation!

Page 22: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Bilinear Interpolation by 2D Texture Unit

2D Multi-Textures

Axis-Aligned Slices

Trilinear Interpolation

Blending of two adjacent slice images

Page 23: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Implementation

Page 24: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Implementation

Page 25: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

2D Multi-Textures

Sampling rate is constant

Supersampling by increasing thenumber of slices

dd

Page 26: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

More efficient load balancing

GPU

Bus

Advantages

transfer

draw

transfer transfer

draw

transfer

draw

Exploit the GPU and the available memory bandwidth in parallelTransfer the smallest amount of information required to draw the slice image!

Significanly higher performance, although 3 copies of the data set in main memory

time

Page 27: Real-Time Volume Graphics [03] GPU-Based         Volume Rendering

REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Summary

Rasterization Approaches for Direct Volume Rendering2D Texture Based Approaches

3 fixed stacks of object aligned slicesVisual artifacts due to bilinear interpolation onlyNo supersampling

3D Texture Based ApproachesViewport aligned slicesSupersampling with trilinear interpolationBricking: Bus transfer inefficient for large volumes

2D Texture Based Approaches3 variable stacks of object aligned slicesSupersampling with Trilinear interpolation Higher performance for larger volumes