Skip to content

beltegeuse/pbrt_rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pbrt_rs

Rust crate to parse PBRT v3 scenes files. A big part of the code was extracted from the excellent PBRT's Rust version. This parser is tested and integrated inside rustlight to check its correctness and usability.

Kitchen scene with GPT and weighted reconstruction

Kitchen scene rendered inside rustlight with GPT and weighted reconstruction (256 spp).

Running examples

This crate provided a useful example to test this library.

Obj Exporter

Basic export of a PBRT scene into OBJ format. This is one example of how to export a PBRT scene:

cargo run --example=obj_exporter --release -- -o veach-door.obj data/pbrt/veach-ajar/scene.pbrt

This command generates .obj and .mtl files. The .mtl needs tweaking so you get the same material look inside your rendering system.

Viewer

Only show the depth from the sensor perspective. For now, only the perspective camera is supported. Use simple BVH and multi-threaded rendering. This is one example of how to render a PBRT scene:

cargo run --example=viewer --release -- data/pbrt/veach-ajar/scene.pbrt out.pfm

Known issues

  • Does not support all PBRT primitives (shapes, bsdf, sensors)
  • Pest parsing failed in some cases (under investigation)

I am waiting to resolve these issues above before publishing this crate officially.

Releases

No releases published

Packages

No packages published

Languages