Giter Club home page Giter Club logo

pbrt-rust's Introduction

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:

http://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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.