Computer Graphics - Volume Rendering - Hendrik Lensch [a couple of slides thanks to Holger Theisel] Computer Graphics WS07/08 – Volume Rendering
Overview • Last Week – Subdivision Surfaces • on Sunday – Ida Helene • Today – Volume Rendering • until tomorrow: Evaluate this lecture on http://frweb.cs.uni-sb.de/03.Studium/08.Eva/ 2 Computer Graphics WS07/08 – Volume Rendering
Motivation • Applications – Fog, smoke, clouds, fire, water, … – Scientific/medical visualization: CT, MRI – Simulations: Fluid flow, temperature, weather, ... – Subsurface scattering • Effects in Participating Media – Absorption – Emission – Scattering • Out-scattering • In-scattering • Literature – Klaus Engel et al., Real-time Volume Graphics , AK Peters – Paul Suetens, Fundamentals of Medical Imaging , Cambridge University Press Computer Graphics WS07/08 – Volume Rendering
Motivation Volume Rendering • Examples of volume visualization: 4 Computer Graphics WS07/08 – Volume Rendering
Direct Volume Rendering Computer Graphics WS07/08 – Volume Rendering
Volume Acquisition Computer Graphics WS07/08 – Volume Rendering
Direct Volume Rendering 7 Computer Graphics WS07/08 – Volume Rendering
Direct Volume Rendering • Shear-Warp factorization (Lacroute/Levoy 94) 8 Computer Graphics WS07/08 – Volume Rendering
Volume Representations • Cells and voxels voxels: represent : represent voxels cells: represent cells: represent homogeneous areas homogeneous areas inhomogeneous areas inhomogeneous areas 9 Computer Graphics WS07/08 – Volume Rendering
Volume Representations • Cells and voxels voxels: represent : represent voxels cells: represent cells: represent homogeneous areas homogeneous areas inhomogeneous areas inhomogeneous areas 10 Computer Graphics WS07/08 – Volume Rendering
Volume Representations • Simple shapes with procedural solid texture – Ellipsoidal clouds with sum-of-sines densities – Hypertextures [Perlin] • 3D array – Regular (uniform) or rectilinear (rectangular) – CT, MRI • 3D meshes – Curvilinear grid (mapping of regular grid to 3D) • “Computational space” is uniform grid • “Physical space“ is distorted • Must map between them (through Jacobian) – Unstructured meshes • Point clouds • Often tesselated into tetrahedral mesh) Curvilinear grid Computer Graphics WS07/08 – Volume Rendering
Volume Organization • Rectilinear Grid: – Wald et al. – Implicit kd-trees • Curvilinear Grid: – Warped Rectilinear Grid – Hexahedral cells • Unstructured Mesh: – Tetrahedral cells Computer Graphics WS07/08 – Volume Rendering
Trilinear Interpolation • Cells Data values inside a cell have to be computed by interpolation. Data values inside a cell have to be computed by interpolation. f 111 f 011 f 101 f 001´ f(x,y,z) f 010 f 110 f 000 f 100 Most common interpolation for cells: trilinear trilinear interpolation interpolation Most common interpolation for cells: 13 Computer Graphics WS07/08 – Volume Rendering
Trilinear Interpolation i,j,k ∈ ∈ {0,1}. Then the value Let f f ijk = f f ( ( i,j,k i,j,k ) for ) for i,j,k {0,1}. Then the value f f ( ( x,y,z x,y,z ) for a certain point ) for a certain point Let ijk = ) ∈ ∈ [0,1] [0,1] 3 3 inside the cell is computed by ( x,y,z x,y,z ) inside the cell is computed by trilinear trilinear interpolation as: interpolation as: ( f 111 a 3 f 011 a 6 a 4 f 101 f 001´ f(x,y,z) a 1 a 1 = (1 = (1- - x x )* )* f f 000 000 + + x x * * f f 100 100 a 2 a 2 = (1 = (1- - x x )* )* f f 010 010 + + x x * * f f 110 110 a 3 a 3 = (1 = (1- - x x )* )* f f 011 011 + + x x * * f f 111 a 2 f 010 111 a 4 a 4 = (1 = (1- - x x )* )* f f 001 001 + + x x * * f f 101 f 110 101 a 5 a 5 a 5 = (1 = (1- - y y )* )* a a 1 + y + y *a *a 2 1 2 a 6 a 6 = (1 = (1- - y y )* )* a a 4 + y + y *a *a 3 4 3 a 1 f 000 f 100 f(x,y,z) ) = (1 = (1- - z z )* )* a a 5 + z z *a *a 6 f(x,y,z + 5 6 14 Computer Graphics WS07/08 – Volume Rendering
Participating Media • Absorption • Emission • In-Scattering • Out-Scattering • Multiple Scattering Computer Graphics WS07/08 – Volume Rendering
Absorption • Absorption Coefficient κ (x, ω ) – Probability of a photon being absorbed at x in direction ω per unit length ω ω + L ( x , ) L ( x , ) dL κ x ω ( , ) ds ω = − κ ω ω dL ( x , ) ( x , ) L ( x , ) ds dL ω = − κ ω ω ( x , ) ( x , ) L ( x , ) ds – Optical depth τ of a material of thickness s • Physical interpretation: – Measure for how far light travels before being absorbed = ∫ s τ κ + ω ω = κ κ = ( s ) ( x t , ) dt [ s , iff const ] 0 Computer Graphics WS07/08 – Volume Rendering
Transparency and Opacity • Integration Along Ray dL ∫ s ω = − κ ω ω τ = κ + ω ω ( x , ) ( x , ) L ( x , ) and ( s ) ( x t , ) dt ds 0 + ω ω = − τ ω = ω ( s ) L ( x s , ) e L ( x , ) T ( s ) L ( x , ) • Transparency (or Transmittance) − κ + ω s = − τ = ∫ ( x t ) dt ( s ) T ( s ) e e 0 • Opacity = − O ( s ) 1 T ( s ) Computer Graphics WS07/08 – Volume Rendering
Emission • Emission Coefficient q(x, ω ) – Number of photons being emitted at x in direction ω per unit length ω ω + L ( x , ) L ( x , ) dL ω q ( x , ) ω = ω ds dL ( x , ) q ( x , ) ds dL ω = ω ( , ) ( , ) x q x ds Computer Graphics WS07/08 – Volume Rendering
Emission-Absorption Model • Emission-Absorption Model – Kombines absorption and emission only • Volume Rendering Equation – In differential form dL ω = − κ ω ω + ω ( x , ) ( x , ) L ( x , ) q ( x , ) ds • Volume Rendering Integral s s ∫ ∫ − κ − κ ∫ s ( t ) dt ( t ) dt + ω ω = ω + L ( x s , ) L ( x , ) e q ( s ' ) e ds ' 0 s ' 0 – Incoming light is absorbed along the entire segment – Emitted light is only absorbed along the remaining segment – Must integrate over emission along the entire segment Computer Graphics WS07/08 – Volume Rendering
Out-Scattering Scattering cross-section σ (x, ω ) • – Probability of a photon being scattered out of direction per unit length ω ω + L ( x , ) L ( x , ) dL σ ( x ) ds – Total absorption (extinction): true absorption plus out-scattering χ = κ + σ – Albedo (“Weißheit”, measure for reflectivity or ability to scatter) σ σ = = W χ κ + σ Computer Graphics WS07/08 – Volume Rendering
In-Scattering Scattering cross-section σ (x, ω ) • – Number of photons being scattered into path per unit length – Depend on scattering coefficient (probability of being scattered) and the phase function (directional distribution of out-scattering events) ω ω + L ( x , ) L ( x , ) dL σ x ω ( , ) ds ∫ ω = σ ω ω ω ω ω j ( x , ) ( x , ) p ( x , , ) L ( x , ) d i i i i 2 S – Total Emission: true emission q plus in-scattering j η ω = ω + ω ( x , ) q ( x , ) j ( x , ) – Phase function (essentially the BRDF for volumes) ω i ω p ( x , , ) Computer Graphics WS07/08 – Volume Rendering
Phase Functions • Phase angle is often only relative to incident direction – cos θ = ω⋅ω ' ω ’ • Reciprocity and energy conservation ω ω ω = ω ω p ( x , , ) p ( x , , ) i i 1 ∫ ω ω ω = p ( x , , ) d 1 π i 2 4 S • Phase functions – Isotropic θ = (cos ) 1 p – Rayleigh (small molecules) • Strong wavelength dependence + θ 2 3 1 cos θ = p (cos ) λ 4 4 – Mie scattering (larger spherical particles) Computer Graphics WS07/08 – Volume Rendering
Rayleigh and Mie Scattering Computer Graphics WS07/08 – Volume Rendering
Henyey-Greenstein Phase Function • Empirical Phase Function – Often used for interstellar clouds, tissue, and similar material − 2 1 1 g θ = p (cos ) ( ) 2 π 3 4 + − θ 2 1 g 2 g cos g= -0.3 – Average cosine of phase angle π ∫ = π θ θ θ g 2 p (cos ) cos d g= 0.0 0 g= 0.6 Computer Graphics WS07/08 – Volume Rendering
Summary • Scattering in a volume Computer Graphics WS07/08 – Volume Rendering
Full Volume Rendering • Full Volume Rendering Equation ω ⋅ ∇ ω = L ( x , ) x ∂ ω L ( x , ) ∫ = − χ ω ω + ω + σ ω ω ω ω ω ( x , ) L ( x , ) q ( x , ) ( x , ) p ( x , , ) L ( x , ) d ∂ i i i i 2 s S ∂ ∂ ∂ ∇ = ( , , ) at point x ∂ ∂ ∂ x x y z • Full Volume Rendering Integral ∫ s − χ + ω ω ∫ s ( x t , ) dt + ω ω = η + ω ω L ( x s , ) e ( x s ' , ) ds ' s ' 0 Attenuation: Source Term: (absorption & in-scattering,emission, out-scattering) and background ( η (0, ω )= L(x, ω ) δ (x)) Computer Graphics WS07/08 – Volume Rendering
Recommend
More recommend