Volume RayCasting on Graphics Hardware CDA 6938 Spring

  • Slides: 22
Download presentation
Volume Ray-Casting on Graphics Hardware CDA 6938 : Spring 2009 Mangesh Nijasure

Volume Ray-Casting on Graphics Hardware CDA 6938 : Spring 2009 Mangesh Nijasure

Algorithm n Ray-Casting n Sampling n Shading n Compositing

Algorithm n Ray-Casting n Sampling n Shading n Compositing

Ray-Casting

Ray-Casting

Setup in hardware

Setup in hardware

Ray-Plane intersection t = -eye_pos. x / ray_dir. x curr_point = eye_pos + (t

Ray-Plane intersection t = -eye_pos. x / ray_dir. x curr_point = eye_pos + (t * ray_dir) if(curr_point. y>=0. 0 f && curr_point. y<=1. 0 f && curr_point. z>=0. 0 f && curr_point. z<=1. 0 f) { } if(t<tmin) tmin = t if(t>tmax) tmax = t

Visualizing tmin and tmax tmin tmax

Visualizing tmin and tmax tmin tmax

Sampling n n At each sample interval, fetch from the 3 D volume texture

Sampling n n At each sample interval, fetch from the 3 D volume texture Using this value fetch the color from the 1 D transfer function

Tri-Linear interpolation

Tri-Linear interpolation

Shading n Use the Center-Differences method for gradient computation (pre-computation step) n Fetch from

Shading n Use the Center-Differences method for gradient computation (pre-computation step) n Fetch from the 3 D gradient texture n Compute light direction n Evaluate the N. L dot product to get the lighting factor

Compositing n alpha = 1 – old_alpha n new_color = (shaded_col*alpha) + old_color n

Compositing n alpha = 1 – old_alpha n new_color = (shaded_col*alpha) + old_color n old_color = new_color

Demo

Demo

Results n Software Solution n n Intel Pentium IV 3. 8 GHz 1 GB

Results n Software Solution n n Intel Pentium IV 3. 8 GHz 1 GB Ram GPU Hardware Solution n n AMD Radeon HD 4670 - mid range part (~ $100) Core Clock 750 MHz 320 Stream Processors 512 MB On board memory Direct. X 10 Graphics API implementation

Performance No Lighting at 512 x 512 Data Set Software Milisec/Frame Hardware Milisec/Frame Hydrogen

Performance 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

Performance With Lighting at 512 x 512 Data Set Software Milisec/Frame Hardware Milisec/Frame Hydrogen

Performance 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 * Results are not visually accurate, but timings are exact 64 samples

Performance with Hydrogen Data Set Samples & Resolution No Lighting Times in miliseconds /

Performance with Hydrogen Data Set Samples & Resolution No Lighting Times in miliseconds / frame 512 x 512 Samples 1024 x 1024 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

Performance with Hydrogen Data Set Interpolation Effect No Lighting 512 x 512 Times in

Performance with Hydrogen Data Set Interpolation Effect No Lighting 512 x 512 Times in miliseconds / frame Point Sampled Samples Tri-Linear 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

Keys to performance gain n Data level parallelism (embarrassingly parallel) n Ray coherence (texture

Keys to performance gain n Data level parallelism (embarrassingly parallel) n Ray coherence (texture cache efficiency) n Specialized interpolation hardware (texture filtering) n Minimized bus traffic for data sets (large onchip memory)

Hydrogen Data Set

Hydrogen Data Set

Bonsai Data Set

Bonsai Data Set

Bucky. Ball Data Set

Bucky. Ball Data Set

Head Data Set

Head Data Set

Questions ?

Questions ?