real-time volume graphics [06] local volume illumination

28
REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006 Real-Time Volume Graphics [06] Local Volume Illumination

Upload: tori

Post on 11-Jan-2016

40 views

Category:

Documents


1 download

DESCRIPTION

Real-Time Volume Graphics [06] Local Volume Illumination. Volume Illumination. Up until now: Light was emitted by the volume Now: Illumination from external light sources. Types of Volume Illumination. Single scattering with attenuation. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Real-Time Volume Graphics [06] Local Volume Illumination

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

Real-Time Volume Graphics

[06] Local Volume Illumination

Page 2: Real-Time Volume Graphics [06] Local Volume Illumination

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

Single scattering with attenuation.

Light is attenuated along ist way through the volume (Volumetric shadows)

Light is scattered once before it reaches the eye

Multiple scattering

Light is scattered multiple times before it reaches the eye (Global illumination)

Single scattering, no attenuation.

Light reaches every point unimpededly

Light is scattered once before it reaches the eye

Not physically plausible

Volume Illumination

Up until now: Light was emitted by the volumeNow: Illumination from external light sources

Types of Volume Illumination

Page 3: Real-Time Volume Graphics [06] Local Volume Illumination

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

Single Scattering

Local illumination, similar to surface lighting

Lambertian reflection(light is reflected equally in all directions)Perfect mirror reflection(light is reflected in exactly one direction)Specular reflection(light is reflected scattered around the direction of perfect reflection)

Page 4: Real-Time Volume Graphics [06] Local Volume Illumination

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

l

Diffuse Term (Lambertian reflection)

Blinn/Phong Illumination

n

Page 5: Real-Time Volume Graphics [06] Local Volume Illumination

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

l

Phong Illumination

nr

v

Specular Term (view-dependent)

Page 6: Real-Time Volume Graphics [06] Local Volume Illumination

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

l

Blinn/Phong Illumination

n h

v

Specular Term (view-dependent)

r

Phong Illumination

Page 7: Real-Time Volume Graphics [06] Local Volume Illumination

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

Blinn/Phong Illumination

Ambient Term (constant illumination)

lightens up the shadows, also decreases the contrast!

Example images taken from Jeremy Birn: Digital Lighting & Rendering,New Riders Publishing, 2000

Consider using a fill lightinstead of ambient light!

Page 8: Real-Time Volume Graphics [06] Local Volume Illumination

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

Local Illumination

Surface lighting: Light is reflected at surfacesVolume lighting: Light is scattered at isosurfaces

Isosurfaces

Isosurface extraction not required!We only need the normal vectorNormal vector of isosurface is equal to (normalized) gradient vector

Page 9: Real-Time Volume Graphics [06] Local Volume Illumination

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

Gradient Estimation

The gradient vector is the first-order derivative of the scalar field

We can estimate the gradient vector using finite differencing schemes

partial derivative

in x-direction

partial derivative

in y-direction

partial derivative

in z-direction

Page 10: Real-Time Volume Graphics [06] Local Volume Illumination

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

Finite Differences

Taylor expansion:

Backward Difference:

Forward Difference:

Page 11: Real-Time Volume Graphics [06] Local Volume Illumination

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

Finite Differences

Central Difference:

Gradient Approximation using Central Differences:

Page 12: Real-Time Volume Graphics [06] Local Volume Illumination

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

Example: Use an RGBA texture:

Pre-computed Gradients

Calculate the gradient for each voxelStore the normalized gradient in an additional texture.

Example: Use an RGB texture:

Page 13: Real-Time Volume Graphics [06] Local Volume Illumination

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

Basic Idea of Ray-casting Pipeline

- Data are defined at the corners

of each cell (voxel)

- The data value inside the

voxel is determined using

interpolation (e.g. tri-linear)

- Composite colors and opacities

along the ray path

- Can use other ray-traversal schemes as well

c1

c2

c3

Page 14: Real-Time Volume Graphics [06] Local Volume Illumination

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

Ray Traversal Schemes

Depth

IntensityMax

Average

Accumulate

First

Page 15: Real-Time Volume Graphics [06] Local Volume Illumination

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

Ray Traversal - First

Depth

Intensity

First

First: extracts iso-surfaces (again!)done by Tuy&Tuy ’84

Page 16: Real-Time Volume Graphics [06] Local Volume Illumination

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

Ray Traversal - Average

Depth

Intensity

Average

Average: produces basically an X-ray picture

Page 17: Real-Time Volume Graphics [06] Local Volume Illumination

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

Ray Traversal - MIP

Depth

IntensityMax

Max: Maximum Intensity Projectionused for Magnetic Resonance Angiogram

Page 18: Real-Time Volume Graphics [06] Local Volume Illumination

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

Ray Traversal - Accumulate

Depth

Intensity

Accumulate

Accumulate opacity while compositing colors: make transparent layers visible!Levoy ‘88

Page 19: Real-Time Volume Graphics [06] Local Volume Illumination

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

Raycasting

color

opacity

1.0

volumetric compositing

object (color, opacity)

Page 20: Real-Time Volume Graphics [06] Local Volume Illumination

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

Raycasting

color

opacity

Interpolationkernel

1.0

object (color, opacity)

volumetric compositing

Page 21: Real-Time Volume Graphics [06] Local Volume Illumination

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

Raycasting

color c = c s s(1 - ) + c opacity = s (1 - )

+

1.0

object (color, opacity)

volumetric compositingInterpolationkernel

Page 22: Real-Time Volume Graphics [06] Local Volume Illumination

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

Raycasting

color

opacity

1.0

object (color, opacity)

volumetric compositing

Page 23: Real-Time Volume Graphics [06] Local Volume Illumination

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

Raycasting

color

opacity

1.0

object (color, opacity)

volumetric compositing

Page 24: Real-Time Volume Graphics [06] Local Volume Illumination

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

Raycasting

color

opacity

1.0

object (color, opacity)

volumetric compositing

Page 25: Real-Time Volume Graphics [06] Local Volume Illumination

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

Raycasting

color

opacity

1.0

object (color, opacity)

volumetric compositing

Page 26: Real-Time Volume Graphics [06] Local Volume Illumination

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

Raycasting

color

opacity

object (color, opacity)

volumetric compositing

Page 27: Real-Time Volume Graphics [06] Local Volume Illumination

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

Brute-Force Algorithm

Page 28: Real-Time Volume Graphics [06] Local Volume Illumination

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

Volume Rendering Pipeline

Acquired values

Data preparation

Prepared values

classificationshading

Voxel colors

Ray-tracing / resampling Ray-tracing / resampling

Sample colors

compositing

Voxel opacities

Sample opacities

Image Pixels