Sunday, January 31, 2016
Ray Tracing: the Next Week
There's been a lot of interest and positive feedback on my mini-book on ray tracing.
This page is for the sequel Ray Tracing: the Next Week, available on Kindle.
This page also gives links and pointers for each chapter. The features covered are those in this picture:
Chapter 1: Motion Blur
This method was introduced in 1984 by Rob Cook.
Chapter 2: A Bounding Volume Hierarchy (BVH)
The construction method in the book can be improved by using the surface area heuristic (SAH). When evaluating potential partitions, the one that minimized the surface area of the sum of volumes of the sub-trees is almost always good. Here is a SAH-based build that cuts on the longest axis.
Chapter 3: Solid Texture Mapping
Chapter 4: Perlin Noise
A fantastic tool explaining how it works by Andrew Kensler
Chapter 5: Image Texture Mapping
Chapter 6: Rectangles and Lights
The program in the book implicitly samples lights so there are no shadow rays. If you want to get more efficient direct lighting you can either send shadow rays, or importance sample by sending more rays toward the lights.
Chapter 7: Instances
A general instance usually stores transformation matrices. Composite transforms can all be in one node. When scales are allowed handling the surface normals must be done with care.
Chapter 8: Volumes
Here's a derivation of the ray-constant-medium intersection.
It is straightforward to add nonuniform densities by adding a more sophisticated intersection method. This is covered in this blog post. It's pretty common knowledge in the ray tracing community, but not really in the intersection.