Lecture 09: Acceleration structures

Computer graphics in Game development

Ivan Belyavtsev

7.11.2020

Bounding volume

From: https://flylib.com/books/en/2.124.1.130/1/

Axis-aligned bounding boxes

From: https://3dengine.org/Bounding_volume/

Box intersection algorithm

float3 invRaydir = float3(1.0) / ray.direction;
float3 t0 = (aabb_max - ray.position) * invRaydir;
float3 t1 = (aabb_min - ray.position) * invRaydir;
float3 tmin = min(t0, t1);
float3 tmax = max(t0, t1);
return maxelem(tmin) <= minelem(tmax);

[1]

Bounding volume hierarchy

  • Top-level accelleration structures (TLAS)
  • Bottom-level accellecration structures (BLAS)

“Acceleration structures” experiment

TODO

  • Group traingles to objects
  • Compute axis-aligned bounding boxes
  • Change intersection flow to use AABBs
  • Implement two-level AS
  • Implement traversal of the BVH

“Acceleration structures” experiment

Reference

From: https://github.com/djbelyak/basic-of-ray-tracing

“Acceleration structures” experiment

What is the new knowledge?

  • Traversing AABB before internal triangles gives a good speed up
  • BVH don’t speed up a Cornell box

References

1.
McGuire M. The graphics codex. 2.14 ed. Casual Effects, 2018.
// reveal.js plugins