Overview Volume Rendering � Surface graphics is not enough for ... � Introduction to volume graphics � Volume rendering techniques Lecture 21 � Contour surfaces � Ray Casting � Cell Projection Slides gathered from Roger Crawfis , Torsten Moeller, Raghu Machiraju, � Splatting Han-Wei Shen and Ross Whitaker 5/12/2003 R. Crawfis, Ohio State Univ. 2 Surface Graphics Difficulty with Surface Graphics � Traditionally, graphics objects are � Volumetric object handling modeled with surface primitives � gases, fire, smoke, clouds (amorphous data) ( surface graphics ). � sampled data sets (MRI, CT, scientific) � Continuous in object space � Peeling, cutting, sculpting � any operation that exposes the interior 5/12/2003 R. Crawfis, Ohio State Univ. 5/12/2003 R. Crawfis, Ohio State Univ. 3 4 Volume Graphics & Surface Volume Graphics Graphics � Defines objects on a 3D raster, or discrete � grid in object space � Raster grids: structured or unstructured � Data sets: sampled, computed, or voxelized � Peeling,cutting … are easy with a volume model 5/12/2003 R. Crawfis, Ohio State Univ. 5 5/12/2003 R. Crawfis, Ohio State Univ. 6 1
Volume Graphics - Pros Volume Graphics - Cons � Advantages: � Disadvantages: � Required for sampled data and � Large memory and processing amorphous phenomena power � Insensitive to scene complexity � Object- space aliasing � Insensitive to surface type � Discrete transformations � Allows block operations � Notion of objects is different 5/12/2003 R. Crawfis, Ohio State Univ. 5/12/2003 R. Crawfis, Ohio State Univ. 7 8 Volume Graphics Applications More Volume Graphics (simulation data set) Applications (artistic data set) � Scientific data set visualization � Amorphous entity visualization � smoke, steam, fire 5/12/2003 R. Crawfis, Ohio State Univ. 5/12/2003 R. Crawfis, Ohio State Univ. 9 10 Volume Rendering Algorithms How to visualize? slice � Slicing: display the volume � Intermediate geometry based data, mapped to colors, (marching cube) along a slice plane � Direct volume rendering � Iso-surfacing: generate opaque and semi-opaque � Splatting (forward projection) surfaces on the fly � Ray Casting (backward projection) or � Transparency effects: resampling volume material attenuates reflected or emitted light � Cell Projection / scan-conversion Semi-transparent � Image warping Iso-surface material 5/12/2003 R. Crawfis, Ohio State Univ. 11 5/12/2003 R. Crawfis, Ohio State Univ. 12 2
Semi -Transparent - How? Semi -Transparent - How? � Radiative transport � Rendering Integral theory (Sabella, Max, …) Transport of Light � model the interaction of t light with the material ( ) s ds ( ) ∫ = − α I ( t ) c s e observer t 0 t t 1 t Emission(+) 0 s Scattering(+) ( ) C(t): shade ∫ ρ α = ( s ) k u du α (t): opacity Absorption(-) ρ (t): “density” t 0 � Discretize Integral!! light 5/12/2003 R. Crawfis, Ohio State Univ. 5/12/2003 R. Crawfis, Ohio State Univ. 13 14 Solution of Integral Evaluation = Compositing � Numerically! � “over” operator - Porter & Duff 1984 � I.e. discretize rendering integral C(0) in C in � replace integral with a Riemann sum C, α � Iterative integral evaluation - “over” operator C i , α i � difference: Front-To-Back and Back-To-Front C out C(N) out ( ) ( ) out = ⋅ − α + ⋅ α = − C C ( 1 ) C C i C i 1 out in in 5/12/2003 R. Crawfis, Ohio State Univ. 5/12/2003 R. Crawfis, Ohio State Univ. 15 16 Compositing: Over Operator Direct Rendering Pipeline I c f = (0,1,0) a f = 0.4 � Detection of Structures � Shading � Reconstruct (interpolate/filter) c = a f * c f + (1 - a f )* a b * c b color/opacity a = a f + (1 - a f )* a b � Composite c b = (1,0,0) � Final Image Validation (change c = (0.54,0.4,0) a b = 0.9 parameters) a = 0.94 5/12/2003 R. Crawfis, Ohio State Univ. 17 5/12/2003 R. Crawfis, Ohio State Univ. 18 3
Direct Rendering Pipeline II Direct Rendering Pipeline III � Better yet, reconstruct the function and � For continuous media or functions without delay the classification until after the interfaces, such as temperature: resampling: � Reconstruct (interpolate/filter) color/opacity � Reconstruct (interpolate/filter) function � Composite values. � Final Image Validation (change parameters) � Apply the transfer function or color table to each sample � Composite � Final Image Validation (change parameters) 5/12/2003 R. Crawfis, Ohio State Univ. 5/12/2003 R. Crawfis, Ohio State Univ. 19 20 Direct Rendering Pipeline Vs. Surface Graphics � Transformation - similar, however some optimizations possible (shearing) Classify Reconstruct � Classification - similar for scalar data, new Shade concepts needed for vector/multi-modal data Visibility Composite � Interpolation - similar, plus accuracy issues of order discretization of the rendering integral � Shading - similar concepts for surface effects (diffuse, specular) � Compositing - novel for transparencies based on rendering integral Validate 5/12/2003 R. Crawfis, Ohio State Univ. 5/12/2003 R. Crawfis, Ohio State Univ. 21 22 Early Methods Back-To-Front - Frieder et al 1985 � Before 1988 � A viewing algorithm that traverses and renders the scene objects in order of decreasing � Did not consider transparency distance from the observer. � did not consider sophisticated light � Maybe derived from a standard - transportation theory “Painters Algorithm” � were concerned with quick solutions � hence more or less applied to binary data 1. 2. 3. 5/12/2003 R. Crawfis, Ohio State Univ. 23 5/12/2003 R. Crawfis, Ohio State Univ. 24 4
Back-To-Front - Frieder et al 1985 Back-To-Front - Frieder et al 1985 � 2D � 3D x A � Start traversal at point farthest � Axis traversal can still be done arbitrarily, 8 orders B from the observer, � Data can be read and rendered as slices � 2 orders C D � Note: voxel projection is NOT in order of strictly � Either x or y can be innermost loop decreasing distance, so this is not the painter’s algorithm. � If x is innermost, display order will be A, C, B, D � Persepctive? y Screen 003 013 023 033 103 113 123 133 033 � If y is innermost, display order will be C, A, D, B 203 213 223 233 133 303 313 323 333 233 032 � Both result in the correct image! 333 132 303 313 323 333 232 031 � If voxel (x,y) is (partially) obscured by voxel (x’,y’), then 332 131 302 312 322 332 x <= x’ and y <= y’. So project (x,y) before (x’,y’) and the 231 030 331 130 image will be correct 301 311 321 331 230 330 300 310 320 330 5/12/2003 R. Crawfis, Ohio State Univ. 5/12/2003 R. Crawfis, Ohio State Univ. 25 26 Ray Tracing Ray Casting � “another” typical method from traditional � Since we have no surfaces - we need to carefully graphics step through the volume: a ray is cast into the volume, sampling the volume at certain intervals � Typically we only deal with primary rays - hence: ray-casting � The sampling intervals are usually equi-distant, but don’t have to be (e.g. importance sampling) � a natural image-order technique � At each sampling location, a sample is � as opposed to surface graphics - how do we interpolated / reconstructed from the grid calculate the ray/surface intersection??? voxels � Since we have no surfaces - we need to carefully � popular filters are: nearest neighbor (box), step through the volume trilinear (tent), Gaussian, cubic spline � Along the ray - what are we looking for? 5/12/2003 R. Crawfis, Ohio State Univ. 5/12/2003 R. Crawfis, Ohio State Univ. 27 28 Basic Idea of Ray-casting Pipeline Ray Traversal Schemes Intensity Max - Data are defined at the corners of each cell (voxel) Average - The data value inside the c1 voxel is determined using interpolation (e.g. tri-linear) c2 Accumulate - Composite colors and opacities First c3 along the ray path - Can use other ray-traversal schemes as well Depth 5/12/2003 R. Crawfis, Ohio State Univ. 29 5/12/2003 R. Crawfis, Ohio State Univ. 30 5
Ray Traversal - First Ray Traversal - Average Intensity Intensity Average First Depth Depth � First : extracts iso-surfaces (again!) � Average : produces basically an X-ray picture done by Tuy&Tuy ’84 5/12/2003 R. Crawfis, Ohio State Univ. 5/12/2003 R. Crawfis, Ohio State Univ. 31 32 Ray Traversal - MIP Ray Traversal - Accumulate Intensity Intensity Max Accumulate Depth Depth � Max : Maximum Intensity Projection � Accumulate : make transparent layers visible! used for Magnetic Resonance Angiogram Levoy ‘88 5/12/2003 R. Crawfis, Ohio State Univ. 5/12/2003 R. Crawfis, Ohio State Univ. 33 34 Levoy - Pipeline Volumetric Ray Integration Acquired values Data preparation color Prepared values opacity shading classification Voxel colors Voxel opacities Ray-tracing / resampling Ray-tracing / resampling 1.0 Sample colors Sample opacities compositing object (color, opacity) Image Pixels 5/12/2003 R. Crawfis, Ohio State Univ. 35 5/12/2003 R. Crawfis, Ohio State Univ. 36 6
Recommend
More recommend