Underwater Caustics

I subscribe to several guys building game engines that use youtube to showcase their work – the ‘Wicked Engine’ being one of my favourites, there are prolific updates that often show cutting edge game engine rendering.

Recently a video popped up showing underwater caustic simulation and it is actually a pretty good case of ‘fakery’ (isn’t all game build fakery of sorts though). So using that as inspiration I delved in to the open source to see if I could replicate/duplicate in the ‘Cogwheel Engine’.

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

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]