Git Product home page Git Product logo

rust-path-tracer's Introduction

Path Tracer implementation in Rust

This repository contains a path tracer implementation in Rust. The program is capable of rendering images of 3D scenes with spheres and planes.

output.ppm

Description

Path tracing is a computer graphics method of rendering images of three-dimensional scenes such that the global illumination is faithful to reality. It is a physically based rendering algorithm that simulates light transport, which naturally simulates many effects that have to be specifically added to other algorithms. These effects include soft shadows, depth of field, motion blur, caustics, ambient occlusion, and indirect lighting. Path tracing is a Monte Carlo method: it repeatedly traces paths of light through the scene and uses the results to estimate the final image.

Compiling

To compile the program, run the following command in the root directory of the project:

cargo build

If you want to compile the program without debbuging information, run the following command in the root directory of the project:

cargo build --release

Both methods will create a binary in the target/release directory. The binary will be named path_tracer.

Building documentation

To build the documentation, run the following command in the root directory of the project:

cargo doc

The documentation will be created in the target/doc directory. To view the documentation, open the index.html file in the target/doc directory in a web browser or run the following command in the root directory of the project:

cargo doc --open

Running

To run the program, run the following command in the root directory of the project:

cargo run

To run the program without debbuging information, run the following command in the root directory of the project:

cargo run --release

The program will create a output.ppm file in the root directory of the project. The file will contain the rendered image.

rust-path-tracer's People

Contributors

noostale avatar

Watchers

 avatar

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.