Learn Ray Tracing in One Weekend series using Rust.
Yet another naive and pure software ray tracing renderer.
example rtow_13_1, 512 sample, 8 depth, 1920x1080, 8m30s
example rtnw_4_3, 1024 sample, 8 depth, 1920x1080, 22min
example rtnw_7_4_2, 4096 sample, 8 depth, 1500x900, 15min
example rtnw_8_2, 10240 sample, 10 depth, 1000x1000, 1h20m
example rtnw_9_2, 10240 sample, 10 depth, 1000x1000, 1h30m
example rtnw_10, 10240 sample, 10 depth, 1000x1000, 2h30m
- Ray Tracing in One Weekend
- Basic types, Vec, Color, Ray, etc
- Background/Sky
- Sphere
- Lambertian Material
- Metal Material with Different Fuzz
- Glass Material with Different Refractive
- Pinhole Camera
- Camera Defocus/Depth Field
- (Extra) Parallelism (by using rayon)
- Ray Tracing: The Next Week
- Motion Blur
- BVH(Bounding Volume Hierarchies)
- Solid Textures
- Perlin Noise
- Image Textures
- Rectangles
- Lights
- Cornell Box
- Box
- Instance Translation and Rotation
- Volumes/Participating Media
- Ray Tracing: The Rest of Your Life not started yet
Remda is a library crate, but you can run built-in examples(from the book series) to try it.
Use cargo run --example
to get examples list, then choose one to run.
For example, to get final scene in section 13.1 of Ray Tracing in One Weekend, run
cargo run --example rtow_13_1 --release
Wait about 1s(according to your machine's CPU performance), you will get a rtow_13_1.ppm
in current dir, that's your result.
If you want a bigger and clear image, adjust height()
, depth
and samples()
parameter in example source file and re-run.
You can also try other examples if you want.
PS: Pure software ray tracing takes a long time to render, be patient.
GPLv3
Except:
example/earth-map.png
, download from NASA, fall in public domain.