280 likes | 473 Views
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.
E N D
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. • 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
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)
Blinn/Phong Illumination • Diffuse Term (Lambertian reflection) n l
Phong Illumination • Specular Term (view-dependent) n r l v
r Blinn/Phong Illumination Phong Illumination • Specular Term (view-dependent) n h l v
Consider using a fill lightinstead of ambient light! 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
Isosurfaces Local 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
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 derivativein x-direction partial derivativein y-direction partial derivativein z-direction
Finite Differences • Taylor expansion: Forward Difference: Backward Difference:
Finite Differences Central Difference: Gradient Approximation using Central Differences:
Pre-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:
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
Ray Traversal Schemes Intensity Max Average Accumulate First Depth
Ray Traversal - First • First: extracts iso-surfaces (again!)done by Tuy&Tuy ’84 Intensity First Depth
Ray Traversal - Average • Average: produces basically an X-ray picture Intensity Average Depth
Ray Traversal - MIP • Max: Maximum Intensity Projectionused for Magnetic Resonance Angiogram Intensity Max Depth
Ray Traversal - Accumulate • Accumulate opacity while compositing colors: make transparent layers visible!Levoy ‘88 Intensity Accumulate Depth
1.0 Raycasting volumetric compositing color opacity object (color, opacity)
Raycasting Interpolationkernel volumetric compositing color opacity 1.0 object (color, opacity)
1.0 Raycasting Interpolationkernel volumetric compositing color c = c s s(1 - ) + c opacity = s (1 - ) + object (color, opacity)
Raycasting volumetric compositing color opacity 1.0 object (color, opacity)
Raycasting volumetric compositing color opacity 1.0 object (color, opacity)
Raycasting volumetric compositing color opacity 1.0 object (color, opacity)
Raycasting volumetric compositing color opacity 1.0 object (color, opacity)
Raycasting volumetric compositing color opacity object (color, opacity)
Volume RenderingPipeline Acquired values Data preparation Prepared values shading classification Voxel colors Voxel opacities Ray-tracing / resampling Ray-tracing / resampling Sample colors Sample opacities compositing Image Pixels