Leave a comment

Ambient Occlusion

Early on in the development of my engine, I added a screen space ambient occlusion (SSAO) implementation. I was never really satisfied with this – the effects were fairly subtle (maybe that’s a good thing), and it was expensive (8ms per frame on my admittedly crappy GeForce 8500, and a few ms on the Xbox 360).

The bang for the buck was limited.

Since then though, I’ve been playing around with baked AO. The occlusion term is pre-calculated and baked into vertices of many objects. I was never a fan of this before because it needs thought in applying it each object (i.e. it isn’t a global on/off solution, like SSAO). Also, objects like walls had very few vertices and it so it wouldn’t be feasible for these types of things.

After seeing how good vertex AO looked on vegetation though, I decided to pursue it a little more. In addition to a term baked into plants, I also generate an occlusion term on the terrain at runtime. Certain objects (so far just walls and vegetation) “cast shadows” on the terrain. This is stored in a separate vertex stream so I may be able to update it frame-by-frame for moving objects like characters (this isn’t done yet). Here’s an example with no directional light (e.g. no sun/moon) and thus no shadows. Since I have a dynamic weather system, I can’t always rely on the presence of a directional light (e.g. it might be pouring rain). The light is very flat without AO (top image), and looks much better with AO (bottom image). I may have overdone things here a bit to show the effect.

Ambient hemispheric light only. Top image: no occlusion term. Bottom image: with occlusion term.

The best part about this is that it incurs no perceptible rendering cost (there is some additional CPU cost though).

I think the limited nature of my views will make this a feasible option even if this isn’t phyically correct.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Space Quest Historian

Adventure game blogs, Let's Plays, live streams, and more

Harebrained Schemes

Developer's blog for IceFall Games

kosmonaut's blog

3d GFX and more


Turn up the rez!

bitsquid: development blog

Developer's blog for IceFall Games

Game Development by Sean

Developer's blog for IceFall Games

Lost Garden

Developer's blog for IceFall Games


Developer's blog for IceFall Games

Casey's Blog

Developer's blog for IceFall Games


Developer's blog for IceFall Games

Rendering Evolution

Developer's blog for IceFall Games

Simon schreibt.

Developer's blog for IceFall Games

Dev & Techno-phage

Do Computers Dream of Electric Developper?

- Woolfe -

Developer's blog for IceFall Games

Ferrara Fabio

Game & Application Developer, 3D Animator, Composer.

Clone of Duty: Stonehenge

First Person Shooter coming soon to the XBOX 360

Low Tide Productions

Games and other artsy stuff...


Just another WordPress.com site

Sipty's Writing

Take a look inside the mind of a game developer.

Jonas Kyratzes

Writer, game designer, filmmaker.

%d bloggers like this: