DOC PREVIEW
SBU CSE 332 - Lecture 13 - Full Volume Rendering

This preview shows page 1-2-3-4-5 out of 16 pages.

Save
View full document
Premium Document
Do you want full access? Go Premium and unlock all 16 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

CSE 332 Introduction to Visualization Lecture 13 Full Volume Rendering Klaus Mueller Stony Brook University Computer Science Department Klaus Mueller Stony Brook 2003 1 Full Volume Rendering Examples Foot of the Visible Woman 2 Full Volume Rendering Overview Here we consider the volume as a transparent gel Our opacity transfer function is no longer a step to 1 0 at the iso value it is now an arbitrary user selected function The rays accumulate colors and opacities transparencies as they step across the volume Once the opacity has reached a value close to 1 0 we can stop the ray everything further back is hidden by the cumulative opaque structures in front Red 1 0 1 0 Green 0 99 1 0 100 200 density 100 200 density 0 85 0 75 0 5 0 0 Blue Opacity ray bone 1 0 tissue 100 200 density 100 200 density voxel value 200 voxel value 100 stop here 3 The Volume Rendering Integral 1 Consider a volume consisting of particles ray r each has color C and light attenuating density C2 2 A rendering ray accumulates attenuated colors C1 1 We write the continuous volume rendering integral I x r L C s s e 0 s t t 0 d ds this is generally not solvable analytically Note the more density s a particle has the more color it contributes We can approximate it by discretizing it into sampling intervals of width s L s i 1 I x r C i s i s s e j s s i 0 j 0 Color is the sum of emitted color E and reflected color R C E R ray r s C2 2 C1 1 R is obtained via illumination E is the particle glow 4 The Volume Rendering Integral 2 A few approximations will make computing this equation more efficient First we define transparency t i s as follows exp i s s t i s Transparency assumes values in the range 0 0 1 0 Opacity is defined as 1 transparency i s 1 t i s We can approximate the exponential term above by the first two terms of its Taylor expansion t i s exp i s s 1 i s s Then we can write i s s 1 t i s i s We get the most commonly used discretized volume rendering integral L s i 1 I x r C i s i s 1 j s i 0 j 0 This is a recursive equation and we can solve it by stepwise compositing samples along the ray 5 What Exactly is Compositing It is the accumulation of colors weighted by opacities Compositing is commonplace in cartoon animations blend images of static objects with images of dynamic characters so called cel animations Colors and opacities of back pixels are attenuated by opacities of front pixels rgb RGBback back 1 front RGBfront front back 1 front front By using rgbback RGBback back rgbfront RGBfront front RGB front front image RGB back composite back image we get 2 recursive equations that can be used to composite any number of objects front to back rgbfront rgbback 1 front rgbfront front back 1 front front Volume rendering uses this recursive expression to combine composite the samples taken along the ray 6 Compositing Example back front Area 1 compositing 0 5 1 0 Area 2 G 1 0 R B 0 0 Area 1 R 1 0 G B 0 0 Area 2 r g b front 0 0 0 0 0 0 r g b back 1 0 0 0 0 0 r g b front 0 0 0 5 0 0 r g b back 1 0 0 0 0 0 r g b front 1 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 r g b front 1 0 1 0 5 0 0 0 0 1 0 5 0 5 0 0 1 0 5 0 0 0 5 0 5 0 0 front 1 0 1 0 0 0 0 1 0 back front 1 0 1 0 5 0 5 1 0 7 The Volume Rendering Pipeline Two Variations 1 Pre shaded pipeline blurry edges for all rays for all voxels classify shade start ray interpolate sample composite write pixel advance ray color volume opacity volume density volume write image Post shaded pipeline order of classification interpolation interchanged crisper edges for all rays start ray interpolate sample classify shade composite write pixel advance ray density volume write image 8 The Volume Rendering Pipeline Two Variations 2 Pre shaded pipeline Post shaded pipeline original step function the edge classify and shade first interpolate first interpolate shaded edge classify and shade result blurred edge result crisp edge we will use the post shaded pipeline 9 Full Volume Rendering Algorithm For Perspective Viewing j FullVolRenPostShadePersp Volume V int stepSize Image I P 0 0 u eye ray for each image pixel i j v P i j i image ray P i j eye P i j eye the ray direction vector normalized P i j P 0 0 i v j u the location of image pixel i j in world volume space r g b 0 0 initialize red green blue color and opacity to 0 for t t front t t back t stepSize traverse the volume front to back sampleLoc P i j t stepSize ray step along the ray intVal Interpolate V sampleLoc if AlphaTransFunc intVal 0 05 only do work for non transparent samples gradVec ComputeGradientVector V sampleLoc R G B Shade gradVec lightSource eye sampleLoc R G B TransFunc intVal r g b AlphaTransFunc intVal R G B 1 r g b composite color AlphaTransFunc intVal 1 composite opacity if 0 95 everything further is hidden and can t be seen so stop the ray I i j r g b break write color to image pixel and go to next pixel 10 Full Volume Rendering Algorithm For Orthographic Viewing j FullVolRenPostShadeOrtho Volume V int stepSize Image I P 0 0 ray u x v u x v vector perpendicular to camera plane ray u v P i j i image for each image pixel i j P i j P 0 0 i v j u the location of image pixel i j in world volume space r g b 0 0 initialize red green blue color and opacity to 0 for t t front t t back t stepSize traverse the volume front to back sampleLoc P i j t stepSize ray step along the ray intVal Interpolate V sampleLoc if AlphaTransFunc intVal 0 05 only do work for non transparent samples gradVec ComputeGradientVector V sampleLoc R G B Shade gradVec lightSource eye sampleLoc R G B TransFunc intVal r g b AlphaTransFunc intVal R G B 1 r g b composite color AlphaTransFunc intVal 1 composite opacity if 0 95 everything further is hidden and can t be seen so stop the ray I i j r g b break write color to image pixel and …


View Full Document

SBU CSE 332 - Lecture 13 - Full Volume Rendering

Download Lecture 13 - Full Volume Rendering
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 13 - Full Volume Rendering and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 13 - Full Volume Rendering and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?