Skip to content

Implementation of PBRT in rust based on the C++ version by Matt Pharr, Grep Humphreys, and Wenzel Jakob.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

alexmeli100/pbrt-rust

 
 

Repository files navigation

pbrt-rust

Build Status Github License Github License

Another implementation of PBRT in Rust based on the PBRT book and the C++ version by Matt Pharr, Wenzel Jacob:

https://www.pbrt.org

Usage

> cargo build --release
> ./target/release/pbrt-rust --help
pbrt-rust 0.1
Parse a PBRT scene description file and render it

USAGE:
    pbrt-rust.exe [FLAGS] [OPTIONS] <input>

FLAGS:
    -c, --cat            Print a reformatted version of the input file(s) to standard output. Does not render an image
    -h, --help           Prints help information
    -e, --logtostderr    Print all logging messages to stderr
    -t, --toply          Print a formatted version of input file(s) to standard output and convert all triangle meshes
                         to PLY files. Does not render and image
    -V, --version        Prints version information
    -v, --verbose        set LOG verbosity

OPTIONS:
    -w, --cropwindow <x0> <x1> <y0> <y1>    Specify an image crop window
    -l, --logdir <logdir>                   Specify directory that log files should be writtend to. Default: system temp
                                            directory (e.g $TMPDIR or /tmp)
    -n, --nthreads <nthreads>               Use specified number of threads for rendering [default: 0]
    -o, --outfile <outfile>                 Write the final image to the given filename

ARGS:
    <input>    Path to PBRT scene description file

Example scenes

These are the first few scenes rendered using pbrt-rust. More scenes will be rendered as I fix the remaining bugs in the system if there are any

First scene rendered in pbrt-rust

Two spheres with glass and mirror material

Ganesha statue

Ganesha statue

Subsurface Scattering with dragon

Subsurface Scattering

Stochastic Progressive Photon Mapping

SPPM with caustic glass

Country Kitchen by Jay-Artist

Kitchen rendered with pbrt-rust

The Wooden Staircase by Wig42

Staircase rendered with pbrt-rust

Japanese Classroom by NovaZeeke

Japanese classroom rendered with pbrt-rust

Ecosystem

Cover image of first edition of PBRT rendered with pbrt-rust

TODO

  • Render more scenes and fix any bugs
  • Add more unit tests
  • Do atleast some of the exercises in the book as most of them add new features to the system or improve performance
  • Benchmark pbrt-rust against the C++ version
  • Add a system profiler equivalent to the C++ version
  • SIMD optimizations
  • Add feature to create animations
  • Update parts of the system to PBRTv4 when the book releases
  • Implement parsing and rendering of blend files

Other implementations

You can find other implementations of PBRT in rust here

License

Licensed under either of

at your option.

About

Implementation of PBRT in rust based on the C++ version by Matt Pharr, Grep Humphreys, and Wenzel Jakob.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages