ERA

MAIN RESPONSIBILITIES

EDITOR

I wrote an editor for this project and the following ones that I am very proud of considering the small amount of time spent doing it, you can read more about it here.

ANIMATION

Further building upon the animation system with some notable changes and improvements.

  •  Layered animations with each layers supporting a different type of animations.
    • Additive animations
    • Override animations
    • Skeleton mask to mask what joins are affected by a specific layer.
  • 1 dimensional blend tree’s for blending between multiple animations within same state.
  • Parallelized animations calulations
  • Culling the animations that are never rendered by any camera.
  • Optimizing the animations by baking the clips together with the required model.

A whole Animation State Machine Editor for this system that you can read more about here.

RENDERING

BLOOM

I implemented a very nice bloom effect which was presented by Sledgehammer at SIGGRAPH 2014.

A short explanation of how it works:

 

  1. Prefilter the scene render texture to create a texture that go above a certain threshold.
  2. Create a mipmap chain by downsampling the prefiltered texture using a box filter until reached the target mip level (adjustable depending on how much bloom spread).
  3. Now go from the highest mip level and upsample it using a tent filter and adding the previous upsample result additively onto the current one.
  4. The final result will be amazing!

TONEMAPPING

We support HDR rendering, therefore we need tonemapping to convert the colors from HDR to LDR before displaying it on the monitor.

I chose ACES which is the same tonemapping Unreal Engine uses which makes very bright parts almost white, which goes very well together with the bloom and really give the sense of brightness.

DEFERRED DECALS

I added deferred decals with support for optional albedo, material and normal textures to make the level designers be able to make the work feel more full.

In image below, the white bounding boxes are all decals to make this part of the work feel “fuller”.

SCREEN SPACE AMBIENT OCCLUSION

Everything looked flat without ssao, it was a cheap and good method to use to get more depth in the scene.

CAPTURE IN-ENGINE CUBEMAP

I added the ability for us to capture and generate a mip map blurred cubemap of the environment from within the engine.

This is the start building blocks to in the future support Reflection Captures like Unreal Engine does.

RENDERING PERFORMANCE OPTIMIZATIONS

Light Volumes

Rendering was taking a huge part of the frametime budget. After profiling I found out that spotlight and point lights were taking the biggest part of the performance budget.

The solution that gave a massive improvement was light volumes instead of the previous way which was fullscreen quads causing us to be extremely fillrate bottlenecked.

 

Draw call sorting

Another part that give good performance savings was sorting the render calls to minimize state changes.

That was done using a nice method I found here which simply creates a integer key that can be used to sort an array of these commands very quickly.

THE PERFORMANCE RESULT

The above optimizations along with a couple of others, we were able to never go below 60 FPS on our computers. In the left video, we have a total of about 160 point lights and 100 spot lights with all spotlights being shadow casters. The shadow resolution on all shadow casting lights being 1024×1024.