170 likes | 461 Views
Octree Traversal. Ref: Revelles et al. 2000. Ray Tracing. Global illumination that considers shadow, reflection, refractions, …. The most time-consuming operations in ray tracing. Object-Ray Intersection. Octree. Hierarchical spatial structure that speeds up the computation.
E N D
Octree Traversal Ref: Revelles et al. 2000
Ray Tracing • Global illumination that considers shadow, reflection, refractions, …
The most time-consuming operations in ray tracing Object-Ray Intersection
Octree • Hierarchical spatial structure that speeds up the computation
the process of finding the subset of voxels in an octree pierced by a directed line Only ray trace the objects in the voxels Two groups of algorithms Bottom-up: traversing starts at first terminal node intersected by ray. Use neighbor-finding to obtain the next node Top-down: start from the root node; recursive down to the terminal voxel Octree Traversal
Ex: SMART[91] A bottom-up traversal
Top-down Algorithm [Revelles00] In the following discussion, assume dx > 0 dy > 0 p d
Ray/Boundary Intersection ty1 tx1 ty0 tx0
Ray/SubnodeBoundary Intersection o2 o3 tx1 tym txm o0 o1 With these, the intersection parameters at child node can be easily derived tx0 Similarly,
ty1 t and tx1 t0 ty0 tx0 Ray-Node Intersection (1) Parametrically,
t and t0 Ray-Node Intersection (2) ty1 ty0 tx1 tx0
Equivalently tx1 tx0 ty0 ty1 tx1 tx0 ty0 ty1
q2 q3 q0 q1 Algorithm If ray hit this node … Use tx0, tx1, ty0, ty1 to compute txm, tym This procedure selects the first-hit subnode
Summary • The method is based on parametric representation of the ray • Incrementally compute the parameter values at which the ray intersects the planes • Computation uses only additions and divisions by two