wscg 2007 memory efficient and robust software implementation of the raycast algorithm aline pina...
TRANSCRIPT
WSCG 2007
Memory Efficient and Robust Software Implementation of
the Raycast Algorithm
Aline PinaCOPPE/UFRJ
Rio de Janeiro - Brazil
Cristiana BentesDESC/UERJ
Rio de Janeiro - Brazil
Ricardo FariasCOPPE/UFRJ
Rio de Janeiro - Brazil
Outline
• Volume Visualization
• Ray-casting
• Proposed Ray-casting Algorithms
• Experimental Results
• Conclusions
Volume Visualization
• Volumetric data images
• 3D data 2D plane
• Gains:
– Understanding
– Visual analysis and interpretation
Volumetric Data
• Generated:
– Simulation (Fluid Dynamic)
– Sensors (CT scanner)
– Measured Data (Ocean Buoys)
• Represented:
– 3D grid of voxels (Regular or Irregular)
Volume Visualization Methods
Surface Rendering x Volume Rendering
• More information
• Shows internal structures
• Computational intensive
• Loses information
• Hides internal structures
• Faster to compute
• Object is semi-transparent • Discard data between surfaces
Volume Rendering Algorithms
• Cell projection: cells are projected on the screen
• Ray-casting: rays are casted through every pixel
Ray-casting - History
• First software implementation:
– Garrity(1990) - cell connectivity
• Improvement:
– Bunyk(1998) - entry points + new auxiliary
structures
Ray-casting - History
• Problems:
• Auxiliary data structures - high memory
consumption
• Degenerate cases
Our Goal
• Improvements in Bunyk approach:
– Completely handle degenerate cases
– Smaller data structures
– Deal with tetrahedral and/or hexahedral grids
Ray-casting Algorithms
• ME-Raycast
Memory Efficient Ray-casting
• EME-Raycast
Enhanced Memory Efficient Ray-casting
ME-Raycast
• Data Structures
– Points array
– Cells array
– Use_set for each vertex
– Neighbor_set for each cell
– Faces array – on-the-fly
ME-Raycast
• Use_set(v)
– List of all cells incident on v
v
A B
C
D
E
Use_set(v) = {A, B, C, D, E}
2D example
ME-Raycast
• Neighbor_set(c)
– List of all cells that share a face with c
A
B C
D
Neighbor_set(A) = {B, C, D}
2D example
ME-Raycast
• Algorithm
– Preprocessing:
• Read data – create arrays Points and Cells
• Create Use_set
• Create Neighbor_set
ME-Raycast
• Algorithm
– Raycasting:
• Project visible faces – entry point
• For each pixel:
– Find next intersection – check other cell's faces
– If (no intersection) – check degenerate cases
– Accumulate color and opacity
EME-Raycast
• Data Structures
– Points array
– Cells array
– Use_set for each vertice
– Neighbor_set for each cell
– Faces array
EME-Raycast
• Algorithm
– Verification of intersection:
• Checking the face - recalculate parameters
Experimental Results
Datasets # Cells
Blunt Fin 187 395
Combustion Chamber 215 040
Oxygen Post 513 375
SPX 827 904
Delta Wing 1 005 675
Hexa 1 920
Workload
Experimental Results
Degenerate cases:
5122 10242
Blunt 10 31
Comb - 2
Oxygen
11 38
Delta 7 17
SPX 5 18Pixels not rendered
Experimental Results
Memory Consumption
ME-Raycast – 1024 x 1024 image
Bunyk ZSweep
Blunt 75% 40%
Combustion 76% 76%
Oxygen 66% 70%
Delta 61% 152%
SPX 74% 222%
Experimental Results
Memory Consumption
EME-Raycast – 1024 x 1024 image
Bunyk ZSweep
Blunt 39% 20%
Combustion 37% 37%
Oxygen 30% 30%
Delta 27% 68%
SPX 27% 83%
Experimental Results
Execution Time
ME-Raycast – 1024 x 1024 image
Bunyk ZSweep
Blunt 126% 29%
Combustion 106% 38%
Oxygen 136% 38%
Delta 148% 33%
SPX 116% 41%
Experimental Results
Execution Time
EME-Raycast – 1024 x 1024 image
Bunyk ZSweep
Blunt 304% 70%
Combustion 224% 80%
Oxygen 289% 82%
Delta 271% 61%
SPX 222% 79%
Conclusions
• Two memory-aware ray-casting algorithms
• Improved Bunyk work: memory, degenerate cases, handling hexahedral
• Significant gains in memory usage
• Correct images