Splatting Josh Anon Advanced Graphics 1/29/02
Types of Rendering Algorithms Backward mapping Image plane mapped into data Ray casting Forward mapping Map data onto image plane Accumulate image front-back, back-front Image complete when every data point displayed or pixel “full”
Backward Mapping Problems Basic parallel solns require volume be duplicated at each node Input values often not right on ray, so interpolated Requires anti-aliasing to correct for tri- linear interpolation
Goal of Splatting Avoid artifacts from convential volume rendering Simplify computation Parallelize, lookup tables, etc. Be fast!
Enter Forward Mapping Algo Treat each data point in isolation so avoid replicating volume Since working in 2D with a footprint function, don’t have to interpolate Footprint = area of pixels a voxel affects Uses tables as often as possible
Basic Algorithm Input mapped to screen space Density, gradient strength/direction, and screen coordinates Packet then shaded Splatted Composited
Screen mapping DDA xyzxyz dx/di dx/djdx/dk dy/didy/djdy/dk dz/didz/djdz/dk ijkijk =
Shading 4 tables Emitted color Reflected color Opacity Table to modulate opacity Also use gradient vector for each sample (generated during pre- processing)
Calculations I emit = Table emit [index emit ] I diff = Table refl [index refl ] * dot(l, g) I spec = Table refl [index refl ] * dot(h, g) n L: light vector, g: gradient, h: vector half- way between eye and light, n: specular power I fin = I emit + I diff + I spec
Opacity A fin = Table opac [index opac ] * Table mod [index mod ] Colors in table are opaque color, so color attenuated by opacity during combining phase
Reconstruction Backward mapping associates pixel w/ n samples Forward mapping associates a sample w/ n pixels Reconstruct image-space voxels by using a filter
Reconstruction… Vol reconstruction eqn i ranges over input samples in kernel (x,y,z) point(x,y,z) from sample i is:
Combining Samples Old: integrate brightness along view direction New: footprint function that lets you compute the weight of a pixel affected by a sample
Using Tables Footprint independent spatial position, so store in a table When rendering, multiple RGBA by table value and add to buffer Splatting: process of table lookup, weighting, and combining
Sample front-back traversal I o = I c + ((1-A c ) * (I n *A n )) A o = A c + ((1-A c ) * A n ) I: intensity, A: opacity, o: output, c: what’s in image buffer, n: point
Results 96x128x113 CT scan rendered at full res in < 3 minutes (low-res at ~3 seconds) (Except for a Sun-3/60M w/ 8MB memory) Certainly faster on today’s machines, esp if using hardware
Time to draw in sec (clockwise, upper left): 3,9,65,165