Skip to content

A parallelised graphical renderer built in Rust

Notifications You must be signed in to change notification settings

gememma/raytracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

raytracer

Project

This application is a ray tracer that renders a 3D scene containing different objects in various materials. The report contains technical details of the implementation. This software was created with the eventual goal of producing raytraced images using a photon map and including caustic effects through dielectric material. The project is not fully complete, and the photon maps are not currently used in the production of the image.

Features

Usage

Rust is required to run this project. You can install the Rust compiler using Rustup.

Run cargo run to build and run the project. Beware that without changes, this will generate a very high quality image (1024 x 1024) and take a long time.

The following command can be run to produce an image with the default 500 samples and 512 by 512 resolution:

cargo run --package raytracer --release -- -s [SCENE]

where [SCENE] can be one of the following: cornell, full or material to change the contents of the output. The number of samples and resolution can be changed by using --samples and -r respectively.

The output image will appear in the root directory as test.png and may look something like this example, which is the full scene rendered with 1000 samples and 1024 resolution.

Cargo Features

The "unfinished" feature contains the incomplete photon mapping and caustics map, and can be activated by adding --all-features to the cargo command like so:

cargo run --package raytracer --release --all-features -- -s [SCENE]

This will not produce a realistic render and will take significantly longer than a normal run.

About

A parallelised graphical renderer built in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published