Crates.io | bs-trace |
lib.rs | bs-trace |
version | 0.3.0 |
created_at | 2024-12-25 06:55:11.127967+00 |
updated_at | 2025-01-26 12:58:56.930462+00 |
description | Free RayTracing software |
homepage | https://blandsoft.net/products/bstrace.html |
repository | https://git.sr.ht/~mxnaco/bstrace |
max_upload_size | |
id | 1494825 |
size | 114,063 |
Clone the git repo then do cargo build --release --bin bs-trace
.
After building, do cargo install --bin bs-trace --path .
. This will install the release binary and put the bs-trace
binary on your PATH to be run from the command line.
After installing, run bs-trace <path to scene file>
from the command line. Alternatively, from the cloned repo root do cargo run --bin bs-trace -- <path to scene file>
.
The program accepts the path to a scene definition file as its sole argument. It will render the given scene and output the resultant image to the current working directory in PNG format, as out.png
.
A scene is a collection of objects in 3D space, referred to as a World
in the source code.
Currently, only sphere objects are supported.
A scene definition file is a TOML file.
See the example scenes in examples/
to get an idea of how they're written.
To see how a scene file is parsed into a World
, see src/trace/description.rs
.
BlandSoft BSTrace Copyright (C) Elizabeth Bland 2024-2025
BlandSoft BSTrace is made freely available under the GNU General Public License as published by the Free Software Foundation, version 3. ("GPL-3.0-only")
See COPYING for a copy of the licence text.