rs_pbrt

rs_pbrt is a Rust crate that implements the physically based rendering techniques from the third edition of the PBRT book. This project provides a Rust counterpart to the original C++ code, enabling high-quality rendering with the safety and performance benefits of Rust.

Key Features

Physically Based Rendering

rs_pbrt focuses on physically based rendering (PBR), a technique that simulates the physical behavior of light to produce highly realistic images. This approach is essential for creating accurate and visually appealing renderings.

Comprehensive Documentation

Extensive documentation is available to help users understand and utilize rs_pbrt. The latest documentation covers various aspects of the library, including usage, features, and examples.

Test Scenes

Several test scenes are provided to demonstrate the capabilities of rs_pbrt. These scenes include complex models and lighting setups, showcasing the renderer's ability to handle detailed and realistic scenarios.

Usage

To build rs_pbrt, use the following commands:

> cargo build --release --no-default-features
> ./target/release/rs_pbrt --help

Running the command with --help will display available options and usage information:

rs_pbrt version 0.9.12 (unknown) [Detected 28 cores]
 
Physically based rendering (PBR) with Rust
 
Usage: rs_pbrt [OPTIONS] --path <PATH>
 
Options:
      --cropx0 <CROPX0>          Specify an image crop window <x0 x1 y0 y1> [default: 0.0]
      --cropx1 <CROPX1>          Specify an image crop window <x0 x1 y0 y1> [default: 1.0]
      --cropy0 <CROPY0>          Specify an image crop window <x0 x1 y0 y1> [default: 0.0]
      --cropy1 <CROPY1>          Specify an image crop window <x0 x1 y0 y1> [default: 1.0]
  -i, --integrator <INTEGRATOR>  ao, directlighting, whitted, path, bdpt, mlt, sppm, volpath
  -t, --nthreads <NTHREADS>      use specified number of threads for rendering [default: 0]
  -s, --samples <SAMPLES>        pixel samples [default: 0]
  -p, --path <PATH>              The path to the file to read
  -h, --help                     Print help information
  -V, --version                  Print version information

Sample Renders

Ganesha Statue

A highly detailed scan of a small statue with over 4.3 million triangles, illuminated by a few area light sources.

Ganesha Statue Ganesha Statue

Subsurface Scattering (SSS)

An example showcasing subsurface scattering with a dragon model.

SSS Dragon SSS Dragon

Stochastic Progressive Photon Mapping (SPPM)

A render demonstrating caustics using stochastic progressive photon mapping.

SPPM Caustic Glass SPPM Caustic Glass

Ecosystem

A scene representing the cover image for the first edition of the PBRT book.

Ecosystem Ecosystem

Landscape

A scene representing the cover image for the third edition of the PBRT book.

Landscape Landscape

Hair Scattering

An example showing the hair scattering model in action.

Hair Scattering Hair Scattering

Japanese Classroom

A detailed render of a Japanese classroom.

Classroom Classroom

The White Room

A white room scene with intricate lighting and material details.

White Room White Room

Country Kitchen

A country kitchen scene with complex lighting and material interactions.

Kitchen Kitchen

Wooden Staircase

A wooden staircase scene with detailed textures and lighting.

Staircase Staircase

Conference Room

A conference room scene with realistic lighting and materials.

Conference Room Conference Room

Theater

A theater scene with complex lighting and shadows.

Theater Corner Theater Corner

Theater Stage Theater Stage

Similar Projects