Crate pbrt[][src]

pbrt

Rust crate to implement at least parts of the PBRT book's C++ code. You can find a copy of the current code here.

The main render loop for integrators implementing the SamplerIntegrator trait can be found here.

There are two more render loops:

  1. render_bdpt for bidirectional path tracing
  2. render_mlt for Metropolis Light Transport

Modules

accelerators

Acceleration structures are one of the components at the heart of any ray tracer. Without algorithms to reduce the number of unnecessary ray intersection tests, tracing a single ray through a scene would take time linear in the number of primitives in the scene, since the ray would need to be tested against each primitive in turn to find the closest intersection.

blockqueue
cameras

The abstract Camera base class holds generic camera options and defines the interface that all camera implementations must provide.

core

All the code for the PBRT core.

filters

All filter implementations are derived from an abstract Filter class, which provides the interface for the functions used in filtering.

integrators

Integrator is an abstract base class that defines the render() method that must be provided by all integrators.

lights

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.

materials

The abstract Material class defines the interface that material implementations must provide.

media

Implementations of the Medium base class provide various representations of volumetric scattering properties in a region of space.

samplers

The Sampler base class not only defines the interface to samplers but also provides some common functionality for use by Sampler implementations.

shapes

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.

textures

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.