scop is a small project in the 42 cursus that introduces us to the world of 3D rendering. Essentially, the following is required:
- Parse a .obj file and display it in perspective.
- Be able to apply textures to the object at the press of a key, with a smooth transition.
- No libraries to load the object, make the matrices, load shaders, textures...
- External libraries are only allowed to handle the window and the events (glfw...).
I overdid it a little. For fun and to explore 3D rendering, I added the following features as bonuses:
- Blinn-Phong lighting model: ambient, diffuse and specular lighting.
- Wavefront material support: load material properties and textures from file.
- Rendering an object that has multiple materials.
- Face-normals and vertex-normals visualization.
- Normal maps support:
bump/map_bumpdirective in .mtl file. - Wireframe mode.
- Light source in world that can be moved freely.
- FPS-style camera controls that are roll-stabilized, for natural movement.
- Cross-platform support (didn't have to do much, thanks Odin!).
This was my first time using a 3D API like OpenGL. I also used this project to try out Odin, since it looked like an interesting language and a good fit. tl;dr: Odin is great, and I'll use it again!
WASD: Move camera horizontally←↑↓→: Pan cameraSpace/Shift: Move camera up/downZ/X: Increase/decrease FOVR: Toggle rotationT: Toggle texturesF: Move light to current positionTab: Toggle wireframeN: Show vertex normal vectors, if they are present</>: Adjust size of vertex normal vectors1/2/3/4: Change active shader:- Default shader
- Face-normals shader
- Vertex-normals shader
- For testing purposes (transparency shader)
You need Odin installed. Then, just run the build script for your platform (build.sh/build.bat).
This project was last built for and with Odin release dev-2025-02.

