A super basic graphics engine written completely from scratch that can render .obj
and .mtl
files WITH texture mapping. I've been working on this as both my first rust project and a way to kill time at work.
Usage: engine [OPTIONS] --filename <FILENAME>
Options:
-f, --filename <FILENAME>
-n, --normals flip all normals
-h, --help Print help
-V, --version Print version
RUST_LOG=info cargo run --release -- --filename objects/cottage_obj.obj
You can replace objects/cottage_obj.obj
with any .obj
file.
Polygons:
- ff any degree >= 3 are suppored
- without a material will be rendered
DIM
- with a material will use the corresponding
.mtl
definition.
Check out my blog post that talks a bit about the foundations of computer graphics.
.mtl
file paths are RELATIVE to their .obj files.
All sample meshes used in this project were sourced here