What is This Project About? This is a solo project about how I implemented an ECS Engine with deferred rendering. The few things that inspired and motivated me to embark upon this journey was the fact that my tech director used an ECS engine architecture to create Project: Gemini and I recall how amazing it was to work in that […]
What is This Project About?
This is a solo project about how I implemented an ECS Engine with deferred rendering. The few things that inspired and motivated me to embark upon this journey was the fact that my tech director used an ECS engine architecture to create Project: Gemini and I recall how amazing it was to work in that project as a programmer. I also took inspiration from how Unity creates components and how easy it is for any entity to have any specific functionality.
In the above video, I demonstrate two components, a mesh component and light component and a generic transform component which is by default on all entities. The mesh component contains information on the mesh, shader, and material. The adjustable value I exposed was the material information which are just uniforms for that shader. The transform contains position, rotation, and scalar values for the entity.
The light component shows that the object has a light attached to it. The information that is exposed is the light color, specular color, specular exponent, and light position which you can mess with.
Deferred Rendering: Showing the G Buffers
This short video shows the individual shaders used used to create the G Buffer as well as showing the toggling of depth for forward rendering. The top left is the diffuse color, the bottom left is position values, and the bottom right is normal data. The top right is the combination of all the shaders used to create the deferred renderer.
HDR, Tone Mapping, and Gamma Correction
In this video I show HDR effects, exposure tone mapping, and gamma correction. I also show Uncharted 2 tone mapping because I thought that looked really good in game and wanted to see if I could replicate it.
Bloom in Deferred Rendering
Here I am showing of bloom in deferred rendering and the brightness buffer which shows what part of the object is going to be bloomed. I used Gaussian Blur for the blooming on the framebuffer with the objects that had lighting on it.
AABB Debug Drawing
Axis Aligned Bounding Box was something I really wanted to implement because I believed it to be one of they key tools for debugging. I decided to make an AABB class that calcuated the bounds with an AddPoint function where it accumulates the bounds for the mesh every time you add the point in the mesh.
AABB Bounding Volume Hierarchy
The AABB Bounding Volume Hierarchy is using the idea of a tree to store the bounds of specific levels in the parent nodes. This BVH was made using the top-down construction method which means the root node contains the total bounds of all the objects within the tree, and the parents contain each sub-section of the objects within the scene. The link below is what I used to come up with the BVH algorithm because it really outlined the process of creating the BVH.
I created an Octree for a single object to show off how it can break down an object based off of the number of points of the mesh. The black boxes show the deepest level of the octree while the other colors distinguish between the other levels of the octree. I also track the memory usage of the octree with a linear allocator to show off how much memory is being used at each level.