THIS PROJECT WAS THE WORK OF 3 PEOPLE BUT I COULDN'T FORK THE ORIGINAL REPO DUE TO MY SCHOOL'S ORGANIZATION
- [Paul-Henri-Solat-Gtech] (https://github.com/Paul-Henri-Solat-Gtech)
This project is a C++ 3D model parser and renderer developed to better understand how a graphics engine works internally and how to parse 3D model file. The goal was to parse .obj and .fbx files and render them using OpenGL, without relying on external parsing or rendering libraries.
The project supports:
- Parsing .obj files (vertices + textures)
- Parsing .fbx files (vertices only – texture rendering currently buggy)
- Displaying parsed models using OpenGL
Technologies used:
- C++20
- OpenGL
- CMake for build management
- Visual Studio 2022 (or compatible)
- CMake >= 3.30
- Git
- Clone the repository:
git clone https://github.com/tiagzoc/FBX-OBJ-Parser
- Create a build directory and navigate into it:
mkdir build && cd build
- Run CMake to configure the project:
cmake ..
- Build the project and open the .sln (or .slnx) file:
cmake --build . --config Debug
- Right Click on the
appproject andSet as Startup project. - Run the program.
Note: You can change which file you want to load in the
main.cppfile of theappproject.
- The project reads 3D model files and parses their internal structure.
- For .obj files:
- Vertices, texture coordinates, and faces are parsed correctly.
- Textures are loaded and displayed using OpenGL.
- For .fbx files:
- Vertex data is parsed and rendered.
- Texture parsing is incomplete and currently not displayed correctly.
- OpenGL is used directly to:
- Upload vertex data to the GPU
- Manage buffers and shaders
- Render the model to the screen
- Understanding the structure of .obj and .fbx files
- Implementing a custom parser in C++ without external libraries
- Using OpenGL for:
- Vertex buffers (VBO)
- Vertex array objects (VAO)
- Shaders
- Fix FBX texture parsing and rendering
- Support materials (.mtl) more extensively
- Add support for more 3D formats
- Implement a camera system (free cam, FPS cam, etc.)
- Optimize rendering for larger models
- Add basic lighting