Project Offset engine gains real time ambient occlusion

Brimstone

B3D Shockwave Rider
Veteran
From Sam McGraths developer blog.

I’ve recently been working on a new feature for the Offset Engine: real time ambient occlusion. I took some ideas from Crysis and some other developers (most notably Inigo Quilez…thanks Inigo!) who have been working on similar techniques and made a few improvements over those approaches that makes the effect much more convincing, IMO. For those not familiar with the term, ambient occlusion is a way of approximating global illumination by computing how much a point is occluded by other geometry in the scene (good overview at http://www-viz.tamu.edu/students/bmoyer/617/ambocc/)

It’s not quite ready for prime time yet, and currently requires quite a bit of tweaking to get it looking good in different situations, but I thought I’d show you some WIP comparison screenshots (attached). It works as a post process and requires no precomputation, and works with moving and deforming objects. It currently requires deferred rendering to be turned on, though I may be able to get around this dependency As you can see from the comparison shots, it improves the quality of the rendered scene significantly! The first shot showing the boxes is lit in a very boring way intentionally (a single sky light placed in the editor) to highlight the benefit of the technique.

http://www.projectoffset.com/blog.php?id=83

Sample screenshots at the link.
 
Very unpleasant artefact in the second screenshot, definitely not usable in this form. Does Crysis suffer from the same problem?
 
I'm pretty sure Crysis has the same problems. And in practice, I don't think you can ever use SSAO by itself. You'd have to use it as a "booster" for the static AO and other existing hacks like drop-shadow AO. I've tried looking at Inigo Quilez's implementation as well, and one of the things he probably needs to consider is the direction to the neighboring samples in addition to the distance difference. The big problem is trying to have generic visibility estimates from having only a single viewpoint and a single occluder distance from that viewpoint. Deep/depth peeled render targets may help, but that's not pretty from a performance standpoint.
 
I'm guessing they are talking about the excessive shadowing around the hand. And though I have no clue if it is the same or not, I have noticed similar effect in Crysis.
 
I'm guessing they are talking about the excessive shadowing around the hand. And though I have no clue if it is the same or not, I have noticed similar effect in Crysis.
In particular look at the shadowing on the box to the right.

When using just the depth buffer, and doing a screen space effect, it's impossible to get this correct. As ShootMyMonkey mentioned, you only have one Z buffer value. You don't know if the geometry behind it is solid all the way back or just paper thin. All you can do is guess.

In motion this effect could be a bit rough as well. AO shouldn't change with viewpoint, but SSAO does.
 
On the other hand, most gamers are pretty oblivious to a lot of artificats and quality issues. In general if the overall effect "looks good most of the time" is more important then "technically correct". We have games with shadows that go the wrong way, dissappear, have horribly aliasing, etc have reflections that omitt dynamic objects--and even are reflected the wrong way!

Techniques like this may not be perfect, but I am not convinced that some shortcomings are reasons to completely ditch the technique. "Flat" lighting is a serious issue in most games and their sample screenshot compare/contrast looks better, on the whole (imo).
 
I'm right with Joshua! ;)
The seconds screens are more "realistics" than the first and the "unpleasant artefact" are only visible for who who know where looking ;).
 
Yes, I'm talking about the errorneous AO the hand of the foreground character is casting on the torso fo the background character.

You'd have to use it as a "booster" for the static AO and other existing hacks like drop-shadow AO.

What is drop-shadow AO?
 
All I can say is that I have a very strong preference for the 'after' pictures, so I'm guessing that from my POV it's definitely worth it, all other factors not weighed in.
 
About the artifacts, in a lot of games there are enough post-process effects that they're blurred-out a lot. It's not to say it can't be improved, of course.

I like the effect a lot! Even pre-baked it looks really nice when you have a lot of props and geometry in a single room.
 
On the other hand, most gamers are pretty oblivious to a lot of artificats and quality issues.

Very true. Gears is full of crappy shadow filtering and bias artefacts, but I've never heard anyone mention them before. But to me, they're pretty disturbing, as I've had the job of fixing such shadows on our Warhammer movies... :)
 
I like the effect a lot! Even pre-baked it looks really nice when you have a lot of props and geometry in a single room.

Maybe this would be a good time to discuss: When is Dynamic AO needed above and beyond Precomputed AO?

Correct me if I am wrong:

I think most car games would be a good canidate for precomputed AO. Typically all 4 wheels are on the ground and as long as the sun/moon aren't moving in realtime you have a fixed general angle for the major light for general illumination.

On the other hand objects that move/rotate, deformation & change of position to world structural geometry, and a strong emphasis on dynamic lights (notably being the dominant light in many situations) could break precomputed AO? Would a soldier with an AO map created with his hands at his side, with the assumption of the sun at 12 o'clock would look different from dynamic AO on a soldier in the prone position and arms forward holding a rifle in the dark with the moon low on the skyline?

What scenarios work well with precomputed AO? Those with dynamic? What limitations are we looking at in the grand scheme of things of getting to GI?
 
What is drop-shadow AO?
It's basically an attenuation of ambient based on distance from certain points. I suppose there were some other posts where people referred to them as "contact shadows" or something similar. But for instance, you can have a collection of spheres that define falloff regions as a result of a character being somewhere, and if you darken ambient based on distance from the center of those spheres, you get a sort of cheap dynamic AO-like effect that is view independent, albeit limited in application.
 
I believe GG is using the term contact shadows and there is a discussion somewhere here about that. Good post SMM.
 
On the other hand, most gamers are pretty oblivious to a lot of artificats and quality issues.
Especially console gamers. When I see games on 360 with blurry textures and point it out they say "what?", they dont really get it or care as long as the motion blur is "cool". I didn't notice the shadow errors in Gears PC (just got a 360 for Mass Effect) but the lack of proper texture filtering in console games really bothers me. Isn't 4xAF pretty much free these days? Halo 3 still looks like plain trilinear, it can't take more than a minute to change the setting.
 
Halo 3 uses bilinear, and better filtering costs bandwidth.

It does use mip-mapping (else texture aliasing would bequite apparent IMHO) and if it does use only bi-linear filtering they must hide it pretty well (forcing the LOD transition to happen much much farther down in the distance) as I do not see clear mip-map boundaries Dreamcast-era style (no Simon, I did not mean to imply that the graphics chip could not do any better :p). Are you sure they are not using plain good ol' tr-linear filtering for textures ?
 
I'm sure I've seen plenty of mip-map bounderies that wouldn't be there if they actually were using trilinear.
 
Back
Top