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.
I implemented a very nice bloom effect which was presented by Sledgehammer at SIGGRAPH 2014.
A short explanation of how it works:
- Prefilter the scene render texture to create a texture that go above a certain threshold.
- 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).
- 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.
- The final result will be amazing!
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.
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
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.