Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

orView

A cross-platform 3D model viewer built with Qt 6 and OpenGL 4.5 Core, powered by Assimp for broad format support.

Status: Under active construction. APIs, UI, and features are still evolving — expect breaking changes.


Table of Contents


Overview

orView is a desktop 3D model viewer focused on clean, modern OpenGL rendering wrapped in a configurable Qt Widgets UI. It loads meshes through Assimp, normalizes them to unit coordinates, and renders them with a Blinn-Phong material pipeline. The viewport supports orbit/spin interaction, standard preset views, and perspective/orthographic projection switching.

The project is currently being modernized — the rendering path has been ported from OpenGL 3.3 Compatibility to OpenGL 4.5 Core, and the codebase was brought up to Qt 6.10.


Features

Rendering

  • OpenGL 4.5 Core profile pipeline
  • Blinn-Phong shading with per-mesh materials
  • Diffuse texture support via Assimp material channels
  • Normal visualization toggle (geometry shader)
  • Opaque / transparent node separation during draw
  • Model normalization to unit coordinates on import

Camera & Navigation

  • Orbit view and spin view modes
  • Preset views — Top, Bottom, Left, Right, Front, Back
  • Zoom Extents, Zoom Window, Reset
  • Quaternion-based rotation for smooth, gimbal-lock-free orbiting
  • Perspective and orthographic projections

UI

  • Dockable Events Log panel
  • Case Setup panel with tabbed views
    • Model Info — live Assimp node hierarchy tree
    • Properties — mesh, material, and channel details
  • Light and Dark themes
  • Splash screen on startup
  • Persistent XML-driven UI configuration

File I/O

  • Loads any format supported by Assimp (OBJ, FBX, glTF, STL, 3DS, DAE, PLY, and more)
  • Drag-free File → Open workflow with relative/absolute path handling

Screenshots

View Preview
Main window with model & hierarchy Main view

More screenshots are available under results/.


Tech Stack

Layer Technology
Language C++14
UI framework Qt 6.10 (Widgets, OpenGLWidgets)
Graphics API OpenGL 4.5 Core
Math GLM + QMatrix4x4 / QQuaternion
Model loading Assimp 3+
Build system CMake 3.14+ (qmake .pro also provided)
Config I/O Qt XML

Requirements

  • Qt 6.10 or newer — modules: Core, Gui, Widgets, OpenGL, OpenGLWidgets, Concurrent, Network, PrintSupport, Xml
  • Assimp 3.x or newer (system package on Linux, bundled under External_Libs/Assimp3/ on Windows)
  • CMake ≥ 3.14
  • A GPU and driver supporting OpenGL 4.5 Core
  • C++14 capable compiler (GCC 9+, Clang 10+, MSVC 2019+)

Build Instructions

Linux

# Install Assimp system package
sudo apt install libassimp-dev

# Configure & build
cd orView
mkdir -p build && cd build
cmake ..
cmake --build . -j$(nproc)

# Run
./orView

The CMake script expects Qt at $HOME/Qt/6.10.2/gcc_64. Adjust CMAKE_PREFIX_PATH in orView/CMakeLists.txt if your Qt install lives elsewhere.

Windows

  1. Install Qt 6.10+ with the MSVC kit.
  2. Place Assimp headers and assimp.lib under External_Libs/Assimp3/.
  3. Open orView/CMakeLists.txt or orView/orView.pro in Qt Creator and build against the MSVC kit.

macOS

brew install assimp
cd orView && mkdir -p build && cd build
cmake -DCMAKE_PREFIX_PATH="$(brew --prefix qt)" ..
cmake --build . -j

Usage

  1. Launch orView.
  2. Use File → Open to load a model (or drop one of the bundled test models from test_models/).
  3. Navigate the viewport:
    • Left-drag — orbit
    • Middle-drag — pan
    • Wheel — zoom
  4. Switch views via the toolbar or View menu (Top, Front, Isometric, etc.).
  5. Toggle Perspective / Orthographic projection.
  6. Inspect the loaded scene through the Model Info tab (Assimp node tree) and the Properties tab.
  7. Switch between Dark and Light themes at any time.

Project Structure

orView/
├── orView/                     # Application sources
│   ├── main.cpp                # Entry point + splash
│   ├── mainwindow.*            # Shell, menus, docks, themes
│   ├── mother_widget.*         # Central widget host
│   ├── core_gl_widget.*        # OpenGL 4.5 Core viewport
│   ├── camera.*                # Orbit / spin / preset camera
│   ├── model.*                 # Assimp wrapper, node tree, materials
│   ├── themes_manager.*        # Dark / Light theme application
│   ├── xml_manager.*           # XML-driven config loading
│   ├── type_converter.*        # glm <-> Qt matrix helpers
│   ├── model.vert / model.frag # PBR-ish Blinn-Phong shaders
│   ├── normals.{vert,geom,frag}# Normal visualization shaders
│   ├── Resources/              # Icons, splash, UI assets
│   ├── themes/                 # Theme stylesheets
│   └── Config/                 # Default XML config
├── test_models/                # Sample meshes for quick testing
└── results/                    # Reference screenshots

Roadmap

Work-in-progress items and planned features:

  • Port UI from Qt Widgets to Qt Quick / QML (keeping the OpenGL Core renderer)
  • Ray-based mesh picking (Bullet-based picking under evaluation)
  • Richer Model Info panel (per-mesh statistics, material preview)
  • Multiple light sources and light configuration UI
  • Scene graph manipulation (hide/show, isolate, transform gizmo)
  • Screenshot and turntable animation export
  • HDR environment maps / image-based lighting
  • Cross-platform CI for Linux, Windows, macOS

Test Models

The test_models/ directory ships with sample meshes for quick verification:

  • buddha
  • car
  • demon_head
  • dino
  • Dragon
  • suzanne
  • Thor

These are convenient first loads after a fresh build to confirm the renderer is working.


License

License terms will be published alongside the first tagged release. Until then, treat this repository as source-available, all rights reserved — feel free to read, build, and experiment locally, but please open an issue before redistributing or using the code in another project.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages