• Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ...

24
What we will cover • Contour Tracking • Surface Rendering Di tVl R d i Direct Volume Rendering • Isosurface Rendering • Optimizing DVR d • Pre-Integrated DVR 1

Transcript of • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ...

Page 1: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

What we will cover

• Contour Trackingg• Surface Rendering

Di t V l R d i• Direct Volume Rendering• Isosurface Renderingg• Optimizing DVR

d• Pre-Integrated DVR

1

Page 2: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

I Q lit D dImage Quality Depends on

Sampling RateOTF a ianceOTF varianceOTF*Sampling Rate

2Really nothing?

Page 3: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

R I iRay-Integration

Discrete approximation of volume rendering integral will converge against correct result forintegral will converge against correct result for ray sampling interval > 0

3

Page 4: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

Hi h F TFHigh-Frequency TFs

High frequencies in the transfer function T increase i d li t

High frequencies in the transfer function T increase i d li trequired sampling raterequired sampling rate

T(s) T(s(x))s(x)

x s x

4

x s x

Page 5: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

Hi h F TFHigh-Frequency TFs

T(s)

s

64 data slices 10 times more slices

5

Page 6: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

Hi h F TFHigh-Frequency TFs

6

Page 7: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

PP I t t d V l R d iI t t d V l R d iPP I t t d V l R d iI t t d V l R d iPrePre--Integrated Volume RenderingIntegrated Volume RenderingPrePre--Integrated Volume RenderingIntegrated Volume Rendering

Idea: Pre-Integrated Classificationslab by slab rendering– slab-by-slab rendering

slice-by-slice slab-by-slab

7

Page 8: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

d l fPre-Integrated Classification

pre-integrate all possible combinations in the TF

front slice

back slice combinations in the TFslice slice

sf sbstore integral g

into table

d ss sb

dAssume constant

sampling distance d

sbsf

8sf

p g

Page 9: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

PP I t t d V l R d iI t t d V l R d iPP I t t d V l R d iI t t d V l R d iPrePre--Integrated Volume RenderingIntegrated Volume RenderingPrePre--Integrated Volume RenderingIntegrated Volume Rendering

project slice

sf sbsf sb

front back

9

front slice

back slice

Page 10: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

PrePre--Integrated Volume RenderingIntegrated Volume RenderingPrePre--Integrated Volume RenderingIntegrated Volume Rendering

f t h i t l d d fetch integral from dependent texture

adapt texture coordinatesfor projected slice

sf sbsbf b

slice

sf

10

slice

Page 11: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

P i t t d T f F tiPre-integrated Transfer Function

DImage Plane

D0

λλ λτ dexcolorDID

∫ −= ),0())(()0(

( ) λD

∫ ∫ ⎞⎛

λλ dexcolorDI ∫= 0))((),0(

( ) λλλκλλ

ddxsxscD

∫ ∫ ⎟⎠⎞⎜

⎝⎛ (−)=

0 0')))'((exp )((~

11sampled density

Page 12: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

P i d T f F iPre-integrated Transfer Function

( )( )( ) by exp eApproximat0

⎟⎠⎞⎜

⎝⎛ ′′− ∫

λλλκ dxs

( )( ) )1()))((exp)))(((exp/

1

/

1

/

1i

d

i

d

i

d

i

didxsddixs ακκλλλ

∏∏∑===

−=−=⎟⎠

⎞⎜⎝

⎛×−

ddixsddixs αi ))) ((()))) (((exp(1 where κκ ≈−−≈

12

Page 13: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

i d f iPre-integrated Transfer Function

( )( )( ) ( )( )( ) λλλκλλ

ddxsxscDID

⎟⎠⎞⎜

⎝⎛ ′′−= ∫∫ 00

exp~),0( ( )( )( ) ( )( )( )⎠⎝ ∫∫ 00

p)(

( )ds(x(id))c~C~ ≈By approximating color

∑ ∏−

≈n i

CnI1

)1(~)0( α

( )ds(x(id))c Cy pp g

∑ ∏= =

−≈i

jj

iCnI0 0

)1(),0( α

'' ~)(~~Back-to-front compositing

13

'1

' )1( +−+= iiii CCC α

Page 14: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

Pre-integrated Transfer Function

))))(((exp(1),,()1(

λλκαα dxsdssdi

bfi ∫+

−−== ))))(((p(),,(idbfi ∫

∫ +−−−≈1

0) ))1((exp(1 ωωωκ ddss bf∫0

∫ +−=1

0))1((~~

bfi sscC ωω∫0ωωωωκ

ωddddss bf )' )')'1((exp(

0∫ +−−×

We can get ∑ ∏−

−≈n

j

i

iCnI0

1

0

)1(~),0( α

14with pre-computed color and opacity values = =i j0 0

Page 15: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

The approximated opacity of pp p ythe i-th segment

α α-=

))))(((()1(

λλ ddi

∫+

sf sb0 sf sb0

))))(((exp(1)(

λλκα dxsidi ∫−−=

∫ +−−−≈1

)))1((exp(1 ωωωκ ddss bf∫ +0

)))1((exp(1 ωωωκ ddss bf

⎟⎟⎞

⎜⎜⎛−−= ∫

sdssd b )(exp1 κ

( ) ( )( )⎟⎞⎜⎛

⎟⎟⎠

⎜⎜⎝ −−−= ∫s

fb

d

dssss f

)(exp1 κ

∫s

d)()(h15

( ) ( )( )⎟⎟⎠

⎞⎜⎜⎝

⎛−

−−−= fb

fb

sTsTss

dexp1 ∫= dsssT0

)()( where, κ

Page 16: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

The approximated color of ppthe i-th segment

∫ +−=1

0))1((~~

bfi sscC ωωω

dddd )')')'1((( ∫ +Self-attenuation within segment

N l t th lf tt ti

ωωωωκ ddddss bf )')')'1((exp(0∫ +−−×

Neglect the self-attenuation

ωωω ddsscC bfi ))1((~~ 1

∫ +−≈

)(~sdsscd b= ∫

bfi ))((0∫

))()((

sfb

sKsKd

ss a

=

− ∫

∫=s

dsscsK )(~)(where16

))()(( fbfb

sKsKss

−−

= ∫= dsscsK0

)()( where,

Page 17: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

12 bit I H dli12-bit Image Handling

2D Pre-integration Table with fixed d12bits per S S– 12bits per Sf, Sb

– Construct Pre-integrated Table requires too much time and spacemuch time and space

MBytebitBGR 648),,,(22 : tableLookup 1212 =××× α

( )= bfi dss ,,ααsb( )

( ) ( )( )⎟⎟⎞

⎜⎜⎛

−−−≈ fb

bfi

sTsTdexp1

,,sb

17

( ) ( )( )⎟⎠

⎜⎝ − fb

fb ssp

sf

Page 18: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

Pre-integrated classification

2D Pre-integration Table with a fixed d⎞⎛( ) ( ) ( )( )⎟⎟⎠

⎞⎜⎜⎝

⎛−

−−≈−=− fb

fbbfi sTsT

ssddss exp,,11 αα

⎠⎝ f

fb

bbss

ss

sdsd − ∑∑ ⎟⎟⎞

⎜⎜⎛−=⎟

⎟⎞

⎜⎜⎛−= )(exp)(exp κκ fb

ff

s

ssssfb

sdsss ==

∑∑ ⎟⎟⎠

⎜⎜⎝−=⎟

⎟⎠

⎜⎜⎝ −−= )(exp)(exp κκ

fb

b

f

sss

ss

ds−

=∏ −= ))(exp( κ

18

f

(s)ddsds cytransparen)(1))(exp( =−≈− κκNote thatNote that

Page 19: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

Opacity ComputationTransparency = 0.4 0.5 0.6 0.4

A B C D length=4

S=100 101 102 103

Opacity of a material with four blocks

104

(x)406050401

(o) 4.06.05.04.014 ×××−=

×××−=

α

α?)(ABCDα(x) 4.06.05.04.01 ×××−=α

( ) ?)1,104,100(,, ααα == dss bfi When d=1( )f

(x) 4.06.05.04.01 ×××−=α?=α

19(o) 4.06.05.04.01 4 ×××−=α

100 104

?=α

Page 20: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

1D P I i T bl1D Pre-Integration Table

Instead of integral function, we use arithmetic average term for the fast generation of TablegUse 1D table with extra operation but less memory

KBytesbitBGR 168),,,(2:tableLookup 12 =×× α

b

sss

dsdss ∏ ))(exp(1)( κα

KBytesbitBGR 168),,,(2:tableLookup α

fb

f

ss

ssbf dsdss −

=∏ −−= ))(exp(1),,( κα

∑ −−≈bs

ds ))(exp(11 κ∑=

−−

−≈fssfb

dsss

))(exp(1 κ

20T=0.4 0.6 0.3 0.2 4/)2.03.06.04.0(1 +++−=α

Page 21: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

PP I d V l R d iI d V l R d iPP I d V l R d iI d V l R d iPrePre--Integrated Volume RenderingIntegrated Volume RenderingPrePre--Integrated Volume RenderingIntegrated Volume Rendering

Pre-Classification

Post-Classification

Pre-Integrated-Classification

21

Page 22: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

PP I t t d V l R d iI t t d V l R d iPP I t t d V l R d iI t t d V l R d iPrePre--Integrated Volume RenderingIntegrated Volume RenderingPrePre--Integrated Volume RenderingIntegrated Volume Rendering

128 slicespre-

lassifi ation

128 slicespost-

lassifi ationclassification classification

128 slicespre-integrated

284 slicespost-

classification

22

classification

Page 23: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

PrePre--Integrated Volume RenderingIntegrated Volume RenderingPrePre--Integrated Volume RenderingIntegrated Volume Rendering

Texture-based (2D/3D)Pre-computed ray-segment lookupDependent texture

Especially suited for:Low resolution volume dataLow resolution volume dataNon-linear transfer functions

23

Page 24: • Contour Tracking • Surface Rendering • Di t V l R d iDirect … · I D color x λe τ λdλ (0 ) =∫D ( ( )) − (0, ) ∫D ( ) ⎛ ∫λ ⎞ 0 (0,) (()) c s x λ κs x λ

d l d id l d id l d id l d iPrePre--Integrated Volume RenderingIntegrated Volume RenderingPrePre--Integrated Volume RenderingIntegrated Volume Rendering

Reduce compositing time by larger re-sampling intervalintervalNeed to re-compute the pre-integrated table whenever OTF is changedwhenever OTF is changed.Brings blurring effectsMore compositing voxels (20 30%)More compositing voxels (20-30%)

24