Skip to content

A C++/OpenGL mesh viewer for OBJ format models.

Notifications You must be signed in to change notification settings

KSkun/Mesh-Viewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mesh-Viewer

A C++/OpenGL mesh viewer for OBJ format models.

Features

main

This application allows you to view 3D models in OBJ format with different materials & light models.

Under development, new features are on the way ;)

Camera:

  • WASD for close-far and left-right movement
  • Mouse drag for rotation
  • Mouse scroll for zoom

Rendering:

  • Constant ambient light
  • Blinn-Phong
    • Gamma Correction
    • HDR Tone Mapping

Besides the predefined shaders, you can add custom shaders in src/shader directory and use it in the code.

Model:

  • OBJ file for mesh vertices, normals and UVs
  • MTL file for materials

An example model of Lumine (Genshin Impact) is attached in resource/lumine directory. You can add custom models and load it in the code.

Build & Run

This project is configured for Windows 11 64-bit & MSVC 2022. If you are using a different toolchain or platform, the CMakeList.txt may not work normally on your environment.

  • mkdir build && cd build
  • cmake ..
  • Open Mesh-Viewer.sln and build project in Visual Studio.
  • Find binaries in Release directory.

Currently, shader & resource path is hard-coded in main.cpp, so the Mesh-Viewer.exe file should be placed at a bin directory, along with src/shader and resource directory. Please refer to the v0.1 release pack.

Resources

3rd Party Libraries

Models