Title: Real-Time Volume Graphics [06] Local Volume Illumination
1Real-Time Volume Graphics06 Local Volume
Illumination
2Volume Illumination
- Up until now Light was emitted by the volume
- Now Illumination from external light sources
Types of Volume Illumination
- 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
3Single 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)
4Blinn/Phong Illumination
- Diffuse Term (Lambertian reflection)
n
l
5Phong Illumination
- Specular Term (view-dependent)
n
r
l
v
6Blinn/Phong Illumination
Phong Illumination
- Specular Term (view-dependent)
n
h
l
v
7Blinn/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
8Local Illumination
- Surface lighting Light is reflected at surfaces
- Volume lighting Light is scattered at isosurfaces
- Isosurface extraction not required!
- We only need the normal vector
- Normal vector of isosurface is equal to
(normalized) gradient vector
9Gradient Estimation
- The gradient vector is the first-order derivative
of the scalar field - We can estimate the gradient vector using finite
differencing schemes
partial derivativein x-direction
partial derivativein y-direction
partial derivativein z-direction
10Finite Differences
Forward Difference
Backward Difference
11Finite Differences
Central Difference
Gradient Approximation using Central Differences
12Pre-computed Gradients
- Calculate the gradient for each voxel
- Store the normalized gradient in an additional
texture.
Example Use an RGBA texture
Example Use an RGB texture
13Basic 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
14Ray Traversal Schemes
Intensity
Max
Average
Accumulate
First
Depth
15Ray Traversal - First
Intensity
First
Depth
- First extracts iso-surfaces (again!)done by
TuyTuy 84
16Ray Traversal - Average
Intensity
Average
Depth
- Average produces basically an X-ray picture
17Ray Traversal - MIP
Intensity
Max
Depth
- Max Maximum Intensity Projectionused for
Magnetic Resonance Angiogram
18Ray Traversal - Accumulate
Intensity
Accumulate
Depth
- Accumulate opacity while compositing colors make
transparent layers visible!Levoy 88
19Raycasting
volumetric compositing
color
opacity
object (color, opacity)
20Raycasting
Interpolationkernel
volumetric compositing
color
opacity
1.0
object (color, opacity)
21Raycasting
Interpolationkernel
volumetric compositing
color c c s ?s(1 - ?) c
opacity ? ? s (1 - ?) ?
object (color, opacity)
22Raycasting
volumetric compositing
color
opacity
1.0
object (color, opacity)
23Raycasting
volumetric compositing
color
opacity
1.0
object (color, opacity)
24Raycasting
volumetric compositing
color
opacity
1.0
object (color, opacity)
25Raycasting
volumetric compositing
color
opacity
1.0
object (color, opacity)
26Raycasting
volumetric compositing
color
opacity
object (color, opacity)
27Brute-Force Algorithm
28Volume Rendering Pipeline
Acquired values
Data preparation
Prepared values
classification
shading
Voxel colors
Voxel opacities
Ray-tracing / resampling
Ray-tracing / resampling
Sample colors
Sample opacities
compositing
Image Pixels