Download presentation
1
Volume Ray-Casting on Graphics Hardware
CDA 6938 : Spring 2009 Mangesh Nijasure
2
Algorithm Ray-Casting Sampling Shading Compositing
3
Ray-Casting
4
Setup in hardware
5
Ray-Plane intersection
t = -eye_pos.x / ray_dir.x curr_point = eye_pos + (t * ray_dir) if(curr_point.y>=0.0f && curr_point.y<=1.0f && curr_point.z>=0.0f && curr_point.z<=1.0f) { if(t<tmin) tmin = t if(t>tmax) tmax = t }
6
Visualizing tmin and tmax
7
Sampling At each sample interval, fetch from the 3D volume texture
Using this value fetch the color from the 1D transfer function
8
Tri-Linear interpolation
9
Shading 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
10
Compositing alpha = 1 – old_alpha
new_color = (shaded_col*alpha) + old_color old_color = new_color
11
Demo
12
Results Software Solution GPU Hardware Solution Intel Pentium IV
3.8 GHz 1 GB Ram GPU Hardware Solution AMD Radeon HD mid range part (~ $100) Core Clock 750MHz 320 Stream Processors 512 MB On board memory DirectX 10 Graphics API implementation
13
Performance No Lighting at 512 x 512
Data Set Software Milisec/Frame Hardware Hydrogen Atom 1,375 11 Bucky Ball 1,394 Bonsai 1,451 12 CT Head 1,426 64 samples
14
Performance With Lighting at 512 x 512
Data Set Software Milisec/Frame Hardware Hydrogen Atom 6,346 16 Bucky Ball 6,322 Bonsai 7,002 28 CT Head 6,953 31 64 samples * Results are not visually accurate, but timings are exact
15
Performance with Hydrogen Data Set Samples & Resolution
No Lighting Times in miliseconds / frame Samples 512x512 1024x1024 S/W H/W 32 777 6 3,129 22 64 1,375 11 5,796 36 128 2,614 10,516 77 256 5,034 20,220 114
16
Performance with Hydrogen Data Set Interpolation Effect
No Lighting 512 x 512 Times in miliseconds / frame Samples Point Sampled Tri-Linear S/W H/W 32 426 6 777 64 740 11 1,375 128 1340 22 2,614 256 2545 42 5,034 36
17
Keys 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)
18
Hydrogen Data Set
19
Bonsai Data Set
20
BuckyBall Data Set
21
Head Data Set
22
Questions ?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.