Skip to content
Copied!

2. Ray Tracing: The Next Week ​

This book covers Ray Tracing: The Next Week, the second book in the series. I incrementally extend the common/ crate built in Book 1, starting with motion blur and proceeding through BVHs, texture mapping, Perlin noise, rectangular lights, and volume rendering. All changes to common/ are additive so that the completed Book 1 code, including the r1XX crates, continues to build unchanged.

Complete11 chaptersStarted: Last updated:
  1. 1. Overview

    Ray Tracing: The Next Week is an introductory book on ray tracing written by Peter Shirley, Trevor David Black, and Steve Hollasch. The latest version at the ti…

  2. 2. Motion Blur

    I introduce a time dimension into the final scene from Book 1 and generate motion blur by making the diffuse spheres bounce. The original v3.2.3 implements Movi…

  3. 3. Bounding Volume Hierarchies

    Ray-object hit testing is the largest bottleneck in a ray tracer. A naive implementation takes $O(N)$ time for $N$ objects. Because millions of rays are repeate…

  4. 4. Solid Textures

    In computer graphics, a texture is any function that determines the color of an object's surface procedurally or by referring to an image. A solid texture uses…

  5. 5. Perlin Noise

    Perlin noise is a grid-based pseudorandom function introduced by Ken Perlin in 1985. It changes smoothly near an input point while appearing random over larger…

  6. 6. Image Texture Mapping

    In addition to the procedural textures that determined colors from world coordinates in the preceding chapters, I now introduce ImageTexture for applying a two-…

  7. 7. Rectangles and Lights

    Until now, the ray tracer has created implicit ambient light by returning a blue-to-white vertical gradient for the sky. This chapter introduces an emissive mat…

  8. 8. Instances

    The Cornell box in the previous chapter contained only walls and a ceiling light. I now add two white boxes and rotate them slightly relative to the walls, brin…

  9. 9. Volumes

    Everything I have rendered so far has been a surface. This chapter introduces volumes—participating media such as smoke, fog, and subsurface scattering. Followi…

  10. 10. A Scene Testing All New Features

    To conclude Book 2, I construct a scene that uses every feature added so far. The original renders at 800 × 800 with 10,000 samples per pixel and can take hours…

  11. Supplement: Native Parallel Renderer for Book 2

    In Supplement: Native Parallel Renderer, I created the standalone raytracing-book1-final-scene program to render the final scene from Book 1 in parallel on a na…