Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Night at the Museum: Interactive 3D Virtual Tour

An immersive 3D museum experience developed using OpenGL 3.3 for the "Synthèse d'Images" module at USTHB. This project explores real-time rendering, dynamic lighting systems, and interactive gameplay mechanics within a high-fidelity virtual environment.

Technical Specifications

  • Language: C++17 (Compilateur MinGW-w64 GCC 15.2.0)

  • Graphics API: OpenGL 3.3 Core Profile via GLAD

  • Libraries: * GLFW 3.4.0: Window management and input handling

  • GLM: Matrix and vector mathematics

  • Assimp 6.0.3: Complex 3D model loading (FBX, GLB)

  • stb_image: Texture decoding

  • Build System: CMake with automated deployment scripts

Core Features

  • High-Fidelity Rendering: Optimized pipeline managing approximately 2.7 million triangles while maintaining a stable 60 FPS.

  • Lighting Engine: Implementation of the Phong Reflection Model (Ambient, Diffuse, Specular) with multiple light types:

  • Flashlight: A camera-aligned Spotlight (Toggle via F).

  • Static Lights: Ambient chandelier and soft-light gallery projectors.

  • Interactive Lights: Context-aware illumination for statues and artifacts.

  • Physics & Navigation: FPS-style camera with vertical clamping and delta-time synchronization. Collision detection is handled via Oriented Bounding Boxes (OBB).

  • Interactive Gameplay: Scripted door animations, spatialized audio feedback, and a specialized Inspection Mode for detailed object observation.

Screenshots

Main Exhibition Hall

The main hall features high-density 3D models including dinosaur fossils and statues, demonstrating the engine's ability to handle complex geometries.

image

Lighting and Atmosphere

Demonstration of the dynamic lighting system, showcasing the player's flashlight and the environmental contrast created by the Phong reflection model.

image

Inspection Mode

A dedicated mode that allows users to lock onto an artifact and rotate it 360 degrees for a detailed view of its topology and textures.

image

Controls

Input Action
Z, Q, S, D Movement (Forward, Left, Backward, Right)
Mouse Camera Look / Orbital rotation in Inspection Mode
F Toggle Flashlight
E Interact (Open Doors / Activate Statue Lights)
I Enter/Exit Inspection Mode
ESC Exit Application

Project Structure

.
├── assets/                  # Game assets (models, textures, sounds, shaders)
├── external/                # Third-party headers and sources
│   ├── glad/                # OpenGL loader (generated)
│   ├── KHR/                 # Khronos platform header
│   ├── json.hpp
│   ├── miniaudio.h
│   ├── stb_image.h
│   └── tiny_gltf.h
├── libs/                    # Third-party libraries (glm, mingw64)
├── src/                     # Source code organized by module
│   ├── core/                # Engine core (Application, ResourceManager, shader, audio)
│   ├── model/               # Model loaders (obj, fbx)
│   ├── scene/               # Scene/room logic (Room1, Room2, Hallway, MuseumScene)
│   └── main.cpp             # Entry point
├── docs/
├── CMakeLists.txt
└── README.md

How to Run

Prerequisites

  • CMake ≥ 3.15
  • C++17 compatible compiler (GCC, Clang, MSVC)
  • OpenGL 3.3+ drivers
  • GLFW 3
  • Assimp 6.x (for GLB/FBX model loading)

Build & Run

# 1. Clone the repository
git clone https://github.com/YounesBensafia/MidnightMuseum.git
cd MidnightMuseum

# 2. Configure
cmake -S . -B build

# 3. Build
cmake --build build

# 4. Run
./build/main        # Linux / macOS
# or .\build\main.exe  # Windows (cmd)
# or ./build/main.exe  # Windows (Git Bash / PowerShell)

Authors: BENSAFIA Younés, MOUSTARI Abderrahmane, TADJINE Rabah Amine Institution: University of Science and Technology Houari Boumediene (USTHB) Faculty: Computer Science (FI) Academic Year: 2025/2026

About

An immersive 3D museum experience developed using OpenGL 3.3. This project explores real-time rendering, dynamic lighting systems, and interactive gameplay mechanics within a high-fidelity virtual environment.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages