Presentation is loading. Please wait.

# Other DVR Algorithms and A Comparison Jian Huang, CS 594, Spring 2002.

## Presentation on theme: "Other DVR Algorithms and A Comparison Jian Huang, CS 594, Spring 2002."— Presentation transcript:

Other DVR Algorithms and A Comparison Jian Huang, CS 594, Spring 2002

Papers Covered P. Lacroute et. al, SIGGRAPH’94 (shear-warp) B. Cabral et. al, VolViz’94 (3D texture mapping) M. Meissner et. al, VolViz’2000 (A practical comparison of the four main volume rendering algorithms)

Shear Warp Algorithm Goal – speed!! Approach: make viewing rays parallel to each other and perpendicular to the image –Achieved by a simple shear shear warp Original method only works with orthogonal projection, later extended to perspective projection but less efficient and less known.

Shear Warp Algorithm Stop rays in every sheared slice and use bilinear interpolation to estimate a sample value –only interpolate in-slice, not between slices as in usual raycasting –cheap bilinear interpolation instead of trilinear interpolation in raycasting Volume is projected onto a baseplane parallel to the volume slices –NOT the image plane: the resulting image is called intermediate image Undo the shearing by warping the intermediate image onto the true image plane (use M -1 shear, the inverse of M-shear ) The mapping of the pixels in the intermediate image to the true image is done via resampling, using another bilinear interpolation

Shear Warp Algorithm

General algorithm: Where –M view = general viewing matrix –P = permutation matrix, which transposes the coordinate system in order to make the z-axis the principal viewing axis –S = transforms volume into sheared object space –M warp = sheared object coordinates into image coordinates

Shear Warp Algorithm Parallel vs. Perspective shear warp

Shear Warp Algorithm Three properties: 1. scanlines of pixels in the intermediate image are parallel to scanlines of voxels in the volume data 2. (orthogonal projection only) all voxels in a given voxel slice are scaled by the same factor 3. (orthogonal projections only) every voxel slice had the same scale factor, and this factor can be chosen arbitrarily. In particular, we can choose a unity scale factor so that for a given voxel scan-line there is a one-to-one mapping between voxels and intermediate image pixels.

Shear Warp Algorithm Property one leads to dynamic screen type data structure: skip work skip work resample and composite transparent voxel run non-transparent voxel run opaque image pixel run non-opaque image pixel run

Shear Warp Algorithm Parallel projection: –efficient reconstruction –lookup table for shading –lookup table for opacity correction (thickness) –three RLE of the actual volume (in x, y, z) Perspective Projection: –similar to parallel projection –except - voxels also need to be scaled! –Hence more than two voxel scan-lines needed for one image scan- line

Shear Warp Algorithm Fast classification: –classification through density and gradient of density –consider “block” of volume, that contains the scan-line –is it transparent? –Yes - if whole block is transparent –No - subdivide block –transparent blocks - lookup through summed area table SAT

Shear Warp Algorithm Advantage: Very fast when opacity transfer function is kept constant Disadvantages: –Need to encode the volume after each opacity transfer change –Need 3 encoded volumes, one for each main viewing axis –True sampling rate in z varies between [1.0, 1.72] due to shearing thus Nyquist theorem is almost always violated leads to staircasing artifacts for diagonal views (e. g., at 45°) –Always pre- shaded, no post-shading. Blurred zoom-in views

Texture Mapping 2D image2D polygon + Textured-mapped polygon

Texture Mapping (2) (0,0) (1,0) (0,1)(1,1) Each texel has 2D coordinates assigned to it. assign the texture coordinates to each polygon to establish the mapping (0,0.5)(0.5,0.5) (0,0)(0.5,0)

Tex. Mapping for Volume Rendering Remember ray casting … y z

Texture based volume rendering x z y Render each xz slice in the volume as a texture-mapped polygon The texture contains RGBA (color and opacity) The polygons are drawn from back to front

Texture based volume rendering Algorithm: (using 2D texture mapping hardware) Turn off the z-buffer; Enable blending For (each slice from back to front) { - Load the 2D slice of data into texture memory - Create a polygon corresponding to the slice - Assign texture coordinates to four corners of the polygon - Render and composite the polygon (use OpenGL alpha blending) }

Some Considerations… (2) What if we change the viewing position? That is okay, we just change the eye position (or rotate the polygons and re-render), Until … y z

Some Considerations… (3) Until … y z You are not going to see anything this way … This is because the view direction now is Parallel to the slice planes What do we do?

Some Considerations… (4) y z What do we do? Change the orientation of slicing planes Now the slice polygons are parallel to XZ plane in the object space We need to reorganize the input textures Reorganize the textures on the fly is too time consuming. We might want to prepare this texture sets beforehand

Some Considerations… (5) When do we need to change the slicing planes? ? y z When the major component of view vector changes from z to y

Some Considerations… (6) Major component of view vector? Normalized view vector (x,y,z) -> get the maximum one If x: then the slicing planes are parallel to yz plane If y: then the slicing planes are parallel to xz plane If z: then the slicing planes are parallel to xy plane -> This is called (object-space) axis-aligned method. Therefore, we need to keep three copies of data around all the time!!

Problem Object-space axis-alighed method can create artifact: Poping Effect y z V = 44.999 V = 45.0001 There is a sudden change of viewing slicing (and thus the sampling rate) then the view vector transits from one major direction to another. The change in the result image intensity can be quite visible

Solution Use image-aligned slicing plane: the slicing planes are always parallel to the image plane

3D Texture Mapping Arbitrary slicing through the volume and texture mapping capabilities are needed - Arbitrary slicing polygon: this can be computed using software in real time This is basically polygon-volume clipping

3D Texture Mapping Texture mapping to the arbitrary slices This requires 3D texture mapping harware Input texture: volume (pre-classified and shaded) essentially an (R,G,B,  ) volume Depending on the position of the polygon, appropriate textures are resampled, constructed and mapped to the polygon.

Solid (3D) Texture Mapping Now the input texture space is 3D Texture coordinates: (r,s,t) (0,0,0) (1,0,0) (0,1,0) (1,1,0) (0,1,1)(1,1,1) (r0,s0,t0) (r1,s1,t1) (r2,s2,t2)(r3,s3,t3)

Pros and Cons Advantages : - Fast with volume sizes that the hardware can take e.g. 2 fps for 256 cube volumes - No popping effect Disadvantages: - Need to compute the slicing planes for every view angle - only supported on high end hardware - low quality without per-pixel classification shading and classification (i.e. post-classification and shading) Both 2D or 3D hardware texture mapping methods can not compute Shading on the fly. The input textures have to be pre-shaded. With multi-texturing functions, per-pixel shading and classification are becoming possible.

A Practical Comparison Quality is directly correlated with –how closely the volume ray integration can be approximated –and the quality of volume reconstruction –post-reconstruction shading and classification are key to visual sharpness of renderings. Ray-casting and image-aligned splatting are of high quality, each is more efficient for different types of data sets Not considering limitations of hardware precision, 3D texture mapping can achieve high quality as well Shear-warp is fast but poor quality

Download ppt "Other DVR Algorithms and A Comparison Jian Huang, CS 594, Spring 2002."

Similar presentations

Ads by Google