This is a small 3D rendering engine written in OpenGL as a final project for a university course.
It features some basic functionality such as textures, shaders, basic models and materials support.
- Shaders (shader.py for wrapper, shaders/ for GLSL sources)
- Gouraud shading with fog
- Phong shading
- Light sources (light.py)
- Directional
- Point with attenuation
- Spotlight
- Material support
- Loading
*.obj
models and*.mtl
materials (loaded_object.py) - Multiple camera types (see Keyboard shortcuts)
- Python 3.8
pip install -r requirements.txt
python main.py
glfw
- Window creationpyopengl
- OpenGL bindingspyrr
+numpy
- Vector and matrix operationspillow
- Image loadingpywavefront
- Handling of*.obj
and*.mtl
files
1
- Static camera2
- Follow the monkey3
- Be the monkey
O
- Gouraud shadingP
- Phong shadingF
- Toggle fog<- / ->
- Change spotlight direction