Volume Rendering Volume Modeling Volume Rendering Volume Modeling Volume Rendering 20 Apr. 2000

Download Volume Rendering Volume Modeling Volume Rendering Volume Modeling Volume Rendering 20 Apr. 2000

Post on 18-Dec-2015

221 views

Category:

Documents

7 download

Embed Size (px)

TRANSCRIPT

<ul><li> Slide 1 </li> <li> Volume Rendering Volume Modeling Volume Rendering Volume Modeling Volume Rendering 20 Apr. 2000 </li> <li> Slide 2 </li> <li> 2 Computer Graphics 15-462 Volume Modeling &amp; Rendering Some data is more naturally modeled as a volume, not a surface You could always convert the volume to a surface, but thats not always best Volume rendering: render the volume directly Ray-traced isosurface f(x,y,z)=c Same data, rendered as a volume </li> <li> Slide 3 </li> <li> 3 Computer Graphics 15-462 Why Bother with Volume Rendering? Isnt surface modeling &amp; rendering easier? Show all your data more informative less misleading (the isosurface of noisy data is unpredictable) Constructive Solid Geometry (CSG) is natural Simpler and more efficient than converting a very complex data volume (like the inside of someones head) to polygons and then rendering them </li> <li> Slide 4 </li> <li> 4 Computer Graphics 15-462 Contrasts Surface Rendering Surface rendering is the "usual" type of rendering. Data is converted to geometrical primitives (e.g. triangles), which are then drawn. Everything you see is a 2D surface, embedded in a 3D space. The conversion to geometrical primitives may lose or disguise some data. Good for opaque objects, objects with smooth surface. Volume Rendering Data consists of one or more (supposedly continuous) fields in 3D. A Transfer Function maps the data into a volume of RGBA values. This volume is rendered directly, like a blob of colored jello. Data is seen more directly; less likely to be hidden. Works well for complex surfaces. </li> <li> Slide 5 </li> <li> 5 Computer Graphics 15-462 Applications medical Computed Tomography (CT) Magnetic Resonance Imaging (MRI) Ultrasound engineering &amp; science Computational Fluid Dynamics (CFD) aerodynamic simulations meteorology weather prediction astrophysics simulate galaxies Computer Graphics Participating media Texels </li> <li> Slide 6 </li> <li> 6 Computer Graphics 15-462 Brief History of Volume Visualization 1970smodeling &amp; rendering with 3-D grids and octrees 1984 ray casting volume models 1986 3-D scan conversion of lines, polygons into 3-D grid 1987 marching cubes algorithm (convert volume model to surface model) 1988 direct volume rendering with painters algorithm 1989 splatting 1990svolume rendering hardware </li> <li> Slide 7 </li> <li> 7 Computer Graphics 15-462 Volume Rendering Pipeline Data volumes come in all types: tissue density (CT), relaxation time of certain molecules (MRI), windspeed, pressure, temperature, value of implicit function. Data volumes are used as input to a transfer function, which produces a sample volume of colors and opacities as output. Typical might be a 256x256x64 CT scan That volume is rendered to produce a final image. transfer function data volumes sample volume rendering final image </li> <li> Slide 8 </li> <li> 8 Computer Graphics 15-462 Transfer Functions The transfer function takes (multiple) scalar data values as input, and outputs RGBA It gets applied to every voxel in the volume model It can be very simple (a color lookup table) or very complicated (implementing CSG, voxel texturing, etc.) </li> <li> Slide 9 </li> <li> 9 Computer Graphics 15-462 Rendering Usually one just integrates color through the volume (ray casting) Recursive ray tracing is also possible But it gets confusing pretty quickly (shadows, filtered light, reflections, etc) For lighting we need surfaces! We can use the magnitude of the local gradient to check for surfaces (for example, bone is denser than fat on CT scans) And we can use the (negative of the) gradient direction as a lighting normal! Some, all, or none of the voxels will have surface lighting. And we need material properties! Either assume all the data is one material type, Or use a separate set of segmentation data to identify voxel materials. </li> <li> Slide 10 </li> <li> 10 Computer Graphics 15-462 Some Details Regular x-y-z data grids are easiest and fastest to handle, but algorithms exist for handling irregular grids like finite element models, where the voxels (volume elements) are not all parallelepipeds. Resample it or just deal with it Finite element data, ultrasound data Geometrical primitives can be handled by "rasterizing" them into data grids. This model was rasterized and rendered with VolVis </li> <li> Slide 11 </li> <li> 11 Computer Graphics 15-462 Accumulating Opacity By convention, opacity (alpha) ranges from 0.0 to 1.0, 1.0 being completely opaque. Multiple layers of material are composited according to their opacity. An ideal, continuous material takes the limit of this process as it goes to an infinite number of infinitely thin layers (exponentials). The local gradient of opacity can be used to detect surfaces, and as the normal for the lighting equation. </li> <li> Slide 12 </li> <li> 12 Computer Graphics 15-462 Ray Casting Volumes Just integrate color and opacity along the ray Simplest scheme just takes equal steps along ray, sampling opacity and color Grids make it easiest to find the next cell Its simple to include volumes as primitives in a ray tracer clouds, fog, smoke, fire done this way </li> <li> Slide 13 </li> <li> 13 Computer Graphics 15-462 Trilinear Interpolation How do you compute RGBA values which are not at sample points? Nearest neighbor (point sampling) yields blocky images Trilinear interpolation is better, but slower Just like texture mapping You can even mipmap in 3D Nearest NeighborTrilinear Interpolation </li> <li> Slide 14 </li> <li> 14 Computer Graphics 15-462 Splatting Wonderfully simple Working back-to-front (or front-to-back), draw a splat for each chunk of data Easy to implement, but not as accurate as ray casting works reasonably for non-gridded data closeup of a splat </li> <li> Slide 15 </li> <li> 15 Computer Graphics 15-462 Other Techniques Shear-Warp (Lacroute and Levoy) requires a grid sort of like Bresenham for volumes very fast with no hardware acceleration, but implementation is tricky Polygons + 3D texture Build a 3D texture, including opacity Draw a stack of polygons from back to front, with that texture Very efficient on machines with hardware acceleration that supports opacity Viewpoint 3D RGBA Texture Draw polygons back to front </li> <li> Slide 16 </li> <li> 16 Computer Graphics 15-462 CSG is Easy The transfer function can be used to mask a volume or merge volumes You are still confined to the grid, of course head or and not </li> <li> Slide 17 </li> <li> 17 Computer Graphics 15-462 Another CSG example (VolVis again) </li> <li> Slide 18 </li> <li> 18 Computer Graphics 15-462 Acceleration Techniques Limit yourself to what you can do in cache... and do multiple blocks if necessary Octrees Quit integration early- that last bit is slowest Error measures Parallelism </li> <li> Slide 19 </li> <li> 19 Computer Graphics 15-462 Pictures colliding galaxies </li> </ul>