Presentation is loading. Please wait.

Presentation is loading. Please wait.

Real-Time Volume Graphics [06] Local Volume Illumination

Similar presentations


Presentation on theme: "Real-Time Volume Graphics [06] Local Volume Illumination"— Presentation transcript:

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

2 Volume Illumination Types of Volume Illumination
Up until now: Light was emitted by the volume Now: Illumination from external light sources Types of Volume Illumination Single scattering, no attenuation. Light reaches every point unimpededly Light is scattered once before it reaches the eye Not physically plausible Multiple scattering Light is scattered multiple times before it reaches the eye (Global 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

3 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)

4 Blinn/Phong Illumination
Diffuse Term (Lambertian reflection) n l

5 Phong Illumination Specular Term (view-dependent) n r l v

6 Blinn/Phong Illumination
Specular Term (view-dependent) n h r l v

7 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

8 Local Illumination Surface lighting: Light is reflected at surfaces
Volume lighting: Light is scattered at isosurfaces Isosurfaces Isosurface extraction not required! We only need the normal vector Normal vector of isosurface is equal to (normalized) gradient vector

9 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

10 Finite Differences Taylor expansion: Forward Difference:
Backward Difference:

11 Finite Differences Central Difference:
Gradient Approximation using Central Differences:

12 Ray Traversal Schemes Intensity Max Average Accumulate First Depth

13 Ray Traversal - First Intensity First Depth
First: extracts iso-surfaces (again!) done by Tuy&Tuy ’84

14 Ray Traversal - Average
Intensity Average Depth Average: produces basically an X-ray picture

15 Ray Traversal - MIP Intensity Max Depth
Max: Maximum Intensity Projection used for Magnetic Resonance Angiogram

16 Ray Traversal - Accumulate
Intensity Accumulate Depth Accumulate opacity while compositing colors: make transparent layers visible! Levoy ‘88

17 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

18 Raycasting volumetric compositing color opacity
1.0 object (color, opacity)

19 Raycasting Interpolation kernel volumetric compositing color opacity
1.0 object (color, opacity)

20 Raycasting Interpolation kernel volumetric compositing
color c = c s s(1 - ) + c opacity  =  s (1 - ) +  1.0 object (color, opacity)

21 Raycasting volumetric compositing color opacity
1.0 object (color, opacity)

22 Raycasting volumetric compositing color opacity
1.0 object (color, opacity)

23 Raycasting volumetric compositing color opacity
1.0 object (color, opacity)

24 Raycasting volumetric compositing color opacity
1.0 object (color, opacity)

25 Raycasting volumetric compositing color opacity
object (color, opacity)

26 Brute-Force Algorithm
Basic Routines Used: First: accept a ray index and returns the object-space coordinates of the points where the ray enters the data; Last: accept a ray index and returns the object-space coordinates of the points where the ray leaves the data; Object: convert to object-space coordinates from image-space coordinates; Image: convert to image-space coordinates from object-space coordinates; and Sample: accepts a 3D array of colors or opacities and the object-space coordinates of a point, and returns an approximation to the color or opacity at that point by trilinearly interpolating from the eight surrounding voxels.

27 Brute-Force Algorithm

28 Volume Rendering Pipeline
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

29 FIN DU COURS

30 Pre-computed Gradients
Calculate the gradient for each voxel Store the normalized gradient in an additional texture : values between -1 and +1. Then add 1 and divide by 2 to get values in [0,1] Example: Use an RGB texture: Example: Use an RGBA texture:


Download ppt "Real-Time Volume Graphics [06] Local Volume Illumination"

Similar presentations


Ads by Google