Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at id.unity.com during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.


    Read our full announcement for more information and let us know if you have any questions.

Official Adaptive Probe Volumes (APVs) experimental release for HDRP in 2021.2

Discussion in 'Graphics Experimental Previews' started by Matjio, Feb 11, 2022.

  1. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
    Also, since I saw mentions of the fog, it will still be there, but keep in mind that the currently shipped version has a problem where it applies ambient probe (what the sky produces) on top of APV, instead of having APV replacing it, so you get some double contribution or areas more bright that it should be.

    This is being fixed right now.
     
    PutridEx and Reanimate_L like this.
  2. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    oh i manage to clean those ringing issue by increase the dilation actually.
    upload_2022-3-16_0-35-34.png
    Disabling Dilation and Offset bring back the ringing issue
    upload_2022-3-16_0-37-39.png
     
  3. AntonioModer

    AntonioModer

    Joined:
    Jul 29, 2014
    Posts:
    66
    I try change bias, but it still leaking.
    And this leaking in dark room:
    Снимок экрана 2022-03-08 165223.png
     
  4. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
    Is it dark outside of the room too? What are your biases settings? (In probe volume options volume component -- volume component here is referencing the normal volume systems not Probe Volume -- essentially step 4 in the picture below)
     
    AntonioModer likes this.
  5. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    @francescoc_unity I notice there's lot of improvement on APV commit, are those going to 21.2 or 22.1?
    Also since you mention that the state blending are in master already any chance we can get a sample scenes for it? would like to know how the workflow and required scripts for state blending
     
    Last edited: Mar 19, 2022
  6. AntonioModer

    AntonioModer

    Joined:
    Jul 29, 2014
    Posts:
    66
    Room outside is lighted. Oh, bias settings in Volume is default, later i try change it.
     
    Last edited: Mar 20, 2022
  7. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
    We won't be backporting APV changes yet, some bits can end up in 22.1, but most changes will see light in 22.2.

    There is not a sample scene yet, however one of our automated test use an, admittedly very toy, example -- you can check in https://github.com/Unity-Technologi.../HDRP_RuntimeTests/Assets/Scenes/007-BasicAPV

    We will have more info coming as the feature reaches a state of more maturity.


    Yeah so definitively a leaking issue :) Make sure to play with both biases (view and normal) and sampling noise too.
     
    Reanimate_L likes this.
  8. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    I take it that sample are not compatible with 22.1 or at least the current beta release?
     
  9. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,536
    This is quite handy. Will something like this come for reflection probes as well?
     
  10. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
    I am not entirely sure, APV does not depend explicitly on things from the Unity binary, but other parts of master might, causing the thing not to be supported. You can try, but no guarantees :) Will definitively work with latest 22.2 alphas though.
     
    Last edited: Mar 21, 2022
  11. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
    Also since it got announced, here is a peek at APV in action in the incredible Enemies demo our demo team cooked up that uses no lightmaps but only APV (+ SSGI for smaller details, but with the fallback on APV)

     
    jiraphatK, Luemus, NotaNaN and 13 others like this.
  12. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    937
    What would be the appropriate settings in Lighting / Scene tab and on Mesh Renderer to only use APV and no lightmaps for static geometry?
     
    Skokon and JamesArndt like this.
  13. HitsuSan

    HitsuSan

    Joined:
    Sep 28, 2014
    Posts:
    158
    For our heavily procedurally stitched room system in our game we had to decouple the old LightProbes system from the Scene and save the generated sh9 data for each probe in each room prefab. Once the level is generated the lightprobe data for each room is loaded back and stitched together in a new tetrahedral network we had to generate ourselves and that we custom feed to each dynamic object on the scene....

    It was a nightmare to make and it's getting outdated by the minute T_T

    Would you please add what I just described to this new system so we can use it for procedural games with the new SSGI? Please? I'm begging you...
     
    ftejada and ontrigger like this.
  14. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Yeah i don't think it's compatible with 22.1 i'm having error on the script about ProbeReferenceVolume
     
  15. AntonioModer

    AntonioModer

    Joined:
    Jul 29, 2014
    Posts:
    66
    Change bias setting dont help.
    Снимок экрана 2022-03-22 143134.jpg
     
  16. LumaPxxx

    LumaPxxx

    Joined:
    Oct 3, 2010
    Posts:
    352
    Hi,is there something could change the project default setting that could set renderers using APVs instead lightmaps?
    i have to change every static prefab to receive lighting from lightprobes by hand.
     
    PutridEx likes this.
  17. valarnur

    valarnur

    Joined:
    Apr 7, 2019
    Posts:
    443
    Is 8GB GPU enough for baking with APV?
     
  18. AydinDeveloper

    AydinDeveloper

    Joined:
    Sep 8, 2017
    Posts:
    95
    Dark areas appear when I bake with a progressive GPU. I am using 6900XT. Does this happen with Nvidia GPUs?

    also denoise filters have no effect on APV.
    upload_2022-3-23_18-58-30.png
     
  19. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
    Make sure to enable additional settings and play with the other settings too. Failing that, newer packages will come with some leaking prevention measures that could help.
     
  20. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
    Unfortunately not at the moment.

    Keep in mind, especially for the experimental release, we do not suggest replacing lightmaps completely. If it works for your project all the better, but probe volumes will come with problems that lightmaps won't have.
     
    LumaPxxx likes this.
  21. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
    We are aware that GPU lightmapper is producing not super stable results. I will follow up with the lightmapper team to add another pain point.
     
    JamesArndt and AydinDeveloper like this.
  22. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
  23. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
    Yes, we fixed the bug re: trees; it will likely end up in next release (though no guarantees depending on landing process, but in any case it should go through fairly soon).
     
  24. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    How about the terrain receive apv?
     
    TerraUnity and LumaPxxx like this.
  25. daneobyrd

    daneobyrd

    Joined:
    Mar 29, 2018
    Posts:
    101
    Are there plans to incorporate illumination-driven placement of light probes?
    See hyperlink for repo with Unity implementation.

    I can imagine there being benefits to blending between different light probe positions in addition to blending between bakes.


     
    Last edited: Mar 25, 2022
    OBiwer, NotaNaN, TerraUnity and 4 others like this.
  26. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    12,015
    So, I haven't tried this, but from the info here it seems like a direct replacement for the current light probe system, with the same limitations it currently has, with 2 major improvements:

    1. A much easier workflow for placement and also hopefully more sophisticated placement (although from the screens I'm seeing, it's just a grid..? Which uhh, which isn't very sophisticated or efficient)
    2. Dynamic probe lit objects will look a whole lot better.

    Does this feel like a fair sum up? (As fair as it can be in 2 lines)

    But,

    Does this address in any form the long standing -and important for many users- issue of: light probe leaking through walls?

    Or is the solution once again to just murder the scene with a ton of probes which will naturally minimize, but not solve, the issue?
     
    Last edited: Mar 25, 2022
    NotaNaN and koirat like this.
  27. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,100
    Adaptive Probe Volumes is the new thing, it's time to slowly forget about the Light Probes.
     
    KRGraphics likes this.
  28. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    12,015
    And I will happily do that, unless of course the new system has most of the same shortcomings of the old system (which, from my admittedly shallow knowledge of APV, it seems like it does).
     
  29. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    It's a grid probably so the GPU can interpolate the probes per pixel. Sampling from an arbitrary point cloud is quite more resource intensive (which is why the old probe system does it per object).

    The only way to prevent light leaking with a grid-based probe system is to store visibility information along with the light information. The way people do it nowadays is to store a low resolution variance shadow map per probe. No idea if Unity is doing or planning that.
     
  30. valarnur

    valarnur

    Joined:
    Apr 7, 2019
    Posts:
    443
    @francescoc_unity, would it be possible to combine APV with RTXGI ? It seems that AVP is more like a lighmass importance volume where each probe point determine how light is calculated.
     
    Qleenie likes this.
  31. AydinDeveloper

    AydinDeveloper

    Joined:
    Sep 8, 2017
    Posts:
    95
    Added light probe option for terrain?
    upload_2022-3-26_18-14-5.png
     
  32. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
    Not yet, but we are tracking this.

    Not at the moment, also keep in mind that the positioning of light probes need to be uniform for APV to work.
    There is no current plan in driving placement by anything but geometry, though we don't exclude looking into more heuristics in the future.

    In the experimental version in 21.2 only biases.

    In 22.2 we added an extremely cheap (but therefore approximate) way of exploiting validity information of probe locations to reduce leaking and use some geometry info. We also expose a way to mark valid probes as invalid for the sake of occlusion.
    Keep in mind this is very approximate and won't be a silver bullet, but we noticed internally how it already helps a lot of cases while being essentially close to free in terms of runtime cost.

    Can see some images in the PRs: https://github.com/Unity-Technologies/Graphics/pull/6458 and https://github.com/Unity-Technologies/Graphics/pull/7017 .

    Alternatives like storing per-probe depth info (a-la DDGI) is going to provide better quality, but an extremely higher cost both in memory and runtime.
    We don't exclude we'll implement something like that in the future, but is not in the immediate plans as we don't want to severely limit the target platforms.

    In terms of placement:

    It is a hierarchical grid, closer to objects will have higher resolution and place lower density farther away.

    The runtime shading quality is just a different ballpark vs. legacy probes (per pixel lighting, volumetric fog support, improves SSGI, reflection probe normalization)
     
  33. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    12,015
    This sounds really interesting.
    May I suggest you include shots with probes of varying density in your marketing material and docs so that the "adaptiveness" of the probes is more prominent? All the shots I've seen that include APV look like this:


    And this looks like more of a brute force placement algorithm than anything "adaptive" (brute force may have been appropriate for "Enemies", but shots like these do fill me with a bit of dread when I consider using the feature for games).

    In any case, thanks for replying, I have a more positive outlook towards APV now.
     
    florianBrn and NotaNaN like this.
  34. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    937
    If I remember correctly, it was shown during the GDC stream, which should be still watchable on the Unitytech twitch channel. Probes are more sparse in open space, and more dense near geometry.
     
  35. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
    It looks by a very cursory test I just did that this is already the case?

    (Please ignore the ugly setup, but is whip up a super simple test)
    upload_2022-3-28_10-6-29.png


    Contribute to GI is still just light map, but we need to discuss internally with the lightmapper team.
     
  36. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    But the terrain still using lightmap for the indirect lighting isn't?
     
  37. LumaPxxx

    LumaPxxx

    Joined:
    Oct 3, 2010
    Posts:
    352
    Yea, if terrain could use APVs as indirect lighting source that would be great.
    i guess the coming feature "Probe blending for time of day scenarios" you guys mentioned doesn't support lightmaps, right?
    so if we want to do a time of day in a scene with terrain, this is a must have.
     
    PutridEx likes this.
  38. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Exactly this, if the terrain still locked on lightmap the APV blend feature wouldn't work well if terrain are used in the scene
     
  39. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
    In my example there I unchecked the contribute GI and the terrain receives now APV in the picture.

    Admittedly there is a mismatch with the rest and we're going to address it. I am raising the point internally.
     
    daneobyrd, Reanimate_L and LumaPxxx like this.
  40. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Ooh i see, gotcha. Thanks for the update
     
  41. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193

    The issues I had in mind were reported as fixed. Can you please file a bug if there is a big discrepancy with CPU lightmapper?
     
  42. Win3xploder

    Win3xploder

    Joined:
    Dec 5, 2014
    Posts:
    162
    Does this feature provide specular GI?
     
  43. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
    No, should be seen as a (superior) replacement for the legacy light probe system.
     
    daneobyrd and DEEnvironment like this.
  44. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    937
    @francescoc_unity In the current tech stream (at least in 2021.2.16) there is still a severe bug that the position of random GameObjects gets changed during baking; this only happens if I use Dilation Settings + Virtual Offset Settings. If I switch them off, all good.
     
  45. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
    We have not observed that. Can you please file a bug?

    Thank you
     
  46. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    937
    Not sure what would be the best way to file the report, as I cannot share my project (due to legal and size issues).
     
  47. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    937
    @francescoc_unity I did some testing and am now able to narrow down the issue: It only happens with Rigidbodies, and should be easy to be reproduced for you: Just add an Rigidbody with gravity, and some mass, place the Gameobject somewhere above the ground, so it can fall. It seems that the dilation stuff is simulating physics during its calculations, and with this moving Rigidbodies. Pretty severe, as it can corrupt a scene easily without being noticed.
     
  48. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
    Fixed this recently, hopefully it will make it through the next release, but if not it should be soon.

    Thank you.
    Dilation doesn't use Physics but virtual offset (unfortunately, it will change) does.

    I will look into it, thank you.
     
    Reanimate_L and Qleenie like this.
  49. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
    Found a fix for this, this will mean that temporarily while baking your rigidbodies not tagged as such will be marked as Kinematic temporarily. The previous state will be restored after baking is completed. The fix will hopefully arrive somewhat soon, but it all depends on the release process now.

    In the longer run, reliance of physics will go away but we don't have a precise timeframe for that.
     
    Qleenie likes this.
  50. Qleenie

    Qleenie

    Joined:
    Jan 27, 2019
    Posts:
    937
    this sounds like a viable solution and should prevent the changes of GOs. Any chance this will also end up in 2021.2.x tech stream or LTS?
     
    daneobyrd likes this.