Giter Club home page Giter Club logo

rustlight's Introduction

Rustlight

Physically-based rendering engine implemented with Rust.

How to use it

You can easily uses Rustlight via the provided command line tool (via examples/cli.rs):

$ cargo run --example=cli --release -- -h
rustlight 0.2.0
Adrien Gruson <[email protected]>
A Rusty Light Transport simulation program

USAGE:
    rustlight [FLAGS] [OPTIONS] <scene> [SUBCOMMAND]

FLAGS:
    -d               debug output
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -a <average>            average several pass of the integrator with a time limit ('inf' is possible)
    -s <image_scale>        image scaling factor [default: 1.0]
    -m <medium>             add medium with defined density [default: 0.0]
    -n <nbsamples>          integration technique
    -t <nbthreads>          number of thread for the computation [default: auto]
    -o <output>             output image file

ARGS:
    <scene>    JSON file description

SUBCOMMANDS:
    ao                           ambiant occlusion
    direct                       direct lighting
    gradient-path                gradient path tracing
    gradient-path-explicit       gradient path tracing
    help                         Prints this message or the help of the given subcommand(s)
    light                        light tracing generating path from the lights
    path                         path tracing generating path from the sensor
    path_kulla                   path tracing for single scattering
    plane_single                 Prototype implementation of 'Photon surfaces for robust, unbiased volumetric
                                 density estimation'
    pssmlt                       path tracing with MCMC sampling
    uncorrelated_plane_single    Prototype implementation of 'Photon surfaces for robust, unbiased volumetric
                                 density estimation'
    vol_primitives               BRE/Beam/Planes estimators
    vpl                          brute force virtual point light integrator

For example, to use path tracing using 128 spp:

$ cargo run --example=cli --release --features="pbrt openexr" -- -a inf -n 128 -o path.pfm ./data/cbox.json path

Other examples (wasm, viewer) are planned.

Optional Features

It is possible to activate/desactivate some features of rustlight depending of your needs:

  • image(*): load and save LDR images (via image)
  • openexr: load and save EXR images (via openexr-rs)
  • pbrt(*): read PBRT files (via pbrt_rs) [Not that only support a subset PBRT primitives]
  • mitsuba(*): read Mitsuba files (via mitsuba_rs) [Not that only support a subset Mitsuba primitives]
  • progress-bar(*): show progress bar (via pbr)
  • embree: fast intersection (via embree-rs)

(*) These features are activated by default.

Features

For now, these are the following features implemented:

  • Integrators (most of them using a common graph to represent the light transport):
    • Ambiant occlusion
    • Direct with MIS
    • Path-tracing with NEE
    • [*] Gradient-path tracing [1]
    • Primary-sample space MLT [2]
    • Energy redistribution PT (in PSS) [10]
    • Light tracing
    • Virtual Point Light
  • Special volumetric integrators (via vol_primitives):
    • Beam radiance estimate (2D kernel) [3]
    • Photon beams (1D kernel) [4]
    • [*] Photon planes (0D kernel) [5]
    • [*] Naive Virtual ray light [6]
  • Special single scattering intergrators:
    • (Un)correlated photon planes [7]
    • Kulla importance sampling [8]
  • Filtering:
    • Image-space control variate with uniform and variance-based weights [7]
  • Materials:
    • Diffuse
    • Phong lobe
    • Specular
  • Emitters:
    • Multiple tri-mesh lights support
    • Point, Directional and Envmap
  • Volumes:
    • Infinite homogenous participating media
  • Phase functions:
    • Isotropic

[*] Techniques that could contains bugs or are incomplete (only naive implementation)

Rendering

Cornel Box gradient-domain pt

Roadmap

Rendering algorithms for path-tracing:

  • use the explict layout to do implement gradient-domain path tracing
  • fixing gradient-domain path tracing: seems to have wrong gradient when the light source is not visible from the base path
  • gradient-domain path reuse

Other rendering features:

  • Materials: glass, microfacet with Beckert distribution.
  • Emitters: Environmental and point lights
  • Scene format support: PBRT

Inspirations

This code has been inspired from several repositories:

References

[1] Kettunen et al. "Gradient-domain path tracing" (SIGGRAPH 2015)
[2] Csaba et al. "A simple and robust mutation strategy for the metropolis light transport algorithm. (CGF 2002)
[3] Jarosz et al. "The beam radiance estimate for volumetric photon mapping" (EG 2008)
[4] Jarosz et al. "Progressive photon beams" (SIGGRAPH Asia 2011)
[5] Bitterli and Jarosz "Beyond points and beams: Higher-dimensional photon samples for volumetric light transport" (SIGGRAPH 2017)
[6] Novak et al. "Virtual ray lights for rendering scenes with participating media" (SIGGRAPH 2012)
[7] Rousselle et al. "Image-space control variates for rendering" (SIGGRAPH 2016)
[8] Deng et al. "Photon surfaces for robust, unbiased volumetric density estimation" (SIGGRAPH 2019)
[9] Kulla et al. "Importance Sampling Techniques for Path Tracing in Participating Media" (EGSR 2012)
[10] Cline et al. "energy redistribution path tracing" (SIGGRAPH 2012)

rustlight's People

Contributors

beltegeuse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

rustlight's Issues

Request for Updated Reference Image Link

Dear Project Maintainer:
I am reaching out to express my appreciation for your project, which has been immensely helpful in my research. I am currently working on an experimental algorithm based on your framework.
During the process, I encountered an issue with the reference image link provided in the documentation, which appears to be inactive. ## The precomputed reference is available at: http://adrien-gruson.com/research/2020_CMIS/plane_reference.exr
Additionally,I am experiencing difficulties in re-rendering the PBRT scene using PBRT-v3. The rendered images do not seem to match the expected results.So I either can get the correct result by this way.
I would greatly appreciate it if you could provide an alternative link to the reference image or any guidance on how to resolve the rendering issue. Your assistance will be invaluable for my ongoing research.
Best regards,๐Ÿ˜Š

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.