Presentation is loading. Please wait.

Presentation is loading. Please wait.

8.1 Vis_04 Data Visualization Lecture 8 3D Scalar Visualization Volume Rendering : Further Ray Casting plus Other Approaches.

Similar presentations

Presentation on theme: "8.1 Vis_04 Data Visualization Lecture 8 3D Scalar Visualization Volume Rendering : Further Ray Casting plus Other Approaches."— Presentation transcript:

1 8.1 Vis_04 Data Visualization Lecture 8 3D Scalar Visualization Volume Rendering : Further Ray Casting plus Other Approaches

2 8.2 Vis_04 Classical Approach - Volume Rendering Integral n Cast rays through image plane into volume, and measure light received – Kajiya and von Hertzen (1984) – Max (1995) L s I = L 0 C(s) (s) exp[ - s 0 (t)dt ] ds C(s)=light reflected at point s (s) = density at point s lightdensityattenuation image plane volume

3 8.3 Vis_04 Simplifying the Integral n Approximate using Riemann sums (n = number of steps) Approximate exponential by Taylor series and introduce opacity,, and unit spacing n Calculate recursively front-to- back as... I = L 0 C(s) (s) exp[ - s 0 (t)dt ] ds I = n i=0 C(i s) (i s) s i-1 j=0 exp [- (j s) s] I = n i=0 C(i) (i) i-1 j=0 (1 - (j)) C out = C in + (1- in ) i C i out = in + i (1 - in ) Compositing associative but not commutative ie can group but cannot re-order {stop when = 1}

4 8.4 Vis_04 Interpolation n Sample points occur within cells, not at grid points, so we need to interpolate n Do we: – classify at grid points, then interpolate colour / opacity – interpolate data values, then classify – ? n Classify - interpolate – classification done as pre-processing – smoothing effect can obscure detail n Interpolate - classify – classification now within the inner loop of the ray cast (sample points are view dependent) – in return, fine detail can be picked out

5 8.5 Vis_04 Classify - Interpolate n There is a danger in interpolation after classification n Naïve colour interpolation would assign 3 parts yellow, 1 part blue to centre point… … but if opacity of bottom left is zero? Correct approach is to weight according to opacity, so colour at centre is yellow! =1 =0

6 8.6 Vis_04 A Note on Shading n The appearance of volume rendered images depends critically on the reflectance calculation used to shade the samples...

7 8.7 Vis_04 A Note on Shading At (x i,y j,z k ), df/dx = 0.5*(f i+1,j,k - f i-1,j,k ) df/dy = 0.5*(f i,j+1,k - f i,j-1,k ) df/dz = 0.5*(f i,j,k+1 - f i,j,k-1 ) This gives us normals at all grid points n Recall from isosurface rendering - that surface normal is equal to the gradient vector of f

8 8.8 Vis_04 A Note on Shading n If the classification is done at the vertices, there is a choice: – Gouraud-type: shade vertices and then interpolate to get reflected colour at sample point – Phong-type: interpolate normals at vertices to get sample normal and then calculate shading n Phong-type gives better quality - at the cost of more computational effort

9 8.9 Vis_04 Ray Casting n Advantages – Non binary classification – Shows structure between surfaces – Readily parallelisable n Disadvantages – Computationally expensive - cost proportional to number of voxels (compositing is expensive) – Does not take advantage of triangle rendering hardware

10 8.10 Vis_04 Ray Casting Examples n The following sequence of slides were produced using the ray casting technique available in the vtk software n The slides show for the bonsai tree data set how different aspects can be highlighted by control of the opacity transfer n The slides also show, by animation, a comparison of different approaches to interpolation and shading n Thanks to Chris Goodyer for creating the images

11 8.11 Vis_04 Legend n NN = classify vertex, shade, nearest neighbour interpolate n Trilin Vertex = classify vertex, trilinear interpolate, shade n Trilin Sample = trilinear interpolate, classify, shade

12 8.12 Vis_04 Bonsai Tree NN – TrilinVertex – TrilinSample NN TrilinVertex TrilinSample

13 8.13 Vis_04 Bonsai Tree Branches NN – TrilinVertex - TrilinSample

14 8.14 Vis_04 Bonsai Tree Leaves NN – TrilinVertex - TrilinSample

15 8.15 Vis_04 Skull NN – TrilinVertex - TrilinSample

16 8.16 Vis_04 Texture-based Volume Rendering n Volume rendering by ray casting is time-consuming – one ray per pixel – each ray involves tracking through volume calculating samples, and then compositing – different for each viewpoint n Alternative approach - using texture maps - can exploit graphics hardware

17 8.17 Vis_04 Texture Mapping n Modern graphics hardware includes facility to draw a textured polygon n The texture is an image with red, green, blue and alpha components… n … this is used in computer graphics to avoid constructing complex geometric models … and we can exploit this in volume rendering

18 8.18 Vis_04 Texture-based Volume Rendering n Draw from back-to-front a set of rectangles – first rectangle drawn as an area of coloured pixels, with associated opacity, as determined by transfer function and interpolation - and merged with background in a compositing operation (supported by hardware) – successive rectangles drawn on top

19 8.19 Vis_04 3D Texture-based Volume Rendering n For a given viewing direction, we would need to select slices perpendicular to this direction n This requires interpolation to get the values on the slices n Until recently this has only been possible with expensive graphics boards image plane volume 3D texture mapping

20 8.20 Vis_04 2D Texture-based Volume Rendering n Simpler solution - 2D texture mapping: – view volume as set of slices parallel to co- ordinate planes -Precompute the textured planes for each of the 3 directions -Choose the orientation best suited to viewing direction

21 8.21 Vis_04 Texture-based Volume Rendering

22 8.22 Vis_04 Comparison of Ray Casting and Texture Approaches Ray casting Texture-based

23 8.23 Vis_04 Close Up Ogle: texture-based Vlib: ray casting

24 8.24 Vis_04 Shear Warp Rendering n To get fast traversal, shear volume by translating each slice… then can resample as shown n Project front-to- back to get intermediate image n Then warp image

25 8.25 Vis_04 Example of Shear Warp Rendering

26 8.26 Vis_04 New Hardware Advances n Holy grail: real-time volume rendering n Main searcher has been Kaufman through Cube architectures n VolumePro System first commercially available from Mitsubishis RealTime Visualization, now from TeraRecon n Uses shear-warp rendering

27 8.27 Vis_04 Splatting n Another commonly used method is splatting n Fuzzy balls around each voxel projected on to image plane n Composited in the image plane n VolumeToGeom in IRIS Explorer

28 8.28 Vis_04 Summary of Volume Rendering Techniques n Ray casting n Splatting – Both high quality, computationally expensive n Texture-based n Shear-warp – Both lower quality, but faster

29 8.29 Vis_04 Reading n Overviews of Volume Visualization – Todd Elvins, `A Survey of Algorithms for Volume Visualization, Computer Graphics, 1992 – Ken Brodlie and Jason Wood, Computer Graphics Forum, 2001 – Michael Meissner et al, A Practical Evaluation of Popular Volume Rendering Algorithms, n Ray Casting - Classic Paper – Marc Levoy, `Display of Surfaces from Volume Data, IEEE CG&A, 1988 n Book – Introduction to Volume Rendering, Lichtenbelt, Crane, Naqvi, Hewlett-Packard Professional Books

Download ppt "8.1 Vis_04 Data Visualization Lecture 8 3D Scalar Visualization Volume Rendering : Further Ray Casting plus Other Approaches."

Similar presentations

Ads by Google