Skip to content

jgsimard/rustrt

Repository files navigation

RustRT - Yet another Rust Ray Tracer

I used this project to learn rust and Monte Carlo Ray Tracing.

To run the code use cargo run --release -- -s XXX where XXX is either a number (for example scenes) or a json file for a custom scenes.

The repository structure is the following

  • src/core : Ray Tracing pluming
  • src/integrators : Ray tracing algorithms
  • src/materials : Materials
  • src/samplers : Random number generator
  • src/surfaces : Triangles, spheres, Rectangles, ...
  • src/textures : Uniform color, Image, checher, ...
  • scenes : scenes to try
  • example_scene.rs : holds a few scenes for testing : to run use cargo run --release -- -s 3
  • main.rs : entry point of the program

I used the crate enum_delegate to replace dynamic dispatch with enums. You can download assets from the web or from this link

Renders

I have included renders of the Cornell Box scene using the path tracing algorithms I have implemented so far. All images are rendered using the name low number of samples per pixel.

Naive Path Tracer

jensen_mats

Next Event Estimation (NEE) Path Tracer

jensen_nee

Multiple Important Sampling (MIS) Path Tracer

jensen_mis

Releases

No releases published

Packages

No packages published

Languages