Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Controlling baked AO

Discussion in 'Unity 5 Pre-order Beta' started by hausmaus, Jan 19, 2015.

  1. hausmaus

    hausmaus

    Joined:
    Dec 9, 2011
    Posts:
    105
    I am a little late to the party with Unity 5 and trying to catch up now. Adapting to the new workflow is coming along pretty well, except for the seemingly very basic task of controlling (or even finding) Enlighten's AO component.

    The "Ambient Occlusion" slider under "Baked GI" on the Lighting panel doesn't seem to do anything. Is that because everything is using Realtime GI and not any Baked maps? This is a little confusing because Enlighten does make use of per-system offline baked lightmaps in the runtime solver, right? Well in any event, this slider doesn't seem to have any effect, and I can't find anything comparable for realtime GI.

    I know with Beast you could bake only AO, and something similar would be fine here (baking only AO and mixing with the existing realtime GI I am getting... basically I just want some more definition in shadows!).

    I did write a per-vertex AO solver in olden times which I guess I might need to use in conjunction with a modified Standard Shader to get specific effects, but I wanted to see if there was a way to get the obvious panel controls working first.

    Thanks for any insight!
     
    one_one likes this.
  2. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Hi! AO should work for baked GI, can you post a screenshot of your settings in the Lighting panel in case it doesn't?

    We are considering allowing for baking AO in baked resolution and applying it to realtime GI, but we don't have an ETA on that, but probably later in 5.X.

    Meanwhile you can use a SSAO post effect to achieve fully dynamic AO in a nice resolution.
     
    Last edited: Jan 19, 2015
  3. Smulan

    Smulan

    Joined:
    Mar 15, 2013
    Posts:
    4
    I have a similar problem but in reverse, I want to remove AO from certain things. I'm working with a cartoony stylized look and I'm doing moss with this technique http://www.polycount.com/forum/showthread.php?t=130038

    This results in AO baked to the lower 3 planes but not the top one, making the bottom 3 fully occluded so when shadows are cast on them, the top layer with no AO glows in the dark.

    Quoting from: http://blogs.unity3d.com/2014/09/18/global-illumination-in-unity-5/
    "For each atlas there are five lightmaps containing direct lighting, indirect lighting, direct directionality, indirect directionality and AO respectively. After a bake these will be composited into lightmaps used in the game. In the Editor there are controls that specify how these lightmaps are composited. You can tweak these settings to adjust the look of the final output. For example the indirect lighting can be boosted easily. This only requires a compositing job, which takes seconds whereas before a rebake would be needed to do this."

    I may be blind, but I can't find this for the life of me? I can add a custom bake setting under Advanced Parameters but that only allows me to control the number of rays cast in the AO bake and AA quality. I could disable baking fully for the prop but that removes the other features of Enlighten that I want to keep using.
     
    Last edited: Jan 20, 2015
  4. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    Looks for the slider in the Lighting window -> Baked GI -> Ambient Occlusion.
     
  5. Smulan

    Smulan

    Joined:
    Mar 15, 2013
    Posts:
    4
    Well my issue ties in with the original post, that slider does nothing visually that I can see. In addition this control is globally for the scene where I want to be able to override the AO on certain specific prop cases, i.e. under the Object tab in Lighting window, not Scene tab.

    One work around I could see is setting the number of cast AO rays to 0 in Advanced Parameters, hence not considering it in the AO bake, but the lowest value able to be set is 16 rays.
     
  6. KEngelstoft

    KEngelstoft

    Unity Technologies

    Joined:
    Aug 13, 2013
    Posts:
    1,366
    If you want maximum quality baked AO, enable Final Gather. Also try adding a Lightmap Parameters to your baked objects and adjust Baked AO -> Quality, Baked AO -> AA Samples and Baked GI -> Blur Radius.