This is a final project for NJU physically based rendering 2021 Sping. It is implemented in Rust and is by no means a mature renderer.
This project derives from @gkmngrgn 's work of implementing Peter Shirley's Ray Tracing trilogy in multiple languages. The previous project stopped at book 1 Raytracing in a weekend .
Core Features:
- Parallelism enabled by the fantastic Rust crate
rayon
. - Convert source pixels of a logo image to a rendered one in 3D space.
- Enable triangles. Support mesh import. Support intersection.
- Metropolis sampling. [TODO]
- Acceleration: Bvh, Octree[TODO], KDTree[TODO].
- Texture. [TODO]
- Photon mapping. [TODO]
Usage:
cargo build --release
- save logo to assets/base.png, run
python3 proc.py
. note that opencv-python and numpy packages are desired. mkdir result && time ./target/release/one_weekend > result/one_weekend.ppm
for book one weekend, andtime ./target/release/custom_img > result/nju.ppm
for customized logo.