DVR Discrete Approximation Resample along ray I ( s i ) I ( s i +1 ) s i +1 s 0 s i I ( s 0 ) q ( s i ) , A ( s i ) q ( s i +1 ) , A ( s i +1 ) α = A ( s i +1 ) I ( s i +1 ) = α q ( s i +1 ) + (1 − α ) I ( s i ) = q ( s i +1 ) OVER I ( s i ) Markus Hadwiger, IEEE Visualization 2002 Tutorial Notes CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 16
DVR Discrete Approximation Resample along ray Ray I ( s i ) I ( s i +1 ) s i +1 s 0 s i I ( s 0 ) q ( s i ) , A ( s i ) q ( s i +1 ) , A ( s i +1 ) α = A ( s i +1 ) I ( s i +1 ) = α q ( s i +1 ) + (1 − α ) I ( s i ) = q ( s i +1 ) OVER I ( s i ) Markus Hadwiger, IEEE Visualization 2002 Tutorial Notes CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 16
DVR Discrete Approximation Resample along ray Ray I ( s i ) I ( s i +1 ) s i +1 s 0 s i TF( s i ) I ( s 0 ) q ( s i ) , A ( s i ) q ( s i +1 ) , A ( s i +1 ) α = A ( s i +1 ) I ( s i +1 ) = α q ( s i +1 ) + (1 − α ) I ( s i ) = q ( s i +1 ) OVER I ( s i ) Markus Hadwiger, IEEE Visualization 2002 Tutorial Notes CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 16
DVR Discrete Approximation Resample along ray Ray I ( s i ) I ( s i +1 ) s i +1 s 0 s i TF( s i ) TF( s i+1 ) I ( s 0 ) q ( s i ) , A ( s i ) q ( s i +1 ) , A ( s i +1 ) α = A ( s i +1 ) I ( s i +1 ) = α q ( s i +1 ) + (1 − α ) I ( s i ) = q ( s i +1 ) OVER I ( s i ) Markus Hadwiger, IEEE Visualization 2002 Tutorial Notes CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 16
DVR Discrete Approximation Resample along ray Ray I ( s i ) I ( s i +1 ) s i +1 s 0 s i TF( s i ) TF( s i+1 ) I ( s 0 ) q ( s i ) , A ( s i ) q ( s i +1 ) , A ( s i +1 ) Back-to-front Compositing with α = A ( s i +1 ) I ( s i +1 ) = α q ( s i +1 ) + (1 − α ) I ( s i ) = q ( s i +1 ) OVER I ( s i ) Markus Hadwiger, IEEE Visualization 2002 Tutorial Notes CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 16
General Components Basic diagram Light Ray t1 P t2 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 17
Color and Opacity Transfer Functions C(p), α (p) – p is a point in volume Functions of input data f(p) C(f), α (f) – these are 1D functions Can include lighting affects C(f, N(p), L) where N(p) = grad(f) Derivatives of f C(f, grad(f) ), α (f, grad(f) ) CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 18
Transfer Functions (TFs) RGB Map data value f α to color and opacity f CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 19
Transfer Functions (TFs) RGB Map data value f α to color and opacity f α ( f ) RGB( f ) Human Tooth CT CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 19
Transfer Functions (TFs) RGB Map data value f α to color and opacity f α ( f ) RGB( f ) Shading, Compositing… Human Tooth CT CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 19
Transfer Functions (TFs) RGB Map data value f α to color and opacity f α ( f ) RGB( f ) Shading, Compositing… Human Tooth CT CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 19
Volume Rendering Usefulness Measured sources of volume data CT (computed tomography) PET (positron emission tomography) MRI (magnetic resonance imaging) Ultrasound Confocal Microscopy CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 20
Volume Rendering Usefulness Synthetic sources of volume data CFD (computational fluid dynamics) Voxelization of discrete geometry CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 21
Volume Rendering: Interfaces Transfer function, with shading Skin/Air Bone/Soft tissue Bone/Air CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 22
Concepts f(0,1,0) Voxels basic unit of volume data Interpolation f(0,0,0) f(1,0,0) trilinear common, others possible Gradient direction of fastest change Compositing "over operator" CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 23
Concepts f(0,1,0) Voxels basic unit of volume data Interpolation f(0,0,0) f(1,0,0) trilinear common, others possible Gradient direction of fastest change Compositing "over operator" CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 23
Concepts f(0,1,0) Voxels basic unit of volume data Interpolation f(0,0,0) f(1,0,0) trilinear common, others possible Gradient direction of fastest change Compositing "over operator" CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 23
Gradient ∇ f = ( ∂ f/ ∂ x, ∂ f/ ∂ y, ∂ f/ ∂ z) ≈ ( (f(1,0,0) - f(-1,0,0))/2, (f(0,1,0) - f(0,-1,0))/2, (f(0,0,1) - f(0,0,-1))/2) Approximates "surface normal“ (of isosurface) ∇ f CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 24
����� ���� Compositing: Over Operator c f = (0 , 1 , 0) α f = 0 . 4 = + (1 − α f ) α b c b c α f c f = + (1 − α f ) α b α α f 0 1 0 . 54 + (1 − 0 . 4) × 0 . 9 = = 0 . 4 1 0 0 . 4 c 0 0 0 = 0 . 94 c b = (1 , 0 , 0) α α b = 0 . 9 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 25
Compositing: Over Operator c f = (0 , 1 , 1) = + (1 − α f ) α b c b c α f c f c m = (0 , 1 , 0) = + (1 − α f ) α b α f = 0 . 4 α α f α m = 0 . 4 0 1 0 . 54 + (1 − 0 . 4) × 0 . 9 = 1 0 0 . 4 0 . 4 0 0 0 0 0 . 54 0 . 324 + (1 − 0 . 4) = 1 0 . 4 0 . 64 0 . 4 1 0 0 . 4 0 1 0 . 54 c b = (1 , 0 , 0) + (1 − 0 . 4) × 0 . 9 = 0 . 4 1 0 0 . 4 α b = 0 . 9 1 0 0 . 4 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 26
Compositing: Over Operator = + (1 − α f ) α b c b c α f c f = + (1 − α f ) α b α α f Order Matters! ≠ = (0 . 324 , 0 . 64 , 0 . 4) = (0 . 324 , 0 . 64 , 0 . 24) c c = 0 . 964 = 0 . 964 α α CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 27
Pixel Compositing Schemes Depth CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 28
Pixel Compositing Schemes First Depth CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 28
Pixel Compositing Schemes Max intensity First Depth CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 28
Pixel Compositing Schemes Max intensity Average First Depth CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 28
Pixel Compositing Schemes Max intensity Accumulate Average First Depth CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 28
Compositing – First (Threshold) Extracts iso-surfaces (again!) Intensity First Depth CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 29
Compositing - Average Intensity Average Depth Synthetic Reprojection CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 30
Compositing - MIP Max Intensity Depth Maximum Intensity Projection Magnetic Resonance Angiogram CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 31
CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 32
CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 32
Compositing - Accumulate Intensity Accumulate Depth Make transparent layers visible; Uses a transfer function for color/opacity CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 33
Image Order Render image one pixel at a time For each pixel ... - cast ray - interpolate - transfer function - composite CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 34
Raycasting Back to Front straightforward use of over operator intuitively backwards Front to Back intuitively right not simple over operator facilitates early ray termination CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 35
Raycasting: compositing Back to Front: composite order (eye) c i ; a i C i C i+1 C i+1 = a i c i + (1-a i )C i CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 36
Raycasting: compositing Front to Back: composite order (eye) c i ; a i C i ; A i C i+1 ; A i+1 C i+1 = C i + (1 - A i )a i c i A i+1 = A i + (1 - A i )a i CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 37
Raycasting: compositing Which is better? Front to Back: C i+1 = C i + (1 - A i )a i c i A i+1 = A i + (1 - A i )a i Back to Front: C i+1 = a i c i + (1-a i )C i CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 38
General Components Basic diagram Light Ray t1 t2 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 39
General Components Basic diagram Light Ray t1 t2 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 40
General Components Basic diagram Light Ray t1 P t2 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 41
General Components Basic diagram Light Ray t1 P t2 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 42
General Components Basic diagram Light Ray t1 P t2 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 43
General Components Basic diagram Light Ray t1 P t2 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 44
Ray-casting - Highlights Advantages: •Simple algorithm •Inherently parallel •Can add features (like a ray-tracer) Disadvantages: •Slow (lots of rays, lots of samples) though GPU friendly •Must sample densely •(Requires entire data set in memory) CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 45
Object Order Render image one voxel at a time for each voxel ... - transfer function - determine image contribution - composite CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 46
Unstructured Volume Rendering How to accurately display a volume defined over an unstructured grid? Numerous approaches: Ray casting Ray tracing Sweep plane algorithms ( e.g. , ZSWEEP) PT algorithm of Shirley and Tuchman CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 47
Projected Tetetrahedra (Shirley & Tuchman) Decompose each cell into tetrahedra Sort the tetrahedra back-to-front Project each tetrahedron and render its decomposition into 3 or 4 triangles Two different non-degenerate classes of the projected tetrahedra CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 48
Volume Density Optical Model For the Volume Density Optical Model of Williams et al. the emission and absorption along a light ray is defined by the transfer functions κ (f(x,y,z)) and ρ (f(x,y,z)) with f(x,y,z) being the scalar function Usually the transfer functions are given as a linear or piecewise linear function, or as a lookup table CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 49
Tetrahedra Compositing For each rendered pixel the ray integral of the corresponding ray segment has to be computed Observation: The ray integral depends only on S f , S b , and l for the Volume Density Optical Model of Williams et al. CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 50
3D Texturing Approach Compute the three-dimensional ray integral by numerical integration and store the integrated chromaticity and opacity in a 3D texture Assign appropriate texture coords (S f ,S b ,l) to the projected vertices of each tetrahedron CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 51
Pros / Cons of PT Method Pros: Object order method Hardware-accelerated approach Per-pixel exact rendering Cons: Sort Required Slower than uniform volume rendering CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 52
Rendering by Slicing - Why? Store volume in solid texture memory Hardware steps: Slicing of the volume (proxy geometry) Composite the slices Back-to-Front CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 53
Slice Based Rendering color opacity object (color, opacity)Similar to ray-casting with simultaneous rays 1.0 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 54
Slice Based Rendering color opacity object (color, opacity)Similar to ray-casting with simultaneous rays 1.0 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 54
Slice Based Rendering Slices Image plane Eye Graphics Hardware Volume Data •Polygons – Proxy geometry •Textures – Data & interpolation •Blending operations – Numerical integration CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 55
Slice Based Rendering Slices View direction CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 56
Slice Based Rendering Slices View direction 1 slice CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 56
Slice Based Rendering Slices View direction 1 slice 5 slices CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 56
Slice Based Rendering Slices View direction 1 slice 5 slices 20 slices CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 56
Slice Based Rendering Slices View direction 1 slice 5 slices 20 slices 45 slices CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 56
Slice Based Rendering Slices View direction 1 slice 5 slices 20 slices 85 slices 45 slices CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 56
Slice Based Rendering Slices View direction 1 slice 5 slices 20 slices 85 slices 170 slices 45 slices CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 56
Slice Based Problems? Does not perform correct • Illumination • Accumulation - but can get close Correct illumination and shadowing can be achieved but are nontrivial CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 57
Summary Volume Ray Casting (Requires entire data set in memory) Can produce reflections, shadows, and complex illumination “relatively” easily Easily parallelizable (GPU friendly) CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 58
Summary Hardware Texture Mapping Extremely Fast Correct illumination is hard Approximate accumulation Difficult to add detailed color and texture CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 59
Transfer functions Transfer functions make volume data visible by mapping data values to optical properties slices: volume rendering: volume data: 14 8 60 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering
Transfer Functions (TFs) RGB α Simple (usual) case: Map data value f to color and opacity f 61 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering
Transfer Functions (TFs) RGB α Simple (usual) case: Map data value f to color and opacity f Human Tooth CT 61 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering
Transfer Functions (TFs) RGB α Simple (usual) case: Map data value f to color and opacity f α ( f ) RGB( f ) Human Tooth CT 61 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering
Transfer Functions (TFs) RGB α Simple (usual) case: Map data value f to color and opacity f α ( f ) RGB( f ) Shading, Compositing… Human Tooth CT 61 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering
Transfer Functions (TFs) RGB α Simple (usual) case: Map data value f to color and opacity f α ( f ) RGB( f ) Shading, Compositing… Human Tooth CT 61 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering
Terminology • Basic Transfer Functions: Space Vol Color Data TF And Value Opacity Vol Range/ Domain Range TF Domain 62 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering
What else in range? • Optical Properties: Anything that can be composited with a standard graphics operator (“ over ”) •Opacity: opacity functions: most important •Color: Can help distinguish features •Emittance: rarely used •Phong parameters (k a , k d , k s ) •Index of refraction 63 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering
Setting Transfer Function: Hard α α v v α α v v 64 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering
Recommend
More recommend