





Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






http://www.cs.virginia/edu/~gfx/Courses/2005/ImageSynthesis/
Preprocess scene
Uniform Grids Preprocess scene
Uniform Grids n 3 = d|O| Preprocess scene
Creating Spatial Hierarchies insert(node,prim) { if( overlap(node->bound,prim) ) if( leaf(node) ) { if( node->nprims > MAXPRIMS && node->depth < MAXDEPTH ) { subdivide(node); foreach child in node insert(child,prim) } else list_insert(node->prims,prim); } else foreach child in node insert(child,prim) } // Typically MAXDEPTH=16, MAXPRIMS=2-
Hierarchical Bounding Volumes Create tree of bounding volumes Children are contained within parent Creation preprocess From model hierarchy Automatic clustering Search intersect(node,ray,hits) { if( intersectp(node->bound,ray) if( leaf(node) ) intersect(node->prims,ray,hits) else for each child inter sect(child,ray,hits) }