Title: Volume Ray-Casting on Graphics Hardware
1Volume Ray-Casting on Graphics Hardware
- CDA 6938 Spring 2009
- Mangesh Nijasure
2Algorithm
- Ray-Casting
- Sampling
- Shading
- Compositing
3Ray-Casting
4Setup in hardware
5Ray-Plane intersection
t -eye_pos.x / ray_dir.x
curr_point eye_pos (t ray_dir)
if(curr_point.ygt0.0f curr_point.ylt1.0f
curr_point.zgt0.0f curr_point.zlt1.0f)
if(tlttmin) tmin t
if(tgttmax) tmax t
6Visualizing tmin and tmax
tmax
tmin
7Sampling
- At each sample interval, fetch from the 3D volume
texture - Using this value fetch the color from the 1D
transfer function
8Tri-Linear interpolation
9Shading
- Use the Center-Differences method for gradient
computation (pre-computation step) - Fetch from the 3D gradient texture
- Compute light direction
- Evaluate the N.L dot product to get the lighting
factor
10Compositing
- alpha 1 old_alpha
- new_color (shaded_colalpha) old_color
- old_color new_color
11 Demo
12Results
- Software Solution
- Intel Pentium IV
- 3.8 GHz
- 1 GB Ram
- GPU Hardware Solution
- AMD Radeon HD 4670 - mid range part ( 100)
- Core Clock 750MHz
- 320 Stream Processors
- 512 MB On board memory
- DirectX 10 Graphics API implementation
13Performance No Lighting at 512 x 512
Data Set Software Milisec/Frame Hardware Milisec/Frame
Hydrogen Atom 1,375 11
Bucky Ball 1,394 11
Bonsai 1,451 12
CT Head 1,426 11
64 samples
14Performance With Lighting at 512 x 512
Data Set Software Milisec/Frame Hardware Milisec/Frame
Hydrogen Atom 6,346 16
Bucky Ball 6,322 16
Bonsai 7,002 28
CT Head 6,953 31
64 samples
Results are not visually accurate, but timings
are exact
15Performance with Hydrogen Data Set Samples
Resolution
No Lighting
Times in miliseconds / frame
Samples 512x512 512x512 1024x1024 1024x1024
Samples S/W H/W S/W H/W
32 777 6 3,129 22
64 1,375 11 5,796 36
128 2,614 22 10,516 77
256 5,034 36 20,220 114
16Performance with Hydrogen Data Set Interpolation
Effect
No Lighting 512 x 512
Times in miliseconds / frame
Samples Point Sampled Point Sampled Tri-Linear Tri-Linear
Samples S/W H/W S/W H/W
32 426 6 777 6
64 740 11 1,375 11
128 1340 22 2,614 22
256 2545 42 5,034 36
17Keys to performance gain
- Data level parallelism (embarrassingly parallel)
- Ray coherence (texture cache efficiency)
- Specialized interpolation hardware (texture
filtering) - Minimized bus traffic for data sets (large
on-chip memory)
18Hydrogen Data Set
19Bonsai Data Set
20BuckyBall Data Set
21Head Data Set
22Questions ?