OpenGL Model Viewer
A 3D Viewer that reads and displays most common 3D file formats that are supported by the Assimp library and STEP and IGES files using the Open Cascade library.
It supports various visualization and rendering styles including Physically Based Rendering as seen in the screenshots below.
OBJ File Rendering with Textures and Colors
Material Rendering with Texture Based PBR
Realistic Rendering with Skybox Environment
Building the Code: Prerequisites
Ensure you have the following installed:
CMake: Version 3.15 or above
Qt: Version 6.8 or above
Assimp: Version 5.0.1
GLM
Freetype: Version 2.10.1
OpenCascade: Version 7.9
vcpkg (for Windows)
Build Instructions Linux
Install the required dependencies using your package manager (e.g., apt, yum, etc.).
Ensure all dependencies (listed above) are available in your system.
Clone the repository:
git clone https://github.com/sharjith/ModelViewer-Qt.git
cd ModelViewer-Qt
Create a build directory and configure the project using CMake:
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
Build the project:
make
Run the application:
./ModelViewer
Windows
Install vcpkg if not already installed. Follow the instructions here.
Use vcpkg to install the required dependencies:
vcpkg install qt6-base assimp glm freetype:x64-windows opencascade:x64-windows
Clone the repository:
git clone https://github.com/sharjith/ModelViewer-Qt.git
cd ModelViewer-Qt
Create a build directory and configure the project using CMake with the vcpkg toolchain:
mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=[path_to_vcpkg]/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Release
Replace [path_to_vcpkg] with the path to your vcpkg installation. Build the project:
cmake --build . --config Release
Run the application:
.\Release\ModelViewer.exe
Additional Notes
Replace the library versions with the latest ones, if applicable, but ensure compatibility with the project.
For troubleshooting, refer to the documentation of the respective tools and dependencies. On Windows, you can open the project using CMake option and build.