Ray Tracing Acceleration Based on A survey of ray tracing acceleration techniques by Arvo and Kirk' - PowerPoint PPT Presentation

1 / 6
About This Presentation
Title:

Ray Tracing Acceleration Based on A survey of ray tracing acceleration techniques by Arvo and Kirk'

Description:

Ray Tracing Acceleration (Based on 'A survey of ray tracing ... until (R is last rectangle intersecting ray) or (intersection is found in rectangle R) ... – PowerPoint PPT presentation

Number of Views:67
Avg rating:3.0/5.0
Slides: 7
Provided by: wen61
Category:

less

Transcript and Presenter's Notes

Title: Ray Tracing Acceleration Based on A survey of ray tracing acceleration techniques by Arvo and Kirk'


1
Ray Tracing Acceleration(Based on A survey of
ray tracing acceleration techniques by Arvo and
Kirk.)
2
Bounding volume algorithm
  • procedure Intersect_Bounding_Volume(in ray, node)
  • if node is a leaf then
  • Intersect(ray, node.object)
  • else if Intersect(ray, node.bounding_volume) then
  • for each child of node do
  • Intersect_Bounding_Volume(ray, child)
  • endfor
  • endif

3
Uniform grid algorithm
  • procedure Grid_Intersect(in ray, node)
  • R ? rectangle containing ray.origin
  • repeat / walk through grid /
  • R ? R
  • for each object intersecting rectangle R do
  • Intersect(ray, object)
  • R ? next rectangle after R intersecting ray
  • until (R is last rectangle intersecting ray) or
  • (intersection is found in rectangle R)

4
Octree creation algorithm
  • procedure Octree_Subdivide(in node)
  • if (node intersects more than max_obj objects)
    and (node.depth lt max_depth) then
  • Break node.volume into eight octants
  • for each octant do
  • Create new_node with
  • new_node.volume octant
  • new_node.depth node.depth1
  • Octree_Subdivide(new_node, depth1)
  • endfor
  • endif

5
Octree intersection algorithm
  • procedure Octree_Intersect(in ray)
  • R ? rectangle containing ray.origin
  • repeat / walk through octree /
  • R ? R
  • for each object intersecting R do
  • Intersect(ray, object)
  • R ? next rectangle after R intersecting ray
  • until (R is last rectangle intersecting ray) or
  • (intersection is found in rectangle R)

6
Binary space partition intersection algorithm
  • procedure BSP_Intersect(in ray, node)
  • if ray.interval is empty or node is nil then
    return
  • if node is a leaf then
  • for each object intersecting node.rectangle do
  • Intersect(ray, object)
  • else
  • near ? ray clipped to near side of
    node.partition
  • BSP_Intersect(near, node)
  • if no intersection found in node.region then
  • far ? ray clipped to far side of
    node.partition
  • BSP_Intersect(far, node)
  • endif
  • endif
Write a Comment
User Comments (0)
About PowerShow.com