Reference: https://raytracing.github.io
- NASA Visible Earth for the image texture.
Completed work from each book is tagged as a release which can be found here.
The images shown below are based on those versions. Not all scenes are available in each release and may look different due to changes in the algorithms in successive books.
Build debug profile. The executable will be target/debug/raytracing_series
.
cargo build
Use --release
when building/running for faster executable. The executable
will be target/release/raytracing_series
.
cargo build --release
Run with program arguments (note that --
is needed after arguments for cargo
and before program arguments can be supplied):
cargo run -- --scene cornell-box -w 1200 -h 600 -o image.png
./target/debug/raytracing_series --scene cornell-box -w 1200 -h 600 -o image.png
Get help on program arguments:
cargo run -- --help
./target/debug/raytracing_series --help
Title | Image | Title | Image |
---|---|---|---|
Lambertian Diffuse | Metal | ||
Dielectric | Wide Angle Lens | ||
Telephoto Lens | Defocus Blur | ||
Final Image |
Title | Image | Title | Image |
---|---|---|---|
Standard Cornell Box | Specular Reflections | ||
Final Image |
Without Bounding Volume Hierarchy:
target/release/raytracing_series --scene final-one-weekend -w 1200 -h 600 \
--seed 8589869056 -t 1 -o final_one_weekend.png
HittableList: 0.000061101 seconds
Done: 28.45 minutes
With Bounding Volume Hierarchy:
target/release/raytracing_series --scene final-one-weekend --bvh -w 1200 -h 600 \
--seed 8589869056 -t 1 -o final_one_weekend_bvh.png
BVH: 0.000398774 seconds
Done: 9.33 minutese
Without Bounding Volume Hierarchy:
target/release/raytracing_series --scene final-one-weekend -w 1200 -h 600 \
--seed 8589869056 -t 4 -o final_one_weekend.png
HittableList: 0.000035394 seconds
Done: 10.89 minutes
With Bounding Volume Hierarchy:
target/release/raytracing_series --scene final-one-weekend --bvh -w 1200 -h 600 \
--seed 8589869056 -t 4 -o final_one_weekend_bvh.png
BVH: 0.000471452 seconds
Done: 5.14 minutese