object space volume rendering object space volume
play

Object Space Volume Rendering Object Space Volume Rendering Ronald - PowerPoint PPT Presentation

Object Space Volume Rendering Object Space Volume Rendering Ronald Peikert SciVis 2010 - Object Space Volume Rendering 4-1 Object space volume rendering In object space rendering methods, the main loop is not over the pixels but over the


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

  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: • layers of voxels: image compositing methods layers of voxels: image compositing methods – 2D texture based – 3D texture based 3D t t b d • voxels: splatting methods • cells: cell projection methods Ronald Peikert SciVis 2010 - Object Space Volume Rendering 4-2

  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) • draw textured rectangles, using bilinear interpolation filter render back-to-front, using  -blending for the  -compositing • f f Image credit: H.W.Shen, Ohio State U. Ronald Peikert SciVis 2010 - Object Space Volume Rendering 4-3

  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 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. Ronald Peikert SciVis 2010 - Object Space Volume Rendering 4-4

  5. The shear-warp factorization In general the image plane is not parallel to a volume face. The shear-warp method by Lacroute allows to render an intermediate image in the base plane: • transform to sheared object space by translating (and possibly scaling) the voxel layers • render the intermediate image in the base plane • warp the intermediate image Ronald Peikert SciVis 2010 - Object Space Volume Rendering 4-5

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

  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:    M W S P view view where: • P is a permutation matrix mapping the base plane (front face of p pp g p ( the volume most orthogonal to the center view ray) to the xy-plane • S is the shear matrix • W is the warp matrix Ronald Peikert SciVis 2010 - Object Space Volume Rendering 4-7

  8. Orthographic shear-warp The shear is of the form             x x x x s s x         S y y z s       y             z z 0 0             Hence, the shear matrix   1 0 s x     S 0 1 s    y y    0 0 1  where s x and s y have to be solved for from M view . Ronald Peikert SciVis 2010 - Object Space Volume Rendering 4-8

  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 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 Ronald Peikert SciVis 2010 - Object Space Volume Rendering 4-9

  10. Orthographic shear-warp Assuming for simplicity that P is the identity, we get:          v v v w w s w s w x y   00 01 00 01 00 01 02        M v v v W S w w s w s w       view x y 10 10 11 10 11 11 12          v v v  w w s w s w w   x y 20 21 20 21 22 20 21 22    j  It follows for the warp coefficients w v 2 ij ij  1 1       s v v v for the shear coefficients  x   00 01  02    s   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 is not the identity, permuted versions of S and W can be used. Ronald Peikert SciVis 2010 - Object Space Volume Rendering 4-10

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

  12. Perspective shear-warp The same factorization can be used, but now in homogeneous coordinates:    M M W S P W S P view The shear and scaling matrix S gets the form   1 0 s 0 x     0 1 0 1 s s 0 0       y S  0 0 1 0       0 0 0 0 s 1 1   It does w s z • a translation of x by and of y by , followed by s z y y x x    1 1 s z • a scaling with w Ronald Peikert SciVis 2010 - Object Space Volume Rendering 4-12

  13. Perspective shear-warp The warp matrix W is:     w w 0 w 00 01 03   w w 0 w       10 11 13 W W   w w w w   20 21 22 23  w w 0 w  30 31 33 Again, the third row of W is irrelevant while the zeros in the third column are required to make the warp independent of z. column are required to make the warp independent of z. Ronald Peikert SciVis 2010 - Object Space Volume Rendering 4-13

  14. Perspective shear-warp Assuming again that P is the identity, we get:   v v v v 00 01 02 03   v v v v         10 10 11 11 12 12 13 13 M M W S W S   view v v v v   20 21 22 23     v v v v v v v v 30 30 31 31 32 32 33 33     w w s w s w s w w x y w 00 01 00 01 03 03         w w w w s w s w s w s w s w s w w w       x y w 10 11 10 11 13 13     w w s w s w w s w w x y w     20 21 20 21 22 23 23       w w s w s w s w w   x y w 30 31 30 31 33 33 Ronald Peikert SciVis 2010 - Object Space Volume Rendering 4-14

  15. Perspective shear-warp    j  It follows for the warp coefficients w v 2 ij ij  1             for the shear coefficients s s v v v v v v v v x   00 01 03  02     s v v v v       y 10 11 13 12               s s     v v v v v v     v v   w 30 31 33 32       and for w 22 (not needed) a d o 22 ( ot eeded) w w s v s v s v s v s v s v v v x y w 22 20 21 23 22 Ronald Peikert SciVis 2010 - Object Space Volume Rendering 4-15

  16. Perspective shear-warp The shear-warp volume rendering algorithm is now as follows: • For each voxel layer (parallel to base plane): y (p p ) – shear and scale the layer image by multiplying with S – apply transfer functions pp y Generate intermediate image with  -compositing • • Warp the image by multiplying with W p g y p y g An advantage of this algorithm is that for scaling images a ad a tage o t s a go t s t at o sca g ages a filter can be used to prevent undersampling (aliasing). Ronald Peikert SciVis 2010 - Object Space Volume Rendering 4-16

  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. Practical differences: • Image space methods with FTB compositing allow early termination. • • Object space methods using framebuffer for intermediate results Object space methods using framebuffer for intermediate results suffer from quantization artifacts. • Object space methods can exploit texture mapping hardware and j p p pp g MIPmap textures for antialising. • Image space methods would need supersampling in x and y for thi this. Ronald Peikert SciVis 2010 - Object Space Volume Rendering 4-17

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

Recommend


More recommend