Improved ambient occlusion

Fudo_StyleFudo_Style Join Date: 2002-12-31 Member: 11659Members
edited April 2013 in Ideas and Suggestions
I've noticed the current ambient occlusion technique being used in NS2 results in lots of artifacts, especially in the distance. I would describe the affect as a "shimmering" or a checker-board darkening of ground in the distance. Back during the holidays this was especially obvious on the snow on the ground in the ready room. Most ground textures found within NS2 are pretty dark which hides the affect to a degree. Any bright ground texture makes this extremely obvious though.

I'm not sure which technique UW is using now, but im pretty sure the horizon-based AO used in other games doesn't suffer from this.

I'll try to capture some pictures of this later today.

Please devs, offer different AO options!

Comments

  • Fudo_StyleFudo_Style Join Date: 2002-12-31 Member: 11659Members
    edited April 2013
    To get some conversation going, this picture sort of shows what I'm talking about. This is NOT from NS2, its just an example of a naive AO implementation.

    As you can see, there are weird stripes and checkerboarding from this version of SSAO. The artifacts in NS2 don't appear at such a high frequency though.

    AO4blur3.png
  • Fudo_StyleFudo_Style Join Date: 2002-12-31 Member: 11659Members
    Searching for "ambient occlusion artifacts" on google, quickly brought me back to this very forum! Small world!

    It looks like HeatSurge noticed this as well, but got no response. He described the effect as "ripples" which is very accurate.

    Other post
  • KamamuraKamamura Join Date: 2013-03-06 Member: 183736Members, Reinforced - Gold
    After few initial days of playing, I have turned ambient occlusion off, never to return. While it adds moodiness to the game, it also tires my eyes, and can contribute to FPS drops in messy fights. I mostly have okay ~60FPS, but still, sudden burst of choppiness can be quickly fatal.
  • Fudo_StyleFudo_Style Join Date: 2002-12-31 Member: 11659Members
    Another example of the type of "noise" I'm seeing:

    ambient_samples.jpg

    They ambient shadows look all speckled. UW might just need to guassian blur a bit more, I'm not sure.
  • HowserHowser UK Join Date: 2010-02-08 Member: 70488Members, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow, Subnautica Playtester, Retired Community Developer
    The Teapot is almost certainly not a real-time render, its commonly used in 3d max to test render set-ups. It'll be some ray traced method and provides the kind of effect you get when AO is baked down.
    Here's a good video on explaining quickly how screen space AO works for anyone who's interested, I've not a spark related one.
    The noise actually makes the effect much more realistic, I believe a lot of engines actually use a noisey overlay for their AO to give it a more natural look. Super smooth AO just looks odd. While you do get artifacts and the effect could probably be improved I believe Its actually a decent implementation of the effect and it improves the visuals of the levels massively.
  • KhazeKhaze Join Date: 2006-12-12 Member: 59031Members
    I actually disabled AO today and I can't for the life of me see the difference. It's obvious when you cycle through the setting and watch the game change, but after setting it and forgetting it... I can't notice it's off? And my FPS got a nice boost, not that I needed it, though.
  • Fudo_StyleFudo_Style Join Date: 2002-12-31 Member: 11659Members
    edited April 2013
    Howser wrote: »
    The Teapot is almost certainly not a real-time render, its commonly used in 3d max to test render set-ups. It'll be some ray traced method and provides the kind of effect you get when AO is baked down.

    Theres no reason it couldn't be real-time. A very common openGL library comes with a teapot-drawing routine. I've used it many times.
    Howser wrote: »
    The noise actually makes the effect much more realistic, I believe a lot of engines actually use a noisey overlay for their AO to give it a more natural look. Super smooth AO just looks odd. While you do get artifacts and the effect could probably be improved I believe Its actually a decent implementation of the effect and it improves the visuals of the levels massively.

    Incorrect. You'll only see noise in naive implementations. In fact ALL (even going all the way back to crysis' SSAO) versions of AO go out of their way to avoid noise! They either 1.) increase the number of texture samples taken 2.) Up the amount of post processing (guassian blurring)

    Its clear that NS2's AO is doing some guassian blurring, so they're already trying to avoid noise.

    Heres some good AO:

    lobby01_5F00_ambient_5F00_occlusion_5F00_edges.jpg_2D00_500x400.jpg

    No noise.




  • Kouji_SanKouji_San Sr. Hινε Uρкεερεг - EUPT Deputy The Netherlands Join Date: 2003-05-13 Member: 16271Members, NS2 Playtester, Squad Five Blue
    Khaze wrote: »
    I actually disabled AO today and I can't for the life of me see the difference. It's obvious when you cycle through the setting and watch the game change, but after setting it and forgetting it... I can't notice it's off? And my FPS got a nice boost, not that I needed it, though.
    I looks mostly like a contrasty thing that isn't obvious at a first glance, unless you change it and see the difference. However, I play with it off in any case. It eat up way to much FPS for what it does.
  • Fudo_StyleFudo_Style Join Date: 2002-12-31 Member: 11659Members
    I was wrong. Some techniques do add jitter or noise, such as the angle-based AO which NS2 uses.

    I did a little more research and I've pin-pointed exactly what bothers me about this implementation. There's no spatial consistency. When you look at ambient shadows and move your view around, you actually SEE the shadow moving around in lockstep with your mouse. This is exactly what gives everything a ripply look.

    Its as if there's a screen-sized shroud (noiseTexture) placed over your whole view, and its fixed. So when you move around you see the shadows moving predictably and since its not random, it catches the eye.

    I imagine a a higher resolution noise texture would resolve this somewhat.


  • HowserHowser UK Join Date: 2010-02-08 Member: 70488Members, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow, Subnautica Playtester, Retired Community Developer
    edited April 2013
    I think a lot of this comes down to personal preference. The point I was trying to make is that I personally like the effect, using ssao is never going to be perfect but its cheap and cheerful. If you don't like it turn it off, I can't see it getting changed anytime soon.
    The only real alternative is source engine style baked AO, and as someone who's suffered mapping for the source engine. No thanks.
    The render of a living room- bare of all texture or fine detail isn't really representative of how AO looks ingame, I'm not saying its better either way. I can't recall which dev blog I was reading where they added a noise mask to their AO to stop stuff looking all plastic. I thought it was overgrowth but that info wasn't stated in a video. I Definitely saw one and I'd agree it was an improvement, it just gave the image a bit more grit.

    I know my 3d max tea pots! :P
Sign In or Register to comment.