With Son of Nor being the first Unity game to use the HBAO+ technology of NVIDIA GameWorks, we expected the integration to take quite some time… but we were proven wrong! After downloading the Unity Plugin of HBAO+ from the NVIDIA website, we just gave it a go. In little less than a day the whole thing was already working inside Son of Nor! Of course there were still some issues in certain parts of the game, but we definitely didn’t expect the plugin to work right out-of-the-box in our project (which at that point was already quite big). YAY!

After the initial setup in Son of Nor, we dug into the source code of the plugin, as well as into our own to fix the remaining issues with HBAO+. For instance Son of Nor features a splitscreen mode, which of course requires two rendering cameras, and thus two instances of the HBAO+ image effect. This turned out to not function properly right away, as only one camera was processed correctly, while the other one showed the occlusion grayscale overlay without updating it (like looking through a dirty lense).

Most developers probably won’t need any kind of splitscreen support, but for instance using the Oculus (or any other kind of VR stereoscopic rendering) will also require you to have two fully featured game-play cameras active at the same time, which is technically exactly like splitscreen.

Another issue we fixed was connected to our ingame cutscenes, as these use completely different cameras again, but of course should also use HBAO+. Initially the plugin didn’t like cameras to be switched on and off all the time (like it happens in cutscenes), but after modifying the initialization method it worked just fine.

The last major issue we encountered was connected to changing graphic settings at runtime: like changing resolution or quality settings. This caused the HBAO+ plugin to produce an all-black output. Though after triggering a re-initialization of the image effect after such changes, this issue was fixed as well.

All in all it took us about a week of development to fully integrate the HBAO+ unity plugin into our existing project, and make it work in all special scenarios and situations. The use of HBAO+ in Son of Nor improved visuals quite astonishingly! Suddenly objects seemed well grounded and the overall atmosphere a lot less flat, all the while not getting any kind of visual artifacts! But I guess pictures tell more than a thousand words, so here you go:

With HBAO+
HBAO+ Ambient Shadow Map
Without HBAO+
With HBAO+
HBAO+ Ambient Shadow Map
Without HBAO+

 

I am really pleased with that outcome and the visual results, thanks NVIDIA!

Julien Mautner
Lead Developer