Ray Tracing The Next Week

Contents

Ray Tracing in One Weekend

  • 1 Overview

  • 2 Output an Image

    • 2.1 The PPM Image Format

    • 2.2 Creating an Image File

    • 2.3 Adding a Progress Indicator

  • 3 The vec3 Class

    • 3.1 Color Utility Functions
  • 4 Rays, a Simple Camera, and Background

    • 4.1 The ray Class
    • 4.2 Sending Rays Into the Scene
  • 5 Adding a Sphere

    • 5.1 Ray-Sphere Intersection
    • 5.2 Creating Our First Raytraced Image
  • 6 Surface Normals and Multiple Objects

    • 6.1 Shading with Surface Normals
    • 6.2 Simplifying the Ray-Sphere Intersection Code
    • 6.3 An Abstraction for Hittable Objects
    • 6.4 Front Faces Versus Back Faces
    • 6.5 A List of Hittable Objects
    • 6.6 Some New C++ Features
    • 6.7 Common Constants and Utility Functions
    • 6.8 An Interval Class
  • 7 Moving Camera Code Into Its Own Class

  • 8 Antialiasing

    • 8.1 Some Random Number Utilities
    • 8.2 Generating Pixels with Multiple Samples
  • 9 Diffuse Materials

    • 9.1 A Simple Diffuse Material
    • 9.2 Limiting the Number of Child Rays
    • 9.3 Fixing Shadow Acne
    • 9.4 True Lambertian Reflection
    • 9.5 Using Gamma Correction for Accurate Color Intensity
  • 10 Metal

    • 10.1 An Abstract Class for Materials
    • 10.2 A Data Structure to Describe Ray-Object Intersections
    • 10.3 Modeling Light Scatter and Reflectance
    • 10.4 Mirrored Light Reflection
    • 10.5 A Scene with Metal Spheres
    • 10.6 Fuzzy Reflection
  • 11 Dielectrics

    • 11.1 Refraction
    • 11.2 Snell’s Law
    • 11.3 Total Internal Reflection
    • 11.4 Schlick Approximation
    • 11.5 Modeling a Hollow Glass Sphere
  • 12 Positionable Camera

    • 12.1 Camera Viewing Geometry
    • 12.2 Positioning and Orienting the Camera
  • 13 Defocus Blur

    • 13.1 A Thin Lens Approximation
    • 13.2 Generating Sample Rays
  • 14 Where Next?

    • 14.1 A Final Render
    • 14.2 Next Steps
  • 15 Acknowledgments

  • 16 Citing This Book

    • 16.1 Basic Data
    • 16.2 Snippets
      • 16.2.1 Markdown
      • 16.2.2 HTML
      • 16.2.3 LaTeX and BibTex
      • 16.2.4 BibLaTeX
      • 16.2.5 IEEE
      • 16.2.6 MLA:

Ray Tracing: The Next Week

  • 1 Overview

  • 2 Motion Blur

    • 2.1 Introduction of SpaceTime Ray Tracing
    • 2.2 Managing Time
    • 2.3 Updating the Camera to Simulate Motion Blur
    • 2.4 Adding Moving Spheres
    • 2.5 Tracking the Time of Ray Intersection
    • 2.6 Putting Everything Together
  • 3 Bounding Volume Hierarchies

    • 3.1 The Key Idea
    • 3.2 Hierarchies of Bounding Volumes
    • 3.3 Axis-Aligned Bounding Boxes (AABBs)
    • 3.4 Ray Intersection with an AABB
    • 3.5 An Optimized AABB Hit Method
    • 3.6 Constructing Bounding Boxes for Hittables
    • 3.7 Creating Bounding Boxes of Lists of Objects
    • 3.8 The BVH Node Class
    • 3.9 Splitting BVH Volumes
    • 3.10 The Box Comparison Functions
  • 4 Texture Mapping

    • 4.1 Constant Color Texture
    • 4.2 Solid Textures: A Checker Texture
    • 4.3 Rendering The Solid Checker Texture
    • 4.4 Texture Coordinates for Spheres
    • 4.5 Accessing Texture Image Data
    • 4.6 Rendering The Image Texture
  • 5 Perlin Noise

    • 5.1 Using Blocks of Random Numbers
    • 5.2 Smoothing out the Result
    • 5.3 Improvement with Hermitian Smoothing
    • 5.4 Tweaking The Frequency
    • 5.5 Using Random Vectors on the Lattice Points
    • 5.6 Introducing Turbulence
    • 5.7 Adjusting the Phase
  • 6 Quadrilaterals

    • 6.1 Defining the Quadrilateral
    • 6.2 Ray-Plane Intersection
    • 6.3 Finding the Plane That Contains a Given Quadrilateral
    • 6.4 Orienting Points on The Plane
    • 6.5 Interior Testing of The Intersection Using UV Coordinates
  • 7 Lights

    • 7.1 Emissive Materials
    • 7.2 Adding Background Color to the Ray Color Function
    • 7.3 Turning Objects into Lights
    • 7.4 Creating an Empty “Cornell Box”
  • 8 Instances

    • 8.1 Instance Translation
    • 8.2 Instance Rotation
  • 9 Volumes

    • 9.1 Constant Density Mediums
    • 9.2 Rendering a Cornell Box with Smoke and Fog Boxes
  • 10 A Scene Testing All New Features

  • 11 Acknowledgments

  • 12 Citing This Book

    • 12.1 Basic Data
    • 12.2 Snippets
      • 12.2.1 Markdown
      • 12.2.2 HTML
      • 12.2.3 LaTeX and BibTex
      • 12.2.4 BibLaTeX
      • 12.2.5 IEEE
      • 12.2.6 MLA:

Ray Tracing: The Rest of Your Life

  • 1 Overview

  • 2 A Simple Monte Carlo Program

    • 2.1 Estimating Pi
    • 2.2 Showing Convergence
    • 2.3 Stratified Samples (Jittering)
  • 3 One Dimensional Monte Carlo Integration

    • 3.1 Expected Value
    • 3.2 Integrating x²
    • 3.3 Density Functions
    • 3.4 Constructing a PDF
    • 3.5 Choosing our Samples
    • 3.6 Approximating Distributions
    • 3.7 Importance Sampling
  • 4 Monte Carlo Integration on the Sphere of Directions

  • 5 Light Scattering

    • 5.1 Albedo
    • 5.2 Scattering
    • 5.3 The Scattering PDF
  • 6 Playing with Importance Sampling

    • 6.1 Returning to the Cornell Box
    • 6.2 Using a Uniform PDF Instead of a Perfect Match
    • 6.3 Random Hemispherical Sampling
  • 7 Generating Random Directions

    • 7.1 Random Directions Relative to the Z Axis
    • 7.2 Uniform Sampling a Hemisphere
    • 7.3 Cosine Sampling a Hemisphere
  • 8 Orthonormal Bases

    • 8.1 Relative Coordinates
    • 8.2 Generating an Orthonormal Basis
    • 8.3 The ONB Class
  • 9 Sampling Lights Directly

    • 9.1 Getting the PDF of a Light
    • 9.2 Light Sampling
    • 9.3 Switching to Unidirectional Light
  • 10 Mixture Densities

    • 10.1 The PDF Class
    • 10.2 Sampling Directions towards a Hittable
    • 10.3 The Mixture PDF Class
  • 11 Some Architectural Decisions

  • 12 Cleaning Up PDF Management

    • 12.1 Diffuse Versus Specular
    • 12.2 Handling Specular
    • 12.3 Sampling a Sphere Object
    • 12.4 Updating the Sphere Code
    • 12.5 Adding PDF Functions to Hittable Lists
    • 12.6 Handling Surface Acne
  • 13 The Rest of Your Life

  • 14 Acknowledgments

  • 15 Citing This Book

    • 15.1 Basic Data
    • 15.2 Snippets
      • 15.2.1 Markdown
      • 15.2.2 HTML
      • 15.2.3 LaTeX and BibTex
      • 15.2.4 BibLaTeX
      • 15.2.5 IEEE
      • 15.2.6 MLA: