HBAO – Ambient Occlusion

Last year I looked at SSAO techniques (Screen Space Ambient Occlusion) and a fellow game developer mentioned HBAO to me (Horizon Based Ambient Occlusion). As post processing screen based effects are often the most rewarding to work on I thought I would investigate HBAO compared to SSAO. I found that there was a significant improvement – almost to the point that the HBAO first pass rendering is good enough – it may not actually need the blurring shader pass that typically follows SSAO.

I tested on static geometry with a stable camera:

hbao – no blur
hbao – with blur

I had problems with SSAO in that when characters or the player camera is in motion across geometry the SSAO rendering would be very noisy and ‘swim’, HBAO however is very stable. A test on a character confirmed this.

Isolated HBAO on a character without and with blur
character on left has no HBAO, on the right has blurred HBAO applied

[note this is a ‘time travel’ post – with a retro fitted blog posting date matching the approximate time the work was completed]

Game Engine User Cameras

In-game cameras – that the game developer can use to render scenes to textures, that are also within game (diegetic) are useful for such things as player portals, mini-maps, rear view displays in cockpits and the like.

Clearly using too many of these type of cameras will affect performance and FPS drops are likely as the scene the user camera is processing has to be rendered internally before being applied to the in game ‘screen’. Still – if used carefully they add something extra and fun to game world environments.

[note this is a ‘time travel’ post – with a retro fitted blog posting date matching the approximate time the work was completed]

Which Game Engine for Cogwheel Chronicles ?

For several years the Cogwheel Chronicle Universe (CCU) has been built out using a custom engine (for fun I came to call it the ‘Cogwheel Engine’) that evolved from the Game Guru engine source code that Lee Bamber of ‘The Game Creators’ company made available on GitHub.

I rewrote parts of the engine and totally redeveloped the PBR shaders and lighting along with adding dozens and dozens of features required to help the vision for the Cogwheel Chronicles game world and game play to become realised.

Cogwheel Game Engine
Cogwheel Game Engine

I was spending as much time on changing and building out the engine as I was on environments, models and game play logic. If not much more time in reality, it became a very enjoyable ‘time sink’, but also a distraction if the overarching goal was to actually ship a decent steampunk video game.

Cogwheel Engine UI
Cogwheel Engine UI

Nevertheless I have learned a huge amount about the underlying mechanics of game engine development, HLSL shaders and the more technical aspects of game build that will always hold me in good stead for future work.

At the start of 2020 The Game Creators (TGC) decided to launch a completely revamped Game Guru game engine called ‘Game Guru Max’ (mainly by adding the rendering capability of the ‘Wicked Engine’ and adding/extending terrain build capability). At first flinch I thought this would help Cogwheel Chronicles in that I could use the additions being made to Game Guru to make Game Guru Max for the ‘Cogwheel Engine’ (as a huge portion of the c++ code base is Game Guru).

Alas it was not to be as TGC decided to close access to the source code. At one point during early 2020 they did say it would be opened up again once the main dev work was complete, but later in the year stated it was highly unlikely it would ever be made public again.

Game Guru Max – as good as I hope it will eventually be for everyone, will still not provide the features I need for the game I want to release – and with closed source I can’t add them. Lee has stated the shader pipeline (from Wicked Engine) will also remain closed to developer update which is absolutely no use for Cogwheel Chronicles requirements.

I’ve also been truly staggered, it’s literally unreal, what Unreal are making available for game developers with Unreal 5 in 2021, both from a technical point of view and the lifting of the commercial take they get to only those projects accruing over $1M. Unreal 5 is simply a paradigm shift in game making tech that can’t be ignored. And their source code is completely open for modification if in the unlikely event it was needed.

It’s hard to leave the Cogwheel Engine behind after years of development, indeed I still use it for fast prototyping of ideas, but the visuals of Unreal can’t be ignored, nor can the capabilities that underpin the engine and its performance.

Cogwheel Chronicles - Unreal Engine
Cogwheel Chronicles – Unreal Engine
Cogwheel Chronicles - Airship - Unreal Engine
Cogwheel Chronicles – Airship – Unreal Engine

Unreal Third Person Blueprints

Exploring how to get a custom character to operate as a third person view protagonist – and essentially there are four steps:

(1) Import character and animations, with at least those needed for the minium viable TPV e.g. idle, walk, run, jump.

(2) Setup an event graph blueprint

(3) Build out a state machine, using the variables exposed from the event graph to run the transition state rules for the animations.

(4) For nice smooth animation blends create a blend state map (in this example blendstate only used between walk and run animations, transitioning on character speed)

Examples below of 2 and 3 for a very simple third person blueprint. Once these factors are all working can then position camera to actor distance, angle etc.

This third person blueprint tutorial video helps, though has not been built for version 4.25 and some of the event graph functions are different and require tweaks (as per first picture below)

Using Unreal for Cogwheel Chronicles

I’m continuing the investigation of using Epic’s Unreal Engine (version 4.25) for Cogwheel Chronicles.

Presently as a beginner with Unreal, I followed an interesting tutorial – https://www.youtube.com/watch?v=a0qNO6_xPx0 .

This just scratches the surface of Unreal, but once through it I did know the very rough basics of importing assets and basic terrain creation and update. It’s just enough to get you going.

Here’s our heroine Cathodia Callan rendering under Unreal:

Cogwheel Chronicles – Unreal Experimentation

Can’t say I’m upset with the initial visualisation .. a long way to go though

New Hero Steampunk Airship

steampunk airship

Some elements of 3d kitbashing have gone on to create this new hero airship for Cogwheel Chronicles. As much as I might want to create everything from scratch, I just don’t have the time at the moment.

Still, I think it looks OK rendering in Unreal and looks pretty cool in action with flapping wings and spinning rotors.