pavlus / rt-one-week-rust

Ray tracer in one week(end), Rust version

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rust implementation of 'Ray tracer in one week(end)' series

To render build with

RUSTFLAGS=-C target-cpu=native cargo build --release

and then ./do-render.sh release . The rendered image will be in renders/ subdirectory.

If you have mogrify installed it will be converted to PNG, otherwise left as PPM.

Examples

Ray tracing the next week final scene 1024x1024, 10k samples per pixel, up to 8 bounces per ray, unbiased

Biased vs Unbiased

Cornel box with caustics 800x800, 10k samples per pixel, up to 16 bounces per ray, biased towards light, boxes and ball

Cornel box with caustics 800x800, 10k samples per pixel, up to 16 bounces per ray, unbiased

For the same number of samples biased renderer gives harder light and less noise, which is redistributed into caustics brightness, making image darker overall, at the same time it is slower, so generating image with same level of noise with the biased renderer is not very much faster than unbiased one, but caustics quality and light softness changes as well, making selection between biased and unbiased renderer more of an artistic choice.

About

Ray tracer in one week(end), Rust version

License:MIT License


Languages

Language:Rust 98.4%Language:Shell 1.6%