A minimalistic 3D engine that renders models in the terminal using unicode characters. No external graphics libraries are used. The entire 3D rendering pipeline is implemented from scratch, using only basic Python and NumPy for matrix operations.
- 3D Model Loading: Supports loading 3D models from OBJ files.
- Transformations: Implements basic transformations: translation, rotation, and scaling.
- Shading: Simple shading based on the angle of the surface to a light source.
- Terminal Rendering: Renders the final output in the terminal using unicode characters.
- Performance: Optimized for real-time rendering in the terminal, achieving smooth animations.
- Interactive Controls: Allows user interaction to move the camera and rotate the model.
Important
Before running the engine, resize the terminal window to a resolution of 120x40 characters for proper display. You can do this through terminal settings or, alternatively, simply run the engine and drag the window until the image is displayed correctly.
Install the package and run the main script:
pip install .
graphicspipe
# uv sync
# uv run graphicspipe- W/A/S/D: Move the camera.
- ↑/←/↓/→/: Rotate the camera.
- R: Rotate the model.
- +/-: Adjust FOV.
- Esc: Exit the engine.
Click the image below to watch a demo of the engine in action:
