Skip to content

kymWorship/NJUpbr2021-rust

Repository files navigation

NJU pbr 2021Build Status

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]

key

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, and time ./target/release/custom_img > result/nju.ppm for customized logo.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published