Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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 :)

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.