Skip to content

A rendering engine and physics simulator built from scratch with OpenGL and C++, featuring custom shaders and bounding volume hierarchy implementations.

License

Notifications You must be signed in to change notification settings

zanbowie138/PhysicsSimulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

170 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PhysicsSimulator

An engine created with OpenGL and C++ that explores the graphics pipeline and computational physics from the ground up.


Current features:

  1. Rendering using Blinn-Phong shading with textures and custom shaders.
  2. Uses an ECS (Entity Component System) for entity management and fast object manipulation.
  3. STL model loading (using this custom loader)
  4. Broad-phase collision testing using both static and dynamic bounding volume hierarchies.
  5. GUI created using ImGUI
  6. Lua-based scene scripting for declarative scene setup

Build Requirements

  • CMake 3.20 or higher
  • Ninja build system
  • C++ Compiler with C++17 support (MinGW-w64 recommended on Windows)
  • OpenGL 3.3+ capable graphics card and drivers

All dependencies (GLFW, GLAD, GLM, ImGui, Lua, Sol2, stb_image) are bundled in src/core/dependencies/.

Building

Configure

cmake -B cmake-build-debug -G Ninja -DCMAKE_BUILD_TYPE=Debug

Build

cmake --build cmake-build-debug

Run

The executable PhysicsEngine.exe (or PhysicsEngine on Linux) will be created in the project root directory.

Important: Run from the project root directory to ensure proper resource loading (shaders, textures, models, scenes).

./PhysicsEngine.exe

Videos:

broad_bvh.mp4
static.mp4
static_lvl_trim.mp4

Future Additions:

  1. Rigidbody collisions
  2. Cloth, fluid simulations
  3. More complex model loading
  4. Monte Carlo style raytracing
  5. Multithreading

About

A rendering engine and physics simulator built from scratch with OpenGL and C++, featuring custom shaders and bounding volume hierarchy implementations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published