CSCI 461: Computer Graphics

Middlebury College, Fall 2023

Lecture 05: Acceleration Structures

By the end of today's lecture, you will be able to:

  • intersect rays with axis-aligned bounding boxes (AABB),
  • build a Bounding Volume Hierarchy (BVH) and use it to find ray-model intersections in logarithmic time,
  • render a giraffe quickly!

The bottleneck of our ray tracers: ray-object intersections.

Open repl, click Run: how much time is reported in the Console? Save this number.

Can we make it faster? Ideas?

How to intersect a ray with an Axis-Aligned Bounding Box (AABB).

Exercise 1: filter intersections using AABB of model.

How much time now?

Can we make this better?

How to build a Bounding Volume Hierarchy (BVH).

Exercise 2: complete BVH construction.

How to intersect a ray with a BVH node.

Exercise 3: complete intersection of ray with BVH.

How much time now? What is the speedup over original value?

Import your own 3d model! (look for .obj files)

Download MeshLab (https://www.meshlab.net/#download) to reduce number of triangles (faces):

  • Filters -> Remeshing, Simplification and Reconstruction -> Simplification: Quadric Edge Collapse Decimation

Summary & other options.

  • Kd-Tree: partition space at each node instead of objects.
  • Parallelization: every pixel can run independently of others.
  • Next class: ray tracing wrap-up & discussion about bias in computer graphics.