Top Banner
Direct Volume Rendering Joe Michael Kniss [email protected] http://www.cs.utah.edu/~jmk Scientific Computing and Imaging Institute University of Utah
57

Direct Volume Rendering Joe Michael Kniss [email protected] cs.utah/~jmk

Jan 01, 2016

Download

Documents

phillip-pacheco

Direct Volume Rendering Joe Michael Kniss [email protected] http://www.cs.utah.edu/~jmk Scientific Computing and Imaging Institute University of Utah. Outline. What is Volume Rendering? Shading models Current hardware methods Visualization 2001 presentation. What?. Volume Rendering. - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

Direct Volume Rendering

Joe Michael [email protected]

http://www.cs.utah.edu/~jmk

Scientific Computing and Imaging InstituteUniversity of Utah

Page 2: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

Outline

1. What is Volume Rendering?

2. Shading models

3. Current hardware methods

4.Visualization 2001 presentation

Page 3: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

Volume Rendering

Volume Rendering is a visualization/graphics technique which directly renders data using a reasonable approximation to a physical light transport model.

What?

Page 4: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

Overview• Data acquisition

• Reconstruction

• Sample & interpolate

• Transfer function

• Lighting

• Blend/integrate

Volume Rendering

Spiral CT

Filtered back-projection

Tri-linear Interp.

3D T.F.

Light & shadow

Back to Front

Page 5: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

OverviewVolume Rendering

Acquisition type Reconstruction

•CT (X-ray)

•MRI

•Simulation

•Inverse Radon

•Inverse Fourier

•None?

Others: PET, SPECT, EEG, MEG, Geological, Atmospheric

Page 6: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

InterpolationOverview

Sampled Function

How do we recover a function that is at least C0 continuous??

Real Function

?

Page 7: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

Interpolation

• Estimate values between samples

• Reconstruct continuous function

Overview

box

linear

sinc

Catmul-Rom

C0

C0 C1

C00

Page 8: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

Interpolation

• Estimate values between samples

• Reconstruct continuous function

Overview

box

linear

sinc

Catmul-Rom

Bad

OK Good

Best

Quality

Page 9: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

Interpolation

• Estimate values between samples

• Reconstruct continuous function

Overview

box

linear

sinc

Catmul-Rom

Easiest

Easy OK

Hard

Use

Page 10: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

InterpolationOverview

Sampled Function

Laura Bush

Page 11: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

InterpolationOverview

Box

What is the value here?

Page 12: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

InterpolationOverview

Box

What is the value here?

Page 13: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

InterpolationOverview

Box

What is the value here?

Page 14: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

InterpolationOverview

Box == Nearest Neighbor

Reconstructed function

Page 15: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

InterpolationOverview

Linear

What is the value here?

Page 16: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

InterpolationOverview

Linear

What is the value here?

Page 17: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

InterpolationOverview

Linear

What is the value here?

Page 18: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

InterpolationOverview

Linear == Connect the dots

Reconstructed function

Page 19: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

InterpolationOverview

Catmull-Rom == Rolling Hills

Reconstructed function

Page 20: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

InterpolationOverview

Sinc == Roller Coaster

Reconstructed function

But what about the ringing??

Page 21: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

InterpolationOverview

Page 22: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

InterpolationOverview

box

linear

sinc

Catmul-Rom

Bad

OK Better

Hmm…

Quality

In reality:

Page 23: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

Interpolation

• Bi-linear

• Tri-linear

What is the value here?

Page 24: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

• Bi-linear = 3 linear interpolations, 2 axes

• Tri-linear = 7 linear interpolations, 3 axes

Interpolation

•1st along x

•2nd along y

•1st along x

Page 25: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

• Bi-linear = 3 linear interpolations, 2 axes

• Tri-linear = 7 linear interpolations, 3 axes

Interpolation

•1st along x

•2nd along y

•1st along x

•2nd along y

Page 26: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

• Bi-linear = 3 linear interpolations, 2 axes

• Tri-linear = 7 linear interpolations, 3 axes

Interpolation

•1st along x

•2nd along y

•1st along x

•2nd along y

•3rd along z

Page 27: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

Transfer Function

• Assign optical properties to data– Color– Opacity

Transfer function

Page 28: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

Transfer Function

• Assign optical properties to data– Color– Opacity

Transfer function

x

Page 29: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

Transfer Function

• Assign optical properties to data– Color– Opacity

Transfer function

T(x)

Page 30: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

RenderingOverview

Volume DataEye

Image plane

Projection

Page 31: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

RenderingOverview

Volume DataEye

Image plane

Ray Casting

But how do we get the final color??

r0r1

Page 32: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

RenderingOverview

Solution: Integrate

r0 r11

0

)(r

r

dxxT

r0r1

T(x)

Page 33: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

RenderingOverview

Solution: Sum (Riemann)

r0r1

r0 r11

0

)(r

r

dxxT xxTn

i

i 0

)(

Page 34: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

RenderingOverview

r0 r1

1

0

)(r

r

dxxT xxTn

i

i 0

)(

Emissive What about occlusion??

n

i

it0

Page 35: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

RenderingOverview

r0 r1

Absorption• Use alpha channel for opacity

• Values should approach ZERO

Exponential-1 curve

0

1

)(expr

r

dxxA

Page 36: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

RenderingOverview

r0 r1

0

1

)(expr

r

dxxA

n

i

i

n

i

i xxxAxxxA00

)(exp)(exp

n

i

ia0

Page 37: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

RenderingOverview

r0 r1

Emission & Absorption

dsdxxAsTr

s

r

r

10

1

)(exp*)(

Page 38: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

RenderingOverview

Emission & Absorption

r0 r1

N

i

N

ij

ii at0 1

*

dsdxxAsTr

s

r

r

10

1

)(exp*)(

Page 39: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

RenderingOverview

Emission & Absorption

r0 r1

))))((...(( 0011 Batatat nnnn

cout = ci + ai*cin

N

i

N

ij

ii at0 1

* =

Page 40: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

RenderingOverview

Emission & Absorption

r0 r1

cout = ci + ai*ci-1

Where did the light come from??

Page 41: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

LightingOverview

Eye

Image planer0

r1

Light

Page 42: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

LightingOverview

Light

Sample ri

The volume occludes some of the light

Page 43: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

N

i

N

ij

i

L

k

ki aat0 1

*

0

*

dsdxxAdttAsTr

s

r

r

l

s

00

1

0

)(exp*)(exp*)(

LightingOverview

Sample ri (s)First scattering/ shadows

l0

Page 44: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

LightingOverview

It still doesn’t look like a surface.

Standard shading models need a surface normal

Page 45: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

LightingOverview

Solution: use the gradient as the normal

linear

linear derivative

14

10

5

3

Page 46: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

LightingOverview

Solution: use the gradient as the normal

linear

linear derivative

14

10

5

3

dx = 3-10 = -7

dy = 5-14 = -9

Page 47: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

LightingOverview

Solution: use the gradient as the normal 14

10

5

3

normallight

eyereflection

Page 48: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

LightingOverview

Diffuse14

10

5

3

nl

Color = C*(n l)C = object color

Page 49: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

LightingOverview

Diffuse + specular14

10

5

3

nl

er

Color = C*(n l) + LC*(r l)P

LC = light color P = specular power

Page 50: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

LightingOverview

Diffuse + specular & shadow

Color = [C*(n l) + LC*(r l)P ] * S

S = shadow amount

Page 51: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

LightingOverview

Diffuse + specular & shadow + Ambient

Color = [C*(n l) + LC*(r l)P ] * S + C*A

A = Ambient contribution

Page 52: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

RenderingOverview

Volume DataEye

Image plane

Ray Casting

r0r1

• Cast a ray through each pixel

•Intersect with volume

•Numerically integrate & return color

Page 53: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

RenderingHardware

Volume DataEye

Image plane

Graphics Hardware•Polygons – Proxy geometry

•Textures – Data & interpolation

•Blending operations – Numerical integration

Slices

Page 54: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

HardwareSlices

View direction

1 slice

5 slices

20 slices 45 slices 85 slices 170 slices

Page 55: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

Hardware

Data texture

Grad texture

Shadow texture

T.F. texture

Shade textureTexture

combiner

Color & opacity

Data texture

Polygon slicing

through texture

Page 56: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

HardwareSlicesFrame buffer

Blend each slice with previously rendered

Projection

Page 57: Direct Volume Rendering Joe Michael Kniss jmk@cs.utah cs.utah/~jmk

References

• Nelson Max, Optical Models for Direct Volume Rendering, IEEE Visualization and Computer Graphics (v1 #2 June 1995)

• Mark Levoy, Display of Surfaces from Volume Data, IEEE Computer Graphics and Applications (v8 #3 May 1988)

• Kenneth R. Castleman, Digital Image Processing, Prentice Hall (c1996 ISBN:0-13-211467-4)