#pbrt #ray-tracing #pbrt-v4


Lightweight and fast PBRT v4 file parser

2 unstable releases

0.2.0 May 23, 2023
0.1.0 May 21, 2023

#20 in Data formats

Download history 41/week @ 2023-05-17 20/week @ 2023-05-24 9/week @ 2023-05-31

70 downloads per month




CI Crates.io docs.rs Crates.io dependency status

A Rust crate to load pbrt-v4 files.

The scene description files used by pbrt are plain text files. The file format was designed so that it would be both easy to parse and easy for applications to generate from their own internal representations of scenes.

A pbrt scene file consists of a series of statements; different statements specify the geometry and light sources in the scene and set overall rendering parameters (such as which light transport algorithm to use or the image resolution).


Getting started

Add the following to your project's Cargo.toml:

pbrt4 = "0.1.0"

Reading a pbrt file is as easy as:

let scene = Scene::from_file("file.pbrt")?;

for shape in scene.shapes {
    println!("{:?}", shape)

Please refer to examples for more examples how to use the crate.


~83K SLoC