Title: INP_Nancy
1Strict octree data structure
2Lazy data structure (1)
Single root leaf
1 then 4 voxels
3Lazy data structure (2)
8 voxels more
4Lazy data structure (3)
8 voxels more
5Lazy data structure (4)
16 voxels more
6Lazy data structure (5)
20 voxels more total 57 voxels built
7Parallel lazy data structure built on N
processors
P4
P1
P6
P3
P5
Pn
P2
15 voxels built on each processor
8 Ray tracing wave simulation (seismic, CEM,
optic, image synthesis)
Algorithm
- For EACH rays
- Find voxels along ray path
- Compute the intersection with each surface
belonging to those voxels - the first intersection found is the solution
- Use Descartes laws to determine secondary rays
- Compute secondary rays recursively
The algorithm complexity is nearly proportional
to the number of rays but voxelisation is a
sequential process.
9- The algorithm efficiency is directly related to
the discretization size - a regular grid use a lot of memory (even for
empty region) - an octree saves memory in empty regions
But
Is octree an optimal solution in sequential ? Is
static octree an optimal solution for distributed
computing ?
10The useful part of the octree cannot be
statically defined
111) Definitions
- Static octree construction
- The octree is entirely built before the
ray-tracing step. - Lazy octree construction
- The octree is built on demand, during computation.
122) Computation distribution
Classical algorithm
Model reading
Sequential tasks
Octree construction
Parallel tasks
Ray tracing computation
Result writing
13Within each processor do
- Propagate (rays)
- for each rays
- find_intersection (ray, octree_root)
- if (intersection ltgt nil)
- apply Descartes laws to determine secondary_rays
- if (secondary rays ltgt nil) propagate
(secondary_rays) - end if
- End if
- End for
- End propagate
14- Find_intersection (ray, octree-elt)
- If is_a_leaf (octree_elt) compute-leaf
(octree-elmt) - else
- case
- Is_empty (octree_elt) return (nil)
- Is a node (octree_elmt)
- if empty_sons compute_intersection
- else
- return merge (
- Find_intersection(ray, son1(octree-elmt),
- Find_intersection(ray, son2 (octree-elmt),
- Find_intersection(ray, son3 (octree-elmt),
- Find_intersection(ray, son4 (octree-elmt),
- Find_intersection(ray, son5 (octree-elmt),
- Find_intersection(ray, son6 (octree-elmt),
- Find_intersection(ray, son7 (octree-elmt),
- Find_intersection(ray, son8 (octree-elmt))
- end if
15- Compute-leaf (octree-elmt)
- if boundary_conditions (octree_elmt)
- if (octree_elmt contains surface)
- flag-as-node (octree-elmt)
- create-empty-sons (octree-elmt)
- else
- flag-as-empty (octree-elmt)
- End if
- else
- flag-as-node (octree-elmt)
- create-leaf-sons (octree-elmt)
- End if
- end compute-leaf
163) Results Memory requirements
Model sizes Small ? 5,000
surfaces Medium ? 500,000 surfaces Large
? 2,000,000 surfaces Images are 2048x2048
pixels
Static octree construction
Lazy octree construction
Small model
Medium model
Large model
174) Results Computing times
Static octree construction
Lazy octree construction
120
100
Small model
S
80
e
c
60
o
n
40
d
s
20
0
Sequential
2
4
8
16
Number of nodes
Medium model
Large model
18Laziness, an issue to improve computation
distribution
- Compute only necessary data
- Improve data locality
- Reduce to the max the sequential part of the
algorithm
19References
- Un lancer de rayons distribué pour traiter de
très grands modèles sans précompilation - Gilles Cadet, Bernard Lécussan TSI à paraître
mars 2006
- Laziness, a way to improve distributed
computation of the ray tracing algorithm - 8th IC on Computer Graphics and
Visualization2000 Prague February 2000
- High Performance Cluster Computing
- Volume2 Chapter 23 Programming and Applications
- Edited by Rajkumar Buyya, Prentice Hall, 1999.
20Raybooster