January 28, 2014

Temporal multi-resoluton SSAO in Temporality – Ultra mode

by Niklas Hansson

When we started working on Temporality one thing was very clear to us, to make a good looking indiegame on a shoestring budget we needed a good lighting solution that would take our simple models and make them look the best way we can. So we spent a lot of time on our light solution and we felt that a really solid SSAO solution was an important part of this. However with the limited bandwidth of the XBOX360 the traditional SSAO techniques wouldn’t work.  We did some experimentation with low quality approximations like Volumetric Obscurance(crysis 2 used this on console). But we felt we needed something of a higher quality.

Here is an example of what our original implementation could achieve on the left side there is no SSAO and on the right side we added it.


The big issue with SSAO is that it samples the depth buffer to determine if a sample lies in front or behind the current depth buffer value. On the 360 4 samples are around the maximum that it can handle decently. This is what Volumetric Obscurance uses. The thing is that with 4 samples you can detect cracks but you really don’t have enough information to detect the longer ranging effects of the AO,  so we knew we needed more samples. The first thing we did was to remember that since the camera doesn’t move around to different parts of the map every frame but are in the same are the same pixels on the screen will be visible during a large number of frames. Sure the pixel might move but it will still be the same place in the world with the same light information.

This idea  is called Temporal Coherence and can be used to save time on any kind of calculations like shadows and so on. You just detect if the pixel has been calculated the frame before and reuse the value. Our solution however is a bit different. We want to use the Temporal Coherence to add new calculations for every frame that we combines with the old ones to create a more accurate view. We basically save values through the last 16 frames which gives us 16*4 = 64 Samples per pixel which is pretty nice since most ultra modes uses only 32.

Due to performance reasons SSAO are normally performed in a lower resolution and then blurred so that you won’t notice the pixels. This is a good optimization if you do it in 1/4 of the resolution you get to do it at 1/4 of the cost. And the SSAO needs a blur anyway due to the low number of samples.  We discovered that with our 64 effective samples we really didn’t need that strong a blur which allowed us to drop resolution one step more to 1/16 of the resolution which made it possibly for us to also add in Screen Space Light bounces too and still keep it running on the 360.

However one problem of SSAO is that it only catches small scale obscurance and can’t really consider the larger forms and distant light obsurance and we felt we needed to fix this too. Our solution is to use multiple resolutions. We resolve SSAO at 1/16 1/64 and 1/256 resolution (which is 1/4  1/16 and 1/64 resolution around either axis) (this was before the paper was published to be honest I still haven’t had time to read it to compare). But due to the low resolution we got a lot of noise. However thankfully Temporal Coherence came to the rescue again. Due to the low resolution we could increase the amount of samples to 16 and 32 which gives us 256 and 512 real samples. Combined with a liberal blur(which we can do since we have high res data from the other passes) this allowed us to capture  even distant effects of obscurance.

Last week we decided to revisit the SSAO due to the game being a PC centric title, what we realized is that while we could gain some wins with increasing sample count the solution we had in place did a good job for what it was meant to do. In fact in the end we just bumped the samples and the resolution. In Ultra mode we now get 256 Effective samples per pixels which gives an ultra smooth SSAO almost without any blur. And after careful bench marking we decided to retain this also for the very High mode but at the old resolution. While doing this we also did some extra parameters tweaking to give the SSAO just a little bit more umph.

Here is a look at the first implementation
OldSSAO copy
And the new Ultra mode version.

newUltra copy






Share this

Temporal multi-resoluton SSAO in Temporality – Ultra mode Temporal multi-resoluton SSAO in Temporality – Ultra mode Temporal multi-resoluton SSAO in Temporality – Ultra mode Temporal multi-resoluton SSAO in Temporality – Ultra mode
May 18, 2013

Weekly Progress, GUI,Maps etc

by Niklas Hansson

So we have had a lot of things going on during this week some we can talk about and some we can’t. One of the main things we have worked on this week is to actually map the game out all the way to the end which means putting a limit on what gameplay elements we are going to put into the game and how many levels each can manage before being repetitive. While some cool ideas as always had to hit the cutting floor we are pleased with what we have homed in on. It’s nice to finally have a set scope on the project as we can really feel how we are moving towards the finish line.


This project has been a giant labor of love from our side from it’s humble beginnings over 2.5 years ago to now. The funny part is that it was supposed to be a quick 6 months project to test out XNA,XBLIG and digital distribution overall but when all focus testers loved it so much we decided to spend the extra time doing it really well, because if you have something people love you shouldn’t rush it out so we spent a lot of time going over the graphics (compare to this early version and it’s not even the first http://www.youtube.com/watch?v=60ipniNj_qY) ) But also trying out different puzzles and mechanics we have focus tested a ton of puzzles we have even had the game at lans with people not knowing it was in early pre-alpha to measure real worlds peoples attention. All to make certain that the final product will be worth it. And now finally after over 2.5 years we can finally see the goal it’s still a bit away but we can see it.

So it has been time to turn our attention to stuff that really hadn’t mattered so much this far like our front end ui. But as this is the first thing that meets the players eyes it’s important that it feels attractive and simple to use. We have been throwing around a lot of different ideas here but in the end we had to select one that wouldn’t break the current scope of development because as a wise man said “Real artists ships” If we can’t put the game in your hands then all our work is for nothing.

So in the end we went with a simple but visually attractive style. While it doesn’t show here on an image we have everything in the UI animated so it’ not a boring still image it reacts to you fades in and out images, it actually feels really nice compared to our earlier placeholders so we are quite happy with this change. We also finally have a working options screen that will allow you to configure the game according to your needs. We are currently looking at quite simple options as this won’t be a game that requires the newest hardware to run. A simple setting of High,Medium and Low should suffice on the graphics side. As for controls we are currently debating to what extents they needs to be rebind-able.

Also this week Project Temporality is a part of Pixel Prospector new video for greenlight (55 indie games in 5 minutes). About greenlight we will soon be in a situation where we will start pushing for it and update it with a ton of new content we just need a little time as we are working hard with our indiecade deadline.

But as always please go and vote for us at greenlight. And also expects a lot more news from us in the coming weeks, the new screen shots with the latest posts gives a hint of what is to come :)

Share this

Weekly Progress, GUI,Maps etc Weekly Progress, GUI,Maps etc Weekly Progress, GUI,Maps etc Weekly Progress, GUI,Maps etc