Weekend project to learn Rust by implementing a ray tracer. The project is based on the book Ray Tracing in One Weekend. The book is a great introduction to ray tracing and the code is written in C++. Also I after finishing the book I found the Rust version of the book.
- Multithreading
- Render to PNG
- Capability to render a sequence of images
- Progress bar
Parameter | Value |
---|---|
Image size | 600x337 |
Samples per pixel | 200 |
Max depth | 20 |
Frames | 88 |
CPU (Macbook 2019 i9) | 16 |
Render time | 4h 40m 30s |
❯ cargo run --release
Compiling rust-raytracing v0.1.0
Finished release [optimized] target(s) in 1.69s
Running `target/release/rust-raytracing`
⠄ [00:02:05] [########################>--------------------------] 440371/810000 (2m)
To generate a GIF from a sequence of images, you will need to install gifski
. You can do this with the following command:
❯ brew install gifski
❯ gifski -o render.gif render/image_*.png