volume rendering
play

Volume Rendering Lecture 8 February 13, 2020 Overview Scalar - PowerPoint PPT Presentation

CS53000 - Spring 2020 Introduction to Scientific Visualization Volume Rendering Lecture 8 February 13, 2020 Overview Scalar Volumes Ray casting / Texture mapping Transfer functions CS530 / Spring 2020 : Introduction to Scientific


  1. 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

  2. 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

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

  4. 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

  5. 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

  6. General Components Basic diagram Light Ray t1 P t2 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 17

  7. 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

  8. 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

  9. 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

  10. 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

  11. 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

  12. 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

  13. 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

  14. 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

  15. 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

  16. 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

  17. 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

  18. 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

  19. ����� ���� 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

  20. 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

  21. 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

  22. Pixel Compositing Schemes Depth CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 28

  23. Pixel Compositing Schemes First Depth CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 28

  24. Pixel Compositing Schemes Max intensity First Depth CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 28

  25. Pixel Compositing Schemes Max intensity Average First Depth CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 28

  26. Pixel Compositing Schemes Max intensity Accumulate Average First Depth CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 28

  27. Compositing – First (Threshold) Extracts iso-surfaces (again!) Intensity First Depth CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 29

  28. Compositing - Average Intensity Average Depth Synthetic Reprojection CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 30

  29. 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

  30. CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 32

  31. CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 32

  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

  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

  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

  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

  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

  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

  38. General Components Basic diagram Light Ray t1 t2 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 39

  39. General Components Basic diagram Light Ray t1 t2 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 40

  40. General Components Basic diagram Light Ray t1 P t2 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 41

  41. General Components Basic diagram Light Ray t1 P t2 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 42

  42. General Components Basic diagram Light Ray t1 P t2 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 43

  43. General Components Basic diagram Light Ray t1 P t2 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 44

  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

  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

  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

  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

  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

  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

  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

  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

  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

  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

  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

  55. 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

  56. Slice Based Rendering Slices View direction CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 56

  57. Slice Based Rendering Slices View direction 1 slice CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 56

  58. Slice Based Rendering Slices View direction 1 slice 5 slices CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering 56

  59. 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

  60. 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

  61. 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

  62. 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

  63. 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

  64. 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

  65. 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

  66. 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

  67. 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

  68. 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

  69. 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

  70. 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

  71. 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

  72. 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

  73. 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

  74. Setting Transfer Function: Hard α α v v α α v v 64 CS530 / Spring 2020 : Introduction to Scientific Visualization. February 13, 2020 08. Volume Rendering

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend