| Crates.io | pbrt-r3 |
| lib.rs | pbrt-r3 |
| version | 3.1.5 |
| created_at | 2025-03-13 18:59:28.030937+00 |
| updated_at | 2025-07-16 08:48:16.345151+00 |
| description | A Rust implementation of pbrt-v3 |
| homepage | |
| repository | https://github.com/ototoi/pbrt-r3 |
| max_upload_size | |
| id | 1591335 |
| size | 2,626,906 |
pbrt-r3 is a rust implementation version of the pbrt-v3.
pbrt-r3 is distributed under the BSD license based on the original pbrt-v3.
You can build this using cargo.
cargo build --release
You can render using pbrt-r3 with the following command.
./target/release/pbrt-r3 -i <example.pbrt>
pbrt-r3 supports the tev display implemented in pbrt-v4. After starting tev, you can display your rendering progress by adding the following option.
./target/release/pbrt-r3 -i <example.pbrt> --display-server localhost:14158
If you want to use the stats and profile features, please do as follows.
cargo build --release --features stats --features profile
./target/release/pbrt-r3 -i <example.pbrt> --stats --profile
pbrt-r3 has several options as Rust features.
| Feature | Description |
|---|---|
profile |
Enables the --profile option. |
stats |
Enables the --stats option. |
float-as-double |
Uses double precision (64-bit) for floating-point calculations. This increases precision but also increases execution time and memory usage. |
sampled-spectrum |
Uses SampledSpectrum to represent the Spectrum type for colors. SampledSpectrum represents visible light with more samples (60 samples) instead of just three colors. |
pbrt-r3 can take pbrt-v3 scene files as input. See the official pbrt-v3 scenes page on the pbrt website for information about how to download them.
Rendered images are stored at pbrt-r3-devkit.
base, and this is called as needed.OpenMP was used for parallel processing. On the other hand, pbrt-r3 uses rayon crate for parallel processing.nom crate was used to implement the parser.indicatif crate is used.clap crate is used.glog was used, while in pbrt-r3, the log and env_logger crates are used.imagerust-cryptoply-rsserde, serde_jsonsrc/tools in pbrt-v3. However, they are not necessarily needed in pbrt-r3, so their priority is low.pdf negative: There are places where pdf becomes negative due to calculation errors during the pdf calculation process. If left as is, it can cause infinity or negative colors. For example, this was fixed by using pdf = pdf.max(0.0).shading.dpdu/dpdv: There was a bug where the directions of shading.dpdu and shading.dpdv were reversed. (See also #97There are some remaining tasks:
We would like to thank the original authors of pbrt-v3 for their groundbreaking work and for making their code available. Additionally, we appreciate the contributions from the Rust community and the developers of the various crates used in this project.