Skip to content

patricklbell/3d_engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

3D Engine

Crytek's Sponza scene A rendering and game engine with as many features as I felt like, including:

  • Multiple material types (PBR, emissive, Blinn-Phong, etc.)1
  • Directional lighting with cascaded shadow maps and point lights
  • Physically based volumetric lighting based on EA's extinction volume method
  • Water shader with dynamic tesselation, and lighting based on Alex Tardif's and Jean-Phillipe Grenier's articles, this is more of a prototype but water is hard to get right2
  • Level, mesh and animation binary serialisation, asynchronous texture loading with STB_image
  • Skeletal animation, texture animation, and vegetation geometry animation based on Crytek's method
  • Antialiasing with MSAA and FXAA, PBR bloom, Exposure adjustment and tonemapping, and SSAO (kept subtle because of depth reconstruction imprecisions)
  • Lightmapping with lightmapper, with UV parameterisations done by XAtlas
  • Editor with lots of debugging visualisations, uses Dear ImGui for the GUI
  • Model loading with Assimp, custom GLSL shader pre-processor, dynamic keyboard bindings, player and camera controller, etc.

Building

All the dependencies are built statically except OpenGL.

Windows

Requirements

You need CMake and the Visual Studio build tool-chain for C++. Additionally, OpenGL must be at or above version 4.3 (Should already work, if not, update your graphics drivers).

Building

Download the source and unzip or

git clone https://github.com/patricklbell/3d_engine.git

Navigate to the root of source, create a build directory and build with CMake:

cd 3d_engine
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ./..
cmake --build . --config Release

You then need to make sure that your working director contains the data folder, this can be done by copying the data folder to the build directory for example.

Linux (X11)

Requirements

To compile GLFW you need the X11 development packages installed, on Debian and derivates like Ubuntu and Linux Mint the xorg-dev meta-package pulls in the development packages for all of X11. For more information see https://www.glfw.org/docs/3.3/compile.html. You will need CMake, and OpenGL must be above version 3.3 (Should already work, if not, update your graphics drivers).

Building

Download the source and unzip or

git clone https://github.com/patricklbell/3d_engine.git

Navigate to the root of source, create a build directory and build with CMake:

cd 3d_engine
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ./..
cmake --build .

You then need to make sure that your working director contains the data folder, this can be done by copying the data folder to the build directory for example.

OSX

You're on your own here, sorry!

Footnotes

  1. Some different material types, Blinn-Phong, PBR dielectric, IBL PBR metallic, emissive Some of the different material types, from left to right: Blinn-Phong, PBR dielectric, PBR metallic with IBL, emissive. Let me know if there are any errors in the PBR calculations (I doubt it properly conserves energy).

  2. Water Water with tessellation shader to create dynamic level of detail.