Ambient Occlusion

WombatLOLWombatLOL Join Date: 2011-11-30 Member: 136042Members, Reinforced - Shadow
I don't know if the game uses it... But is there anyway to turn it off via console? :3

Comments

  • DghelneshiDghelneshi Aims to surpass Fana in post edits. Join Date: 2011-11-01 Member: 130634Members, Squad Five Blue, Reinforced - Shadow
    <!--quoteo(post=1887779:date=Dec 1 2011, 12:29 PM:name=WombatLOL)--><div class='quotetop'>QUOTE (WombatLOL @ Dec 1 2011, 12:29 PM) <a href="index.php?act=findpost&pid=1887779"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I don't know if the game uses it... But is there anyway to turn it off via console? :3<!--QuoteEnd--></div><!--QuoteEEnd-->
    must... resist... asking...

    There isn't any kind of AO in this game.
  • Racer1Racer1 Join Date: 2002-11-22 Member: 9615Members
    I've wondered why occlusion couldn't automatically occur based on a lack of (back) texture on a wall. For instance, say you have regular wall that the player can see, behind which is empty space, behind which is another room. If the back-side of that wall has no texture, I would think the engine could automatically occlude based on that fact. Is it an issue of too many faces to occlude with, causing performance problems?
  • DghelneshiDghelneshi Aims to surpass Fana in post edits. Join Date: 2011-11-01 Member: 130634Members, Squad Five Blue, Reinforced - Shadow
    edited December 2011
    <!--quoteo(post=1887801:date=Dec 1 2011, 04:43 PM:name=Racer1)--><div class='quotetop'>QUOTE (Racer1 @ Dec 1 2011, 04:43 PM) <a href="index.php?act=findpost&pid=1887801"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I've wondered why occlusion couldn't automatically occur based on a lack of (back) texture on a wall. For instance, say you have regular wall that the player can see, behind which is empty space, behind which is another room. If the back-side of that wall has no texture, I would think the engine could automatically occlude based on that fact. Is it an issue of too many faces to occlude with, causing performance problems?<!--QuoteEnd--></div><!--QuoteEEnd-->

    You are talking about something completely different. <a href="http://en.wikipedia.org/wiki/Ambient_Occlusion" target="_blank">Ambient Occlusion</a> is a shading/lighting method. What you're talking about is <a href="http://en.wikipedia.org/wiki/Hidden_surface_determination" target="_blank">Occlusion Culling</a>.

    To probably answer your question:
    [incoming dangerous half knowledge] Checking whether the back-side has no texture is redundant. If you've already confirmed that there's a wall, you will cull anything behind it anyway. It doesn't matter whether it has a back-side or not or whether there is empty space behind it or not.
  • zexzex Join Date: 2009-10-07 Member: 68978Members
    don't some video cards add SSAO to games automatically? or am i just thinking of Source?
  • DghelneshiDghelneshi Aims to surpass Fana in post edits. Join Date: 2011-11-01 Member: 130634Members, Squad Five Blue, Reinforced - Shadow
    <!--quoteo(post=1887810:date=Dec 1 2011, 09:17 PM:name=zex)--><div class='quotetop'>QUOTE (zex @ Dec 1 2011, 09:17 PM) <a href="index.php?act=findpost&pid=1887810"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->don't some video cards add SSAO to games automatically? or am i just thinking of Source?<!--QuoteEnd--></div><!--QuoteEEnd-->
    AFAIK you can force SSAO if you have an NVidia card, should work in most games. I have yet to see an AO implementation that doesn't produce strange "glowing" effects around characters though. :/
  • Soylent_greenSoylent_green Join Date: 2002-12-20 Member: 11220Members, Reinforced - Shadow
    edited December 2011
    <!--quoteo(post=1887825:date=Dec 1 2011, 05:52 PM:name=Dghelneshi)--><div class='quotetop'>QUOTE (Dghelneshi @ Dec 1 2011, 05:52 PM) <a href="index.php?act=findpost&pid=1887825"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I have yet to see an AO implementation that doesn't produce strange "glowing" effects around characters though. :/<!--QuoteEnd--></div><!--QuoteEEnd-->

    AO can be implemented/faked in many ways; you're talking about SSAO.

    The traditional way to create the appearance of AO and normal mapping, which has been done since texturing first became possible, is to simply paint it into the texture artwork. This is free and was an essential part of good texture work. If you start from a photograph of an object under proper lighting conditions you get this for free. It is actually difficult and annoying to get rid off if in photographs if you DON'T want it and don't have good control over the lighting conditions(e.g. if you're using natural light; you'd try your best and use an overcast sky, but that's still somewhat directional and still fakes AO).

    A more refined version of is to make a high detail mesh that you can 'bake' normals and AO from. Baking the AO is done by firing lots of rays for each texel and seeing what fraction of them hït the object itself as opposed to hitting the sky. This creates a texture which you can either use to modulate the ambient lighting term or that you can bake into the colour texture(in which case it also modulates the directional lighting term, which is incorrect but not terribly noticable most of the time).

    SSAO is comparatively cheap. It is just a post process in "screen-space". It just looks at the depth buffer and darkens indentations.
  • DghelneshiDghelneshi Aims to surpass Fana in post edits. Join Date: 2011-11-01 Member: 130634Members, Squad Five Blue, Reinforced - Shadow
    I have seen the same thing happening in BF BC2, which is using the raycasting technique you described.
    The problem is probably the resolution of the effect, since it makes a blob shadow for every sample. That blob shadow is often bigger than the object, introducing a black "glowing" effect.
  • Soylent_greenSoylent_green Join Date: 2002-12-20 Member: 11220Members, Reinforced - Shadow
    <!--quoteo(post=1887961:date=Dec 2 2011, 08:43 AM:name=Dghelneshi)--><div class='quotetop'>QUOTE (Dghelneshi @ Dec 2 2011, 08:43 AM) <a href="index.php?act=findpost&pid=1887961"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I have seen the same thing happening in BF BC2, which is using the raycasting technique you described.<!--QuoteEnd--></div><!--QuoteEEnd-->

    It might be using a raycasting technique, as I said, there are many ways to do this; but it's not what I was refering to.

    <!--quoteo(post=1887961:date=Dec 2 2011, 08:43 AM:name=Dghelneshi)--><div class='quotetop'>QUOTE (Dghelneshi @ Dec 2 2011, 08:43 AM) <a href="index.php?act=findpost&pid=1887961"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->The problem is probably the resolution of the effect, since it makes a blob shadow for every sample.<!--QuoteEnd--></div><!--QuoteEEnd-->

    The method I was talking about is offline, casts perhaps a thousand rays per texel and generates an AO map. It takes somewhere between an hour(blender, running on CPU) and a couple of minutes(ZBRUSH; not entirely sure if it's the same algorithm). It does not produce "blob shadows" that extend beyond the object; it produces a texture, which is used to modulate the ambient lighting of each pixel belonging to the object and nothing else. It looks pretty good most of the time, but it knows nothing of other objects(i.e. if two objects are close to each other, there is no additional AO caused by other object).
  • DghelneshiDghelneshi Aims to surpass Fana in post edits. Join Date: 2011-11-01 Member: 130634Members, Squad Five Blue, Reinforced - Shadow
    I was talking about real-time implementation in games.
Sign In or Register to comment.