Download presentation

Published byBenjamin Mitchell Modified over 3 years ago

1
**Data Visualization Lecture 8 3D Scalar Visualization**

Volume Rendering : Further Ray Casting plus Other Approaches

2
**Classical Approach - Volume Rendering Integral**

C(s)=light reflected at point s Cast rays through image plane into volume, and measure light received Kajiya and von Hertzen (1984) Max (1995) volume m(s) = density at point s image plane s L I = L0C(s)m(s) exp[ -s0 m(t)dt ] ds light density attenuation

3
**Simplifying the Integral**

I = L0C(s)m(s) exp[ -s0 m(t)dt ] ds Approximate using Riemann sums (n = number of steps) Approximate exponential by Taylor series and introduce opacity, a, and unit spacing Calculate recursively front-to-back as... I = Sni=0 C(iDs)m(iDs)Ds Pi-1j=0 exp [-m (jDs)Ds] I = Sni=0 C(i)a(i) Pi-1j=0 (1 - a(j)) Cout = Cin + (1-ain)aiCi aout = ain + ai(1 - ain) {stop when a = 1} Compositing associative but not commutative ie can group but cannot re-order

4
Interpolation Sample points occur within cells, not at grid points, so we need to interpolate Do we: classify at grid points, then interpolate colour / opacity interpolate data values, then classify ? Classify - interpolate classification done as pre-processing smoothing effect can obscure detail 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
**Classify - Interpolate**

There is a danger in interpolation after classification 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!

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

7
A Note on Shading Recall from isosurface rendering - that surface normal is equal to the gradient vector of f At (xi,yj,zk), 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

8
A Note on Shading 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 Phong-type gives better quality - at the cost of more computational effort

9
**Ray Casting Advantages Disadvantages Non binary classification**

Shows structure between surfaces Readily parallelisable Disadvantages Computationally expensive - cost proportional to number of voxels (compositing is expensive) Does not take advantage of triangle rendering hardware

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

11
**Legend NN = classify vertex, shade, nearest neighbour interpolate**

Trilin Vertex = classify vertex, trilinear interpolate, shade Trilin Sample = trilinear interpolate, classify, shade

12
**Bonsai Tree NN – TrilinVertex – TrilinSample**

13
**Bonsai Tree Branches NN – TrilinVertex - TrilinSample**

14
**Bonsai Tree Leaves NN – TrilinVertex - TrilinSample**

15
**Skull NN – TrilinVertex - TrilinSample**

16
**Texture-based Volume Rendering**

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 Alternative approach - using texture maps - can exploit graphics hardware

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

18
**Texture-based Volume Rendering**

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
**3D Texture-based Volume Rendering**

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

20
**2D Texture-based Volume Rendering**

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
**Texture-based Volume Rendering**

22
**Comparison of Ray Casting and Texture Approaches**

Texture-based Texture-based Ray casting

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

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

25
**Example of Shear Warp Rendering**

26
**New Hardware Advances Holy grail: real-time volume rendering**

Main searcher has been Kaufman through Cube architectures VolumePro System first commercially available from Mitsubishi’s RealTime Visualization, now from TeraRecon Uses shear-warp rendering

27
**Splatting Another commonly used method is splatting**

Fuzzy balls around each voxel projected on to image plane Composited in the image plane VolumeToGeom in IRIS Explorer

28
**Summary of Volume Rendering Techniques**

Ray casting Splatting Both high quality, computationally expensive Texture-based Shear-warp Both lower quality, but faster

29
**Reading Overviews of Volume Visualization Ray Casting - Classic Paper**

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’, Ray Casting - Classic Paper Marc Levoy, `Display of Surfaces from Volume Data’, IEEE CG&A, 1988 Book Introduction to Volume Rendering, Lichtenbelt, Crane, Naqvi, Hewlett-Packard Professional Books

Similar presentations

OK

7.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 7 Polygon Shading Techniques.

7.1 si31_2001 SI31 Advanced Computer Graphics AGR Lecture 7 Polygon Shading Techniques.

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on 3d holographic projection technology Ppt on tcp ip protocol architecture Ppt on producers consumers and decomposers in a food Ppt on bank lending practices Download ppt on corruption Ppt on forward rate agreement example Ppt on samsung mobile company Ppt on save environment pictures Ppt on phonetic transcription converter Ppt on transportation in plants and animals