object space volume rendering
play

Object Space Volume Rendering 4-1 Ronald Peikert SciVis 2007 - - PowerPoint PPT Presentation

Object Space Volume Rendering 4-1 Ronald Peikert SciVis 2007 - Object Space Volume Rendering Object space volume rendering In object space rendering methods, the main loop is not over the pixels but over the objects in 3-space. In the case of


  1. Object Space Volume Rendering 4-1 Ronald Peikert SciVis 2007 - Object Space Volume Rendering

  2. Object space volume rendering In object space rendering methods, the main loop is not over the pixels but over the objects in 3-space. In the case of direct volume rendering "objects" can mean: In the case of direct volume rendering, "objects" can mean: • layers of voxels: image compositing methods – 2D texture based 2D t t b d – 3D texture based • voxels: splatting methods l l tti th d • cells: cell projection methods 4-2 Ronald Peikert SciVis 2007 - Object Space Volume Rendering

  3. Texture-based volume rendering Volume rendering by 2D texture mapping: • use planes parallel to base plane (front face of volume which is "most orthogonal" to view ray) most orthogonal to view ray) • draw textured rectangles, using bilinear interpolation filter render back-to-front, using α -blending for the α -compositing • Image credit: H.W.Shen, Ohio State U. 4-3 Ronald Peikert SciVis 2007 - Object Space Volume Rendering

  4. Texture-based volume rendering Volume rendering by 3D texture mapping (Cabral 1994): • use the voxel data as the 3D texture • • render an arbitrary number of slices (eg 100 or 1000) parallel to render an arbitrary number of slices (eg. 100 or 1000) parallel to image plane (3- to 6-sided polygons) • back-to-front compositing as in 2D texture method Limited by size of texture memory. Image credit: H.W.Shen, Ohio State U. 4-4 Ronald Peikert SciVis 2007 - Object Space Volume Rendering

  5. The shear-warp factorization In general the image plane is not parallel to a volume face. Th The shear-warp method by Lacroute allows to render an h th d b L t ll t d intermediate image in the base plane: • transform to sheared object space by translating (and j p y g ( possibly scaling) the voxel layers • render the intermediate image in the base plane • warp the intermediate image 4-5 Ronald Peikert SciVis 2007 - Object Space Volume Rendering

  6. The shear-warp factorization object space sheared object space view rays shear translated orthographic voxel layers view view base plane view rays translated shear shear perspective perspective and scaled d l d view voxel layers base plane 4-6 Ronald Peikert SciVis 2007 - Object Space Volume Rendering

  7. Orthographic shear-warp The view transformation ("modelview" in OpenGL) is an affine transformation, consisting of a rotation and a translation. Ignoring the translation the 3x3 submatrix can be factorized: Ignoring the translation, the 3x3 submatrix can be factorized: = ⋅ ⋅ M W S P view where: where: • P is a permutation matrix mapping the base plane (front face of the volume most orthogonal to the center view ray) to the xy-plane • S is the shear matrix • W is the warp matrix 4-7 Ronald Peikert SciVis 2007 - Object Space Volume Rendering

  8. Orthographic shear-warp The shear is of the form ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ x x s x ⎜ ⎜ ⎟ ⎟ ⎜ ⎜ ⎟ ⎟ ⎜ ⎜ ⎟ ⎟ = + S y y z s ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ y ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎝ z ⎠ ⎝ z ⎠ ⎝ 0 ⎠ Hence, the shear matrix ⎡ ⎤ 1 0 s x ⎢ ⎢ ⎥ ⎥ = ⎢ S 0 1 s ⎥ y ⎢ ⎥ ⎣ 0 0 1 ⎦ where s x and s y have to be solved for from M view . 4-8 Ronald Peikert SciVis 2007 - Object Space Volume Rendering

  9. Orthographic shear-warp The warp is a 3x3 matrix, but effectively an affine transformation of the xy-plane. The third row of W is irrelevant while two zeros in the third column The third row of W is irrelevant while two zeros in the third column are required to make the warp independent of z: ⎡ ⎤ w w 0 00 01 ⎢ ⎥ = ⎢ W w w 0 ⎥ 10 11 ⎢ ⎢ ⎥ ⎥ w w w ⎣ ⎦ 20 21 22 4-9 Ronald Peikert SciVis 2007 - Object Space Volume Rendering

  10. Orthographic shear-warp Assuming for simplicity that P is the identity, we get: ⎡ ⎡ ⎤ ⎤ + + ⎡ ⎡ ⎤ ⎤ v v v v v v w w w w s w s w s w s w x x y y ⎢ ⎥ 00 00 01 01 02 02 00 00 01 01 00 00 01 01 ⎢ ⎥ = = ⋅ = + M v v v W S w w s w s w ⎢ ⎥ ⎢ ⎥ view x y 10 11 12 10 11 10 11 ⎢ ⎥ ⎢ ⎥ + + v v v w w s w s w w ⎣ ⎣ ⎦ ⎦ ⎣ ⎣ ⎦ ⎦ x x y y 20 20 21 21 22 22 20 20 21 21 20 20 21 21 22 22 ( ( ) ) = j ≠ It follows for the warp coefficients w v j 2 ij ij ij ij − 1 ⎛ ⎞ ⎡ ⎤ ⎛ ⎞ s v v v = for the shear coefficients x ⎜ ⎟ 00 01 02 ⎜ ⎜ ⎟ ⎟ ⎢ ⎢ ⎥ ⎥ s s ⎣ ⎣ v v v v ⎦ ⎦ ⎝ ⎝ v v ⎠ ⎠ ⎝ ⎝ ⎠ ⎠ y 10 11 12 = − − + w s v s v v and for w 22 (not needed) x y 22 20 21 22 If P is not the identity, permuted versions of S and W can be used. If P i t th id tit t d i f S d W b d 4-10 Ronald Peikert SciVis 2007 - Object Space Volume Rendering

  11. Orthographic shear-warp Example renderings: "VolPack" demos (P. Lacroute, Stanford U.) 4-11 Ronald Peikert SciVis 2007 - Object Space Volume Rendering

  12. Perspective shear-warp The same factorization can be used, but now in homogenous coordinates: = ⋅ ⋅ M W S P view The shear and scaling matrix S gets the form ⎡ ⎡ ⎤ ⎤ 1 0 1 0 s 0 0 x ⎢ ⎥ 0 1 s 0 ⎢ ⎥ = ⎢ y S ⎢ ⎥ ⎥ 0 0 0 0 1 1 0 0 ⎢ ⎥ ⎣ 0 0 s 1 ⎦ It does w s z s z • a translation of x by and of y by , followed by t l ti f b d f b f ll d b y x ( ) + • a scaling with 1 1 s z w 4-12 Ronald Peikert SciVis 2007 - Object Space Volume Rendering

  13. Perspective shear-warp The warp matrix W is: ⎡ ⎡ ⎤ ⎤ w w 0 w 00 00 01 01 03 03 ⎢ ⎥ w w 0 w ⎢ ⎥ = ⎢ 10 11 13 W ⎥ w w w w ⎢ ⎢ ⎥ ⎥ 20 21 22 23 ⎣ ⎦ w w 0 w 30 31 33 The zero in the bottom row is needed to make the warp independent of z . 4-13 Ronald Peikert SciVis 2007 - Object Space Volume Rendering

  14. Perspective shear-warp Assuming again that P is the identity, we get: ⎡ ⎡ ⎤ ⎤ v v v v v v v v 00 01 02 03 ⎢ ⎥ v v v v ⎢ ⎥ = = ⋅ = 10 11 12 13 M W S ⎢ ⎢ ⎥ ⎥ view v v v v v v v v ⎢ ⎥ 20 21 22 23 ⎣ v v v v ⎦ 30 31 32 33 + + + + ⎡ ⎡ ⎤ ⎤ w w w w s w s w s w s w s w s w w w x y w 00 01 00 01 03 03 ⎢ ⎥ + + w w s w s w s w w ⎢ ⎥ = ⎢ x y w 10 11 10 11 13 13 ⎥ + + + w w s w s w w s w w x x y y w w ⎢ ⎢ ⎥ ⎥ 20 20 21 21 20 20 21 21 22 22 23 23 23 23 + + ⎢ ⎥ w w s w s w s w w ⎣ ⎦ x y w 30 31 30 31 33 33 4-14 Ronald Peikert SciVis 2007 - Object Space Volume Rendering

  15. Perspective shear-warp ( ) = j ≠ It follows for the warp coefficients w v 2 ij ij − 1 ⎛ ⎞ ⎡ ⎤ ⎛ ⎞ for the shear coefficients s v v v v x 00 01 03 02 ⎜ ⎟ ⎜ ⎟ ⎢ ⎢ ⎥ ⎥ = s s v v v v v v v v ⎜ ⎜ ⎟ ⎟ ⎜ ⎜ ⎟ ⎟ ⎢ ⎢ ⎥ ⎥ y 10 11 13 12 ⎜ ⎟ ⎜ ⎟ ⎢ ⎥ ⎝ s ⎠ ⎣ v v v ⎦ ⎝ v ⎠ w 30 31 33 32 = − − − + and for w 22 (not needed) w s v s v s v v x y w 22 20 21 23 22 4-15 Ronald Peikert SciVis 2007 - Object Space Volume Rendering

  16. Perspective shear-warp The shear-warp volume rendering algorithm is now as follows: • For each voxel layer (parallel to base plane): – shear and scale the layer image by multiplying with S h d l th l i b lti l i ith S – apply transfer functions Generate intermediate image with α -compositing Generate intermediate image with α compositing • • warp the image by multiplying with W An advantage of this algorithm is that for scaling images a filter can be used to prevent undersampling (aliasing). 4-16 Ronald Peikert SciVis 2007 - Object Space Volume Rendering

  17. Object space vs. image space Comparison of typical object space method (2D texture based) and image space method (raycasting). Formally both are equivalent, only different nesting order of loops. Formally both are equivalent, only different nesting order of loops. Practical differences: • Image space methods with FTB compositing allow early t termination. i ti • Object space methods using framebuffer for intermediate results suffer from quantization artifacts. • Object space methods can exploit texture mapping hardware and MIPmap textures for antialising. • • Image space methods would need supersampling in x and y for Image space methods would need supersampling in x and y for this. 4-17 Ronald Peikert SciVis 2007 - Object Space Volume Rendering

  18. Object space vs. image space Post-classification can be done in graphics hardware: Using (OpenGL) dependent texture (two texture mapping stages): x,y,z (interpolate scalar field) texture unit 0 s (apply transfer functions) (apply transfer functions) texture unit 1 texture unit 1 R,G,B; A 4-18 Ronald Peikert SciVis 2007 - Object Space Volume Rendering

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend