Search Unity

[FREE] Introducing Amplify Occlusion 2 – Ground Truth Ambient Occlusion, up to 2X faster!

Discussion in 'Assets and Asset Store' started by Amplify_Ricardo, Apr 21, 2016.

  1. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    There's definitely something going on there but I'm not entirely sure what's causing it. The only way to be sure would be to examine a sample. If the problem is caused by that you should be able to replicate it in a similar setting instead of the full project.

    Occlusion is applied at a specific stage regardless of image effect order, I'm afraid that's a fixed requirement.(not exclusive to our solution)

    Looking forward to your reply.
     
  2. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    Hi,

    I'm having an issue with Amplify Occlusion 2.0.3 in multi-pass stereo VR: the occlusion maps are displaced for both eyes (unity 2017.4f3). This issue does not surface in single-pass (making this the first asset for me that works in single-pass stereo but not multi-pass). The issue is evident in the demo-scene.

    What am I doing wrong?
     
  3. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hello,

    That's an odd one, what's your target platform?

    Thanks!
     
  4. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    Windows 10, 64 bit
     
  5. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Are you using any specific VR framework?
     
  6. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    Yes - Steam VR v 1.2.2

    Thanks for looking into this.
     
  7. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    No problem, happy to help.

    Default Camera Rig?

    Any specific reason you didn't upgrade your Steam VR plugin?

    Thanks!
     
  8. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    I suppose you might have tested this but is the problem present without the Steam plugin?

    We just need to be sure before we escalate the ticket to one of out developers.

    Thanks!
     
  9. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    We didn't upgrade past 1.2.2 because of incompatibilities with the Mac Version; Version 2 it too new for us to risk trying it in the build. I'll see if I can re-produce the issue on a clean Project. But the issue surfaces with the Default camera rig (actually, it appears even without deploing the rig prefab, it also appears in the demo Scene using the main cam directly.

    Steam VR is integral to the Project (it provides all tracking) so we can't take it out easily.
     
  10. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    We'll see what we can do, hopefully the issue is also present in version 2.

    Could be a Mac related issue if it's present without the rig.

    Thanks!
     
    Last edited: Sep 27, 2018
  11. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389


    Now with Multiple Instances Per-camera!

    Hello everyone,

    We're happy to announce a new update for Amplify Occlusion 2. Now with support for multiple AO instances per-camera, improved temporal filtering and reduced ghosting, among other tweaks and fixes.

    SRP support is right around the corner!

    Featuring
    • Improved temporal filtering stability and reduced ghosting
    • Support for multiple AO instances on the same camera
    • Fixed temporal filtering bug in Multi-pass VR
    • Fixed visual artifact while applying occlusion in non-HDR deferred
    • Fixed editor window bug after pausing or stopping a game
    • Fixed warning messages issues in Editor mode

    Thank you for your support!

    Amplify Occlusion 2.0.4 - Asset Store Page
     
  12. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    Hello, with the new version (2.0.4) when Blur and Temporal filter are disabled, occlusions have a more glitchy texture compared to older versions.
    We have better performance when temporal filter and blur are disabled. So for a graphics preset we were disabling both temporal and blur, but now It's not possible in the new version and I have to enable blur to workaround this glitch.

    I added an image showing the weird texture glitch. I added pink brushes myself to show areas it's most visible.
    Enabling blur with at least Radius value of 2 (almost) fixes this texturing.
    Such texturing glitch was visible in 2.0.3 but it definitely became a lot more visible in the latest version.

    Forward and HDR disabled.
    Unity 2017.4.11
     

    Attached Files:

  13. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    [Sorry, I'm an idiot - I resolved the issue 10 minutes after posting here.]
     
    Last edited: Oct 21, 2018
  14. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    It's funny how that works, isn't it? Somehow it gets easier to solve a problem sometimes after you've explained it to someone else.

    Anyway, in the future, consider leaving the post of the problem, and then edit to add the solution. Even if it is a problem with a silly cause, it's likely someone else will run into the same thing.
     
  15. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    The issue surfaced as a result from using both AO and Livenda's CTAA, which introduced strong ghosting in high-contrast VR (dual cam, forward setup) scenes (rocks & bushels of grass in a desert scene). They appeared after looking at one point for a few seconds, and then quickly moving the head in any direction. The ghosts decayed within 1/4 second, but were very noticeable, and were a result of the accumulating AO. Turning off the Temporal Filter in AO resolved the issue. The issue does not appear when CTAA is turned off, which leads me to believe that there is some interaction between them (temporal AO and temporal AA may antagonize each other).
     
  16. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, we really appreciate your feedback! Are you using the exact same settings/parameters in 2.0.4 that you were using in 2.0.3? Different sample count values or having downscale disabled might alter the pattern seen in your screenshot.

    The mentioned "glitch" is expected behavior with the Temporal Filter and Blur disabled, although it shouldn't have noticeable differences between both versions, could you share a side by side comparison screenshot of this, or even a sample?
    Have you tried tweaking the Fade to Intensity / Radius for performance gains, as it might help improve performance since you can force AO to be only calculated in the closest planes, not affecting distant ones?


    Hello, thank you for providing further insight on the problem you've encountered, I'll be sure to pass this information along to the developer although I believe that this interference between both assets is to be expected.
     
  17. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    Hello, I just checked reverting amplify occlusion to 2.0.3 and I didn't change any settings. I see that issue is mostly gone. Texturing is almost invisible so that most players wouldn't mind.

    It's very hard for me to compare it with reverting and updating and so on, so I leave you that part.
    Downsampling is enabled. I think when downsampling is enabled in both versions, the glitch is about 10 times more intense with 2.0.4.
    I don't remember how it looked with downsampling disabled but you can try that easily.

    The glitch is visible with Blacksmith sample scene. Sample count or other stuff doesn't really matter. You can ramp up Power Exponent so it's easy to see the difference between versions. Enabling downsample scales up the glitch texture.

    You said Fading improves performance, but are you certain that it does? That's not documented in the manual, and I remember testing it a long time ago with no improvement in performance.
    I just made a quick test in the editor and it seems like it actually costs to enable fading, even when I set a fade length of 0.01 where the effect is invisible everywhere.
    I attached GPU profiler images with fade enabled and disabled.
     

    Attached Files:

  18. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    No worries, we ran a few tests on our side and we believe that the issue you've reported when updating was due to an unlisted bug that has been fixed on 2.0.4, that caused Blur to always enabled even if toggled off. Since in the latest version Blur is now working as expected, it makes sense that you've noticed such a difference in the effect with equal settings.

    Fading might not provide a considerable increase in every case, but it shouldn't be deteriorating performance, please make sure that your 'Fade To Intensity' is set to 0.

    Nevertheless, we'll run some further tests, as performance / optimization is one of our main focuses.
    Debugging user samples is always extremely helpful as well, so feel free to share one with us through support@amplify.pt if you suspect you might have stumbled upon an issue.
     
  19. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    Thanks for your response, you were right, when downsampling was enabled with version 2.0.3 it also enables blur by itself.

    Yes, Fade to intensity is always 0. I also made power exponent 0 too for that profiler shots.
    I made some profiler tests again, and there is definitely something wrong with fading and performance.
    Changing "Fade to intensity" and "power exponent" has no effect on performance. It's the same for 0 or 1.

    Fade Start is always 0, but when I set Fade Lengh to small values like 1 or 10, performance is worse compared to setting it to 100 or even 500.
    When I set it to smaller numbers, occlusion effect is either invisible or only affects the closest object(s). But it's unreasonable that higher fade distance gives better performance.

    Even when fade is enabled but fadeToPowerExponent and FadeToIntensity are 0, "Fade Radius" affects the performance considerably. When Fade Radius is set to 0, fade actually starts to save performance up to fade distance of around 10 meters.

    I simplified my setup when testing these, so this should be reproducible with your sample scene.
    I tested these with 4k resolution.
     
  20. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Thank you for providing additional details, I've forwarded this information to the developer and we'll get back to you as soon as we have any further developments, apologies for the inconvenience.
     
  21. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Unfortunately, we've been unable to replicate this issue on our side, in the worst cases performance had negligible improvements, but in none of our tests it was worse.

    In order to help us debugging this, could you share a sample so that we use the same data as you?
    Also, what is your GPU?
     
  22. gasanoff

    gasanoff

    Joined:
    Jan 27, 2016
    Posts:
    1
    //I've been searching this thread if AO2 supports HDRP / Unity 2018.2-3 - found nothing so far.

    Does AO2 work with Unity 2018.3 HDRP?
    (adding the script to the camera has no effect, is it okay?)
     
  23. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello! We're still working on the SRP support for AO2 and, although we can't offer any ETA, it should be coming soon, so please stay tuned to this thread as we'll be sure to post any updates here.
     
  24. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    Hi there,
    I'm having a problem with Amplify Occlusion not respecting regular fog. (I'm in forward rendering)
    The PostProcess Stack v2 occlusion correctly supports regular unity fog, but not Amplify Occlusion.
    (I'm talking about the regular fog you enable in the lighting panel, not the screen space effect)
    I really need the regular non screen space effect to work.

    With the PostProcess Stack v2 ambient occlusion effect, the occlusion correctly fades with the fog:

    Amplify Occlusion just ignores the fog:


    I can emulate manually this using the Distance Fade option in AO, but it only works with linear fog (no exponential o squared support) and it doesn't support negative values for the start distance.
    This is a problem to match it with the regular fog settings. (a negative start distance is useful for increasing the fog presence on close distances. It's needed in high humidity ambiences.)


    Edit:
    Ok, so I have hacked support for linear fog in Amplify Occlusion modifying those lines in AmplifyOcclusionBase.cs (starting at line 1430):
    Code (CSharp):
    1.        // Distance Fade
    2.        if (RenderSettings.fog)// if( FadeEnabled == true )
    3.        {
    4.            FadeStart = RenderSettings.fogStartDistance;// Mathf.Max( 0f, FadeStart );
    5.            FadeLength = RenderSettings.fogEndDistance - FadeStart;//Mathf.Max( 0.01f, FadeLength );
    6.            FadeToTint = RenderSettings.fogColor;
    This updates AO when fog parameters change automatically and supports negative starting distances. (but it disables manual adjustment of the fade)
    Now it behaves just as well as Unity's Ambient Occlusion with regular fog except it only supports linear fog.
    Good enough for me.
    weeee! :p

    You should support it by default though :)
     
    Last edited: Nov 9, 2018
    StarTwinkle likes this.
  25. Meceka

    Meceka

    Joined:
    Dec 23, 2013
    Posts:
    423
    Hello,
    I believe my profiler images were from the older version (probably 2.0.3) and I couldn't recreate the performance loss due to enabling fading with the newer version.
    However there is another issue, have you tested a Nintendo Swtch build with the latest version? I tried various options but it just doesn't work for me. Looks perfectly fine in editor and but for the device it looks very glitchy at close distance to camera (Almost completely occluded, full black). I believe you can recreate this very easily as it always happens no matter what option I change.
    Rendering on Forward, Gamma color space. HDR disabled, Unity 2017.4.11
     
  26. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, thank you for taking the time to report this issue and for the shared workaround, I'll forward this information to the developer for further investigation. Although I'm not entirely sure in this regard, the ComputeDistanceFade function found in the common.cginc might lead to a solution for this, but we'll be sure to share any developments as soon as we're able to tackle this.


    Hello, we are aware of a few issues on the Switch with Temporal Filtering which we're still looking into.
    We appreciate the details shared, should you be able to also share a screenshot and a simple sample it will undoubtedly speed up our resolve.
     
  27. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    I'm curious about the implementation (where you will feed it?). Will it be in postprocessing stack, or did Unity expose more callbacks in HDRP for this to work in general, or do you require small modifications to HDRP for it to run?

    All mentioned things are fine for me, I've been postponing the purchase due to lack of SRP support but will get it asap once the HDRP support is in.
     
  28. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    hello,

    Our current HD implementation(not public) uses the Post Processing Stack, it actually needed quite a few adjustments. More about this at a later stage, we'll definitely post additional information as soon as it's ready.

    Thanks!
     
    atomicjoe and rz_0lento like this.
  29. tspk91

    tspk91

    Joined:
    Nov 19, 2014
    Posts:
    131
    Hi, I have been trying to use the plugin for a space sim, but when things move it smears like crazy. Doesnt it use unity's MotionVectors to correct for object motion? When the ship moves, it "drags" the AO on the ship around too (as if the AO was attached to the world). As it is right now, its unusable in my project.
     
  30. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hey there, could you share a screenshot of your current AO settings and the target platform? Thanks!
     
    Last edited: Nov 14, 2018
  31. hasseyg

    hasseyg

    Joined:
    Nov 16, 2013
    Posts:
    81
    Hi, I have a problem. I am trying to use this asset in an iOS project using an iphone 6 running iOS 12.1. The problem is the game runs fine without this asset enabled, but when I enable it and run the app, it seems as if it is stuck on the first frame rendered by the camera. The canvas ui elements are the only thing that updates, but not the game camera. I have disabled auto graphics api and only added Metal and GLES3.

    Please could you help. thanks
     
  32. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, do you get any errors or warnings in the console and can you replicate the issue in a new, simple project?

    Also, what Unity version are you currently on?
     
  33. hasseyg

    hasseyg

    Joined:
    Nov 16, 2013
    Posts:
    81
    Hi, I don't get any related warnings, just unrelated ones. I created a new empty project to test and I got the same result. I have posted the screenshots below. The first one is of the project window. The second is of the game view and the third is of the screenshot on the device. As you can see from the device screenshot the transparent black layer is from the splash screen as the unity logo is visible. I am using 2018.2.15f1
     
  34. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Thank you for taking the time to provide additional information, we're going to investigate this issue and will get back in touch as soon as we have any developments.
     
    atomicjoe likes this.
  35. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    Post Processing Stack is the way to go for sure!
    It's excellent because it automates blending between different game zones.
    Very excited for this, but PLEASE, keep it compatible with the legacy renderer. (the Scriptable Render Pipeline is STILL in active development and we can't count on it for releases.)
     
  36. hasseyg

    hasseyg

    Joined:
    Nov 16, 2013
    Posts:
    81
    Ok, thanks. I would just like to add that in my game project, it is not only the canvas ui elements that are updating, but also particle effects. This is because in my first scene i have a rotating camera and I can see the particle effect moving around, showing that the camera is in fact moving and the game has not crashed, but anything with a mesh renderer is not being updated at all and is stuck in the same perspective as it was on the first frame upon starting the scene.

    thanks
     
  37. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Definitely, it's in our plans to maintain support for the legacy renderer!


    Thanks for sharing this additional information, I shall add it to your support ticket for the developer to consider.
     
  38. NoobDoAAA

    NoobDoAAA

    Joined:
    May 7, 2018
    Posts:
    11
    Amplify_Borba likes this.
  39. tspk91

    tspk91

    Joined:
    Nov 19, 2014
    Posts:
    131
    I tried to reproduce the setting but it stopped doing that, so it must have been some kind of interference with other postprocessing effects. Still, occlusion does not extend to large distances from the camera, is that intentional? With unity postpro stack you can see marked occlusion effect in objects close to the camera and far away too (like dozens of km).
     
  40. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    It should depend on the settings you're currently using on the AO component, have you tried adjusting the Distance Fade parameters?
     
  41. tspk91

    tspk91

    Joined:
    Nov 19, 2014
    Posts:
    131
    I had fade disabled, so it should have no effect. Could it be that you use actual world units as radius, instead of screen space units? That would explain the need for bigger radius as soon as something is not near the camera, and the fact that a radius of 32 has no effect on objects kilometers away. If this is so, I believe that for aesthetic purposes the effect would benefit from a screen space radius mode.
     
  42. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    350
    Is there some way to disable the following warning?

    "[AmplifyOcclusion] Deferred Method requires a Deferred Shading path. Switching to Post Effect Method."

    It constantly appears when I set the Scene view camera to orthographic.
     
  43. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    The Radius parameter is in World Space. Also, with Distance Fade disabled, the AO still has a threshold that depends on the Camera's Clipping Planes, so it's possible that the effect is not being shown on objects that are outside of this scope, which is an expected behavior.


    Hello, since we do include the source files, you may comment out the warning by double clicking it in the console, so that it opens the script and points to the line that throws the warning.

    Here's an example of a commented console warning:

    //UnityEngine.Debug.LogWarning( "[AmplifyOcclusion] GBuffer Normals only available in Camera Deferred Shading mode. Switched to Camera source." );
     
  44. FreeReignPublishing

    FreeReignPublishing

    Joined:
    Oct 22, 2017
    Posts:
    52
    Could you use this for 2d?
     
  45. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    I'm afraid not, Occlusion effects of this type are not intended for 2d Sprites.

    Thanks!
     
  46. Hazneliel

    Hazneliel

    Joined:
    Nov 14, 2013
    Posts:
    305
    Hello
    What are the advantages of using this asset versus Unity's Post Processing Stack AO?
    Thanks
     
  47. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hey there, thank you for your interest!

    In short, AO2 provides better quality and accuracy while also offering superior performance and scalabilty.
    We've also got your back as far as support is concerned, we're very active in all our assets' forums and will actively help you troubleshoot any issues that you might encounter.

    You can read more AO in its Store Page, and feel free to also check out the reviews, as they can speak great lengths for an asset's worth.

    Don't hesitate to let us know if you have any further questions!
     
    Hazneliel likes this.
  48. DrInternet

    DrInternet

    Joined:
    Apr 6, 2014
    Posts:
    106
    Hello,

    do you plan to add color bleed effect to Amplify Occlusion?

    Also: is trial mentioned in YT videos still available? Link is dead.
     
  49. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hello,

    Yes, color bleed is planned.

    Unfortunately, the trial was for version 1.x, which is no longer available, we don't currently provide one for 2.x.

    Thanks!
     
  50. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
    Thanks for the HDRP support :)

    There are few issues with it though, if you just apply Amplify Occlusion in Unity's HD Template and hit play, you'll notice that the safety helmets bright spot gets burnt to black while it's on the border of the screen (like it is on initial view on the template when you hit play). I isolated this to only be an issue when depth of field is enabled. This also explains why the black spot isn't visible in the debug view, it's only there when you actually apply the PP.

    The other issue I have is that AO seems to be applied everywhere and there is no control for reducing the AO strength in lit areas. For example PP stacks own AO has slider for direct lighting strength. Will you consider adding a control for it?

    Also if you rescale the game view while in editor (which btw happens always if you pause the game in editor while you have "Maximize On Play" selected for the game view), AO effect gets flipped on the Y axis.
     
    Last edited: Dec 1, 2018