All the code for the PBRT core.
The parser reads a scene description more or less line by line and stores the read information by calling API functions starting with pbrt_.
The bidirectional scattering surface reflectance distribution function (BSSRDF) gives exitant radiance at a point on a surface given incident differential irradiance at another point.
The abstract Camera base class holds generic camera options and defines the interface that all camera implementations must provide.
In addition to working out the error bounds algebraically, we can also have the computer do this work for us as some computation is being performed. This approach is known as running error analysis.
The type of film or sensor in a camera has a dramatic effect on the way that incident light is transformed into colors in an image. In pbrt, the Film class models the sensing device in the simulated camera. After the radiance is found for each camera ray, the Film implementation determines the sample’s contribution to the pixel around the point on the film plane where the camera ray began and updates its representation of the image. When the main rendering loop exits, the Film writes the final image to file.
All filter implementations are derived from an abstract Filter class, which provides the interface for the functions used in filtering.
Read text files that store a series of floating-point values.
Almost all nontrivial graphics programs are built on a foundation of geometric classes. These classes represent mathematical constructs like points, vectors, and rays.
Rendering an image of the scene is handled by an instance of a class that implements the Integrator interface.
The geometry of a particular point on a surface is represented by a SurfaceInteraction. Having this abstraction lets most of the system work with points on surfaces without needing to consider the particular type of geometric shape the points lie on; the SurfaceInteraction abstraction supplies enough information about the surface point to allow the shading and geometric operations in the rest of pbrt to be implemented generically.
Spline-based interpolation to reconstruct BSDF values (instead of using large lookup tables).
In order for objects in a scene to be visible, there must be a source of illumination so that some light is reflected from them to the camera sensor.
Various probability distributions for sampling light sources.
Algorithms that deal with low-discrepancy point sets.
The abstract Material class defines the interface that material implementations must provide.
A key operation that Medium implementations must perform is to compute the beam transmittance along a given ray.
Structs and utility routines related to memory management.
Reflection models based on microfacets that exhibit perfect specular reflection and transmission have been effective at modeling light scattering from a variety of glossy materials, including metals, plastic, and frosted glass.
To limit the potential number of texels that need to be accessed, filtering methods use an image pyramid of increasingly lower resolution prefiltered versions of the original image to accelerate their operation.
Using atomic operations on floating-point values. One example is splatting pixel contributions.
Bundle up parameters and their values in a generic way.
Type definitions of Float and Spectrum, otherwise constants and functions which can be used almost everywhere else in the code.
The abstract Primitive base class is the bridge between the geometry processing and shading subsystems of pbrt.
Quaternions were originally invented by Sir William Rowan Hamilton in 1843 as a generalization of complex numbers. He determined that just as in two dimensions, where complex numbers could be defined as a sum of a real and an imaginary part, a generalization could be made to four dimensions, giving quaternions.
When light is incident on the surface, the surface scatters the light, reflecting some of it back into the environment. There are two main effects that need to be described to model this reflection: the spectral distribution of the reflected light and its directional distribution.
Random Number Generator
The Sampler base class not only defines the interface to samplers but also provides some common functionality for use by Sampler implementations.
Draw random samples from a chosen probability distribution.
As the scene file is parsed, objects are created that represent the lights and geometric primitives in the scene. These are all stored in the Scene object.
Careful abstraction of geometric shapes in a ray tracer is a key component of a clean system design, and shapes are the ideal candidate for an object-oriented approach. All geometric primitives implement a common interface, and the rest of the renderer can use this interface without needing any details about the underlying shape. This makes it possible to separate the geometric and the shading subsystem of pbrt.
Matrices used by the SobolSampler.
The Spectrum type hides the details of the particular spectral representation used, so that changing this detail of the system only requires changing the Spectrum implementation.
Texture is a template class parameterized by return type of its evaluation function. This design makes it possible to reuse almost all of the code among textures that return different types. PBRT currently uses only Float and Spectrum textures.
In general, transformations make it possible to work in the most convenient coordinate space.