Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devinleamy/wall-e
A ray tracer named after one of the most noble robots out there :)
https://github.com/devinleamy/wall-e
Last synced: 16 days ago
JSON representation
A ray tracer named after one of the most noble robots out there :)
- Host: GitHub
- URL: https://github.com/devinleamy/wall-e
- Owner: DevinLeamy
- Created: 2023-11-01T01:43:39.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-12T01:57:39.000Z (about 1 year ago)
- Last Synced: 2023-11-12T03:27:14.365Z (about 1 year ago)
- Language: Rust
- Homepage:
- Size: 794 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WALL-E
> A ray-tracer named after one of the most noble robots out there :)
sample.py: Two cars surrounded by trees and piles of leaves, in front of a set of large boulders. There's a small and sparkling pond.
### Structure
- `/wall-e`: The Rust ray-tracing library.
- `/wall-e-py`: Rust Python3 bindings, for scripting.
- `/wall-e-py/assets/meshes`: Contains `.obj` mesh files.
- `/wall-e-py-macros`: Rust macros used in `/wall-e-py`.
- `/scripts`: Scripts (scenes) you want to render.
- `/images`: Images from the scenes requested in the assignment guidelines.
- `SCRIPTING.md`: Documentation for the scripting API.### Setup
> _Note: You will need to have Rust and Python3 installed on your system._
Create a virtual environment and install `maturin`.
```bash
cd wall-e-py
python3 -m venv .env
source .env/bin/activate
pip install maturin
deactivate
```### Usage
Scripts, which are python3 files, are put in `/scripts`.
To run a script `./scripts/custom-script.py`, from the root folder, call
```bash
# No debug output.
./run.sh custom-script
# With debug output.
./debug.sh custom-script
```Or, alternatively:
```bash
cd wall-e-py
source .env/bin/activate
maturin develop
cd ..
python3 ./scripts/custom-script.py
```Rendered images, by default, are placed in the root folder.
### Dependencies
- [pyo3](https://github.com/PyO3/pyo3): Interacting with Rust code using Python.
- `nalgebra`: Linear algebra cratea.
- `image`: Image processing crate.
- `lazy_static`: Utility crate for creating global mutable variables with non-const initialization.
- `obj`: Utility crate for loading `obj` files.
- [maturin](https://github.com/PyO3/maturin): Building python3 module generated using `pyo3`.
- `rand`: Utility crate for random number generation.