RealTime Volume Graphics 06 Local Volume Illumination REALTIME

  • Slides: 26
Download presentation
Real-Time Volume Graphics [06] Local Volume Illumination REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer

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

Volume Illumination Up until now: Light was emitted by the volume Now: Illumination from

Volume Illumination Up until now: Light was emitted by the volume Now: Illumination from external light sources Types of Volume Illumination Multiplescattering, Single scatteringwith no attenuation. Light reaches is scattered attenuated every multiple along pointist times way before unimpededly through it reaches the volume the eye (Volumetric (Global illumination) shadows) Light is scattered once Light before is itscattered reaches once the eye before it reaches the eye Not physically plausible REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Single Scattering Local illumination, similar to surface lighting Lambertian reflection (light is reflected equally

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 GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Blinn/Phong Illumination Diffuse Term (Lambertian reflection) n l REAL-TIME VOLUME GRAPHICS Christof Rezk Salama

Blinn/Phong Illumination Diffuse Term (Lambertian reflection) n l REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Phong Illumination Specular Term (view-dependent) n l r v REAL-TIME VOLUME GRAPHICS Christof Rezk

Phong Illumination Specular Term (view-dependent) n l r v REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Blinn/Phong Illumination Specular Term (view-dependent) n l h r v REAL-TIME VOLUME GRAPHICS Christof

Blinn/Phong Illumination Specular Term (view-dependent) n l h r v REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer 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!

Blinn/Phong Illumination Ambient Term (constant illumination) lightens up the shadows, also decreases the contrast! Consider using a fill light instead of ambient light! Example images taken from Jeremy Birn: Digital Lighting & Rendering, New Riders Publishing, 2000 REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Local Illumination Surface lighting: Light is reflected at surfaces Volume lighting: Light is scattered

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 REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

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

Gradient Estimation The gradient vector is the first-order derivative of the scalar field partial derivative in x-direction partial derivative in y-direction partial derivative in z-direction We can estimate the gradient vector using finite differencing schemes REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Finite Differences Taylor expansion: Forward Difference: Backward Difference: REAL-TIME VOLUME GRAPHICS Christof Rezk Salama

Finite Differences Taylor expansion: Forward Difference: Backward Difference: REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Finite Differences Central Difference: Gradient Approximation using Central Differences: REAL-TIME VOLUME GRAPHICS Christof Rezk

Finite Differences Central Difference: Gradient Approximation using Central Differences: REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Pre-computed Gradients Calculate the gradient for each voxel Store the normalized gradient in an

Pre-computed Gradients Calculate the gradient for each voxel Store the normalized gradient in an additional texture. Example: Use an RGBAtexture: REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Pre-computed Gradients REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University

Pre-computed Gradients REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Pre-computed Gradients REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University

Pre-computed Gradients REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Non-Polygonal Isosurfaces Replace Blending by Alpha Test Note: Make sure to render the slices

Non-Polygonal Isosurfaces Replace Blending by Alpha Test Note: Make sure to render the slices front-to-back in order to exploit the early z-test! REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Non-polygonal Isosurfaces REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University

Non-polygonal Isosurfaces REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Pre-Computed Gradients Drawbacks of pre-computed gradients: Memory Requirements Gradients must be stored at least

Pre-Computed Gradients Drawbacks of pre-computed gradients: Memory Requirements Gradients must be stored at least at 3 x 8 bit Texture compression will reduce image quality Not applicable to large volume data REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

On-the-fly Gradient Estimation REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group,

On-the-fly Gradient Estimation REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

On-the-fly Gradient Estimation Drawbacks: 3 D texture required Each additional texture sample is expensive!

On-the-fly Gradient Estimation Drawbacks: 3 D texture required Each additional texture sample is expensive! Central Differences: 7 Texture Samples Forward/Backward Differences: 4 Texture Samples Advantages: Low memory requirements Gradient estimation at floating point precision! Gradient estimation can be omitted in FP (using a conditional branch) REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

On-the-Fly Directional Derivatives Illumination calculation usually involves dot products, such as If we neglect

On-the-Fly Directional Derivatives Illumination calculation usually involves dot products, such as If we neglect the normalization , we can write the dot product as a directional derivative, Directional derivatives can be approximated directly using finite differences. REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

On-the-Fly Directional Derivatives Forward Difference Backward Difference Central Difference REAL-TIME VOLUME GRAPHICS Christof Rezk

On-the-Fly Directional Derivatives Forward Difference Backward Difference Central Difference REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Environment Mapping Reflection Map Perfect mirror reflection Irradiance Map Lambertian reflection Image courtesy of

Environment Mapping Reflection Map Perfect mirror reflection Irradiance Map Lambertian reflection Image courtesy of Paul Debevec (www. debevec. org) REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Environment Cube Maps Use the 6 sides of a cubes to store the light

Environment Cube Maps Use the 6 sides of a cubes to store the light environment. REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Environment Mapping REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University

Environment Mapping REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Environment Mapping REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University

Environment Mapping REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006

Summary Single Scattering/Local Illumination Gradient Estimation Finite Differences Gradient-based Illumination Pre-computed Gradients On-the-fly gradient

Summary Single Scattering/Local Illumination Gradient Estimation Finite Differences Gradient-based Illumination Pre-computed Gradients On-the-fly gradient estimation On-the-fly directional derivatives Blinn/Phong Illumination Environment Mapping (Reflection Map and Irradiance Map) REAL-TIME VOLUME GRAPHICS Christof Rezk Salama Computer Graphics and Multimedia Group, University of Siegen, Germany Eurographics 2006