Photo

🌟 Photo: Precision Ray-Tracing

Photo logo

🔭 Overview

Photo is a Rust-built ray-tracing library emphasizing precision and modularity, aimed at accurate light simulation for photorealism. It uniquely leverages CPU capabilities, enhancing hardware compatibility and precision.

🔗 GPU Adaptation: Photo GPU Branch.

🚀 Key Features

🏎️ Supports

Photo tree

🏁 Quickstart

Clone the repository and set the root folder as the current working directory:

git clone https://github.com/FreddyWordingham/photo.git photo
cd photo

Build the package using Cargo:

cargo build --release

And then run the binary, targetting an input parameters file:

cargo run --release ./input/parameters.json

You can then use the included script to stitch the tiles together into a single image:

sh scripts/stitch.sh path/to/tile/directory

📖 Details

Photo is a ray-tracing library written in Rust, with a strong focus on precision and modularity. It is designed to be highly precise, with a focus on the physically accurate simulation of light transport through a scene, to produce photorealistic images.

It uses the CPU rather than the GPU to perform the ray tracing, allowing it to be run on a wide range of hardware and to a higher degree of precision than a GPU would allow. (See the GPU branch for an implementation of the library which targets the GPU.)

Although the library targets the CPU, it is designed to be highly parallelised, allowing it to take advantage of multi-core processors. The image is rendered in an array of tiles which minimises the memory footprint, and allows for checkpointing of the render.

Rather than using textures, the Photo uses colourmaps and shadow calculations to produce a photorealistic image. Scene descriptions are written in JSON, and input models are wavefront (.obj) files, allowing for a high degree of flexibility in the scene description.