real-time volume graphics [06] local volume illumination
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 PresentationTRANSCRIPT
REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006
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
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)
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
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)
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
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!
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
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
REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006
Finite Differences
Taylor expansion:
Backward Difference:
Forward Difference:
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:
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:
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
REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 200614
Ray Traversal Schemes
Depth
IntensityMax
Average
Accumulate
First
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
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
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
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
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)
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
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
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
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
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
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
REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 200626
Raycasting
color
opacity
object (color, opacity)
volumetric compositing
REAL-TIME VOLUME GRAPHICSChristof Rezk SalamaComputer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006
Brute-Force Algorithm
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