Skip to content

Latest commit

 

History

169 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ray Tracer

A Monte Carlo Ray Tracer (Path Tracer) written in Rust.

This project was developed as an educational exploration of ray tracing and global illumination. The implementation is inspired by the book Ray Tracing in One Weekend.

Features

  • Path Tracing
    • Monte Carlo global illumination
    • Multiple bounces (recursive rays)
  • Materials
    • Diffuse (Lambertian)
    • Perfect reflections
    • Glass / dielectric refraction
    • Emissive materials (light sources)
  • Acceleration Structure
  • Scene Import
    • glTF scene loading
    • Triangle mesh rendering only
  • Parallel Rendering
    • Multithreaded rendering using rayon
    • Image rows rendered in parallel across CPU cores

Running the Ray Tracer

Ensure you have Rust installed.

Build the project:

cargo build --release

Run the renderer:

cargo run --release

Rendering parameters such as resolution, sample count, can be configured in the src/lib.rs file.

Gallery

Raytraced image of the cornell box

Figure 1: Raytraced rendering of the Cornell Box.


Raytraced image of the Stanford Dragon

Figure 2: Raytraced rendering of the Stanford Dragon. Source: Stanford 3D Scanning Repository.


Raytraced image of a driftwood

Figure 3: Raytraced rendering of a self-scanned driftwood.


Raytraced image of a cadaver monument

Figure 4: Raytraced rendering of the cadaver monument of Rene de Chalon. Source: Three D Scans, Le Transi de Rene de Chalon.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A fast ray tracer written in Rust

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Used by

Contributors

Languages