Written by Lukas Vyhnalek aka KiLLA.
BSD license, read LICENSE for more information.
All text above must be included in any redistribution.
Set of tools for basic 3D on embedded platforms.
- Python script to read .obj file exported from Blender and create .h file to include in your project
- Engine in include file to put into project folder rather than library to make development easier
- Examples of use
- object_3D internal format (optional)
- development status - beta/stable
- operating system independent (to some extent)
- designed to rely on as few external modules / libraries as possible
Operating System | Installation methods | State |
---|---|---|
Linux | manual | Tested |
Windows | manual | NOT Tested |
macOS | manual | NOT Tested |
- open Blender, create or open desired 3D model and export it as Wavefront (.obj) file
- open the folder containing new .obj file, copy obj_to_header.py there, mark it executable
- open terminal and paste "./obj_to_header.py 20 include.h yourfile.obj" , execute it and include.h file gets created from yourfile.obj @ 20 pixels per Blender's meter
- include the engine.h and include.h in your project
- one object per .obj file (TODO)
- uses line-drawing methods from display device's library (Adafruit_GFX)
- 65535 triangles per object limit for most functions, some are limited to 255
- precision of vertices int8_t - increasing it is trivial but has major impact on SRAM and FLASH space usage
- 16MHz Atmega328 draws <1000 unfilled triangles / second
MCU | State |
---|---|
atmega328 | ok |
stm32 | ok |
esp8266 | not tested |
esp32 | not tested |
DISPLAY | State |
---|---|
SSD1306 | ok |
SSH1106 | TODO |
ST7735 | TODO |
19264-05 v3 | not tested |
- read multiple objects from single .obj file
- add colour modes
- basic z-based shading for colour modes
- finish port of print function from other project, include basic font
- optimize some here and there
- add more functions and possibly put into class so it can be used as a library as well