Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Unity 2022.2 is now available as the latest Tech release.
    Dismiss Notice
  3. We are making some changes to the DOTS forums.
    Dismiss Notice
  4. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

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

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

  1. Matjio

    Matjio

    Unity Technologies

    Joined:
    Dec 1, 2014
    Posts:
    87
    Hi everyone,

    Welcome to the Probe Volume discussion thread. You can use this thread to ask for help, share feedback, and have discussions about this new experimental feature available for HDRP in 2021.2.



    Introduction

    We are happy to release in Unity 2021.2 our first experimental version of our future light probe system for Scriptable Render Pipelines.

    The goal for this new system is to simplify workflows, improve visual quality, and in the future offer new features for global illumination.

    Resources

    For more information, please have a look at our documentation (work in progress) and these “Quickstart” slides to get an overview.

    Getting started
    1. Download Unity 2021.2.9 or newer through the Hub.
    2. Create a new HDRP Project, using one of the provided HDRP templates, for example, 3D (HDRP) or 3D Sample Scene (HDRP)
    3. Enable this experimental feature in your HDRP settings, following the instructions in the documentation (WIP)
    4. Create a probe volume GameObjects (GameObject > Light > Probe Volume)
    5. Set lights General Mode to mixed
    6. Set dynamic objects to Receive Global Illumination from Light Probes and small & mid-size static objects that would influence GI to Contribute Global Illumination
    7. Open the Probe Volumes Settings panel (Window > Rendering > Probe Volume Settings) and click on Generate Lighting.
    Current state

    In this first experimental release, we focused in particular on:
    • HDRP support
    • Volume-based automatic placement
    • Per-pixel lighting of dynamic objects
    • Multi-scene workflows: probes stored and loaded per scene + baking sets to manage multi-scene baking
    What to not expect in this version:
    • Light probes variants management (e.g., baking and blending different lighting setups)
    • Use probe volumes to light an entire environment without lightmaps
    • Use probe volumes with dynamic lighting or dynamic environments
    What you will be able to get with this system:
    • Easy probe placement: Choose a default global probe volume, or place your own probe volumes, tweak parameters to optimize the probe density for your needs.
    • Faster iteration time, since light probes don’t need to be tweaked when moving objects like walls.
    • Improved dynamic objects indirect lighting visual quality: Your objects are now affected per pixel by the probes, allowing for example one side to be lit by the indirect bounce of a red wall next to it and the other side by a green wall.
    • Per pixel lighting also allows to reduce the number of small and medium objects lit by lightmaps and hence decrease baking time.
    • Improved screen space global illumination: SSGI can use light probes as a fallback when raymarching is bouncing out of screen space.
    • Improved volumetric fog visual quality with probe volumes sampling for more realistic lighting
    • Improved additive scenes scenarios: Use Scene Sets to bake probe volumes across multiple scenes and load or unload individual scenes at runtime with their probe volumes attached to them.
    • Flexible runtime visual quality settings: Use Probe volumes overrides
    • Easy debug: Various debug modes are available in the Probe volume window
    Design limitations:
    • Baking sets are mutually exclusive: scenes cannot be shared across multiple baking sets.
    What’s next

    Next steps:
    • URP support (no plan for Built-in Render Pipeline. URP will come after the first round of user feedback gathering, not before 22.2)
    • Improve stability
    • Improve UX
    • Improve visual quality (light leaking)
    • Probes variants management
    • Probe blending for time of day scenarios
    Other possible future improvements:
    • Probe LODs
    • Probe disk streaming
    • Probe GPU streaming
    • Tools to bake different variants of probe volumes
    • Tools to switch probe volumes in real-time (requires coding at the moment)
    • Debug rendering in the player (only Editor debug tools at the moment)
    • Support for additional data (e.g., sky occlusion)
    Feedback

    In terms of feedback, we’re open to any feedback. Just keep in mind that the goal is not to replace lightmaps.

    Please share your feedback in this thread.

    To help us prioritize, you can also share the value, importance, and usage of this feature for you and your projects on our public roadmap portal (either through the Global Illumination card, or through the HDRP card if specific to HDRP)

    How to report bugs

    Ideally, we’d like any bugs reported through the built-in bug reporter tool, as that will automatically provide us with some relevant context.

    When reporting bugs, please look at this page for more information and best practices around bug reporting.

    Once you have submitted a bug report through the bug reporter, please feel free to start discussing it in this thread.


    We hope you will enjoy playing with this new tech, and please share with us your feedback on workflows, UX, and expectations around such a system. Remember, this is experimental and by nature subject to change based on our users’ feedback. We are not recommending using this system in production. Doing so will be at your own risk.


    The Graphics dev team








     
    Last edited: Feb 14, 2022
  2. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    952
    Hi

    Thanks for sharing
    Will new probe system break batches like old one?
     
    Prodigga and Matjio like this.
  3. LumaPxxx

    LumaPxxx

    Joined:
    Oct 3, 2010
    Posts:
    316
    Thx for hard working.
    just wonder will it be good for open world game.
    very excited for "Probe blending for time of day scenarios" and "Sky Occlusion Data".
     
    daneobyrd, ftejada and Matjio like this.
  4. Matjio

    Matjio

    Unity Technologies

    Joined:
    Dec 1, 2014
    Posts:
    87
    @Jes28 Could you give more details on how and when the light probe system breaks batches?
     
  5. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    372
    I do wonder what prevents us from using these probes instead of lightmaps to light the environment.
     
    KRGraphics likes this.
  6. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    180
    Mostly probes will incur into problems that lightmaps don't have, such as for example leaking. If you are OK with the leaking that system let through (in 21.2 there is no explicit mechanism outside of biases, in 22.2 onwards there are some mechanism that can help to a certain extent but not completely) then by all means you can! It is just not the suggested workflow at the moment
     
    Matjio likes this.
  7. Jes28

    Jes28

    Joined:
    Sep 3, 2012
    Posts:
    952
  8. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    180
    Matjio and Jes28 like this.
  9. Pr0x1d

    Pr0x1d

    Joined:
    Mar 29, 2014
    Posts:
    41
    Will runtime mode come in later for dynamic scenes changing all the time in unpredictable manner? Like procedural worlds/planets? or is it still better to just bet on custom DDGI solution for scenarios like this? Full SSGI is just too much overhead.
     
    TerraUnity, slime73, NotaNaN and 3 others like this.
  10. Chris_Webb

    Chris_Webb

    Joined:
    Mar 18, 2014
    Posts:
    76
    Hello,

    Thanks so much for this feature. It is already proving to be a really great workflow improvement.

    I'm super appreciative that multi-scene workflow functions fine, but we are having a slight issue because of how we are specifically using multiple scenes. When we instantiate additive scenes at runtime, we move the contents of the scenes. This seems break the baked probe volume. Is this expected? Is there a correct way to move the volume at runtime?

    Thanks,
    Chris
     
  11. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    180
    Hey,

    Unfortunately the lighting data is not stored in the probe volume themselves, those are just markers to tell the algorithm where to place the probes; once the placement is done, the probe volumes are not used in any way and moving them will not change where the probes are. To make it a bit shorter, we don't current support "relatively static" geometry cases, but only purely static ones.

    The probe data lives with the scene and it is only defined by their own spatial position and tied to a specific object/component.

    Unfortunately we don't have anything out of the box for your use case, we might have something planned for later on, but it is not even in its infancy of the plan phase, so cannot comment on if or when we will address such situation.

    Unless I misunderstood what's going on :D
     
  12. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    180
    The plan up until 22.2 are focused on baked data for the time being.
     
    Pr0x1d likes this.
  13. valarus

    valarus

    Joined:
    Apr 7, 2019
    Posts:
    399
    How can we battle leaking with PV?

    How do we place PV when we have irregular, non-boxed environment?
     
    Last edited: Feb 16, 2022
  14. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    180
    The placement needs to be with regular grids unfortunately, in 21.2 you can use view and normal biases to combat some of the issues (Can find those in advanced settings of the Probe Volume Options volume component).

    In 22.2 there is an option that relies on probe validity to try and stop a bit the leaking and a tool to allow to manually invalidate probes so that they will try and contribute less in situations when leaking might happen.
     
  15. sqallpl

    sqallpl

    Joined:
    Oct 22, 2013
    Posts:
    348
    Any chances for runtime baking/rebaking/probe placement features in the 22 release cycle? Or maybe baking/probe placement outside of the editor is not planned/considered at all?
     
    Last edited: Feb 16, 2022
  16. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    180
    Not planned for the 22 release cycle, as for the future, undefined yet :) Depends on many factors that are still not well defined.
     
  17. Chris_Webb

    Chris_Webb

    Joined:
    Mar 18, 2014
    Posts:
    76
    Okay thanks a lot, I thought that might be the case. This will probably be a pretty common use case for people using multiple scenes, where rarely they are instantiated in the same place they are authored, so I'm hopeful it might get solved one day :)

    Thanks a lot,
    Chris
     
  18. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,683
    I found that probe volume are randomly gone on play mode in latest beta, i take it this is a known issue?
     
  19. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    180
    Not known, the probes are gone or the probe volume components? Can you please file a bug?
     
  20. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,683
    This how it happened, it's like the probe volume data totally gone after pressing play and i have to rebake the gi. Except the terrain any other object are using APV
    If this is not a known issue i'll make a repro and file a bug report


    Edit: Oh i think i know what causing it, "Play Mode Options" if i turn it on APV data always get disconnected from the scene.
     
    Last edited: Feb 21, 2022
  21. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    180
    A bug report would be surely appreciated, thank you!
     
  22. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,683
    Done, CASE 1405007
     
  23. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    894
    Does this work with dynamic lighting / is that planned? That would roughly be the equivalent to current versions of Enlighten.
     
  24. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,683
    Not gonna be dynamic i think or at least for now, but it can be blended.
    So you'll have precomputed irradiance volume for Time of day you'll need to bake for each separate time (ie every 3 or 4 hours), and you can blend them at runtime.
     
  25. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    894
    That can potentially be interesting, depending on bake times and visual quality when using low probe counts.
     
  26. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,683
    Bake time i found it relatively fast as long as the probe are not too dense.
    Also blending precomputed irradiance volume are the technique commonly used by open world game (even the latest AAA) as it quite fast and doesn't have the overhead to calculate GI at runtime.
    As long as you just need GI for time of day, and your game doesn't have a dynamic environment this would work just fine


    Edit: @francescoc_unity i notice currently terrain are not support probe at the moment as it's GI lighting mode are locked to lightmap not sure if this is your part but any chance for terrain to support probe? would be great if we can totally use UVless GI
     
    Last edited: Feb 23, 2022
    moxi299 and LumaPxxx like this.
  27. Onat-H

    Onat-H

    Joined:
    Mar 11, 2015
    Posts:
    165
    Are APVs compatible with indirect instancing? (regular light probes don't work)
     
  28. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,683
    Out of curiosity is APV also bake sky occlussion/sky visibility?
     
  29. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    897
    I am a little confused as to what APV does exactly. I read through the documentation and from the looks of it, it is a probe placement tool, completely automated?

    I welcome new features, but this is not exactly what I expected. I was expecting a dynamic probe system that stores its own data so that it is independant of the scene. Obviously this might have been my wrong expectations. I was expecting something more future proof and realtime GI related...other than another Baked lightmap stuff.

    But regardless...

    this feature doesn't look like something that you guys spent many months on...this is just an integrated probe placer...or does it improve quality/performance? What exactly is this? A tool to help probe placement?

    Or is this like applying probe volume to the whole scene? So that more than one probe can effect a mesh?

    Or am I misunderstanding something big and making assumptions...

    I am seriously confused. I am trying to figure this out. Can anyone enlighten me.
     
    Last edited: Mar 7, 2022
    florianBrn likes this.
  30. Matjio

    Matjio

    Unity Technologies

    Joined:
    Dec 1, 2014
    Posts:
    87
    @jjejj87 Sorry if my description was not clear.

    It is an entirely new probe system, but it currently uses the same baking backend as light probes and lightmaps, and the data is still stored per scene.

    So it is not just a new placement tool on top of existing probes.

    The goal is to build a structure which is future proof, but we need to go there step by step.

    The first steps are (21.2):
    - simplifying placement by using volumes in which probes will adapt automatically to the geometry.
    - improving visual quality with
    —per pixel lighting, allowing less static objects like medium size rocks to be light mapped (and hence improved baking time and iteration time) and better visual quality on dynamic objects.
    — Volumetric fog affected by probes.
    — Some Ray marching algorithm (Eg: SSGI) falling back on probes when hitting outside screen space
    - improving additive scenes scenarios

    Now, we are focusing on stabilization, reducing light leaking, improving UX, supporting probe blending for time of day scenarios, and will work on URP support (not planned for 22.2).

    There are many possibilities for the future as mentioned above, but the above steps need to be tackled successfully first before adding more features.
     
    NotaNaN, valarus, Jes28 and 2 others like this.
  31. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    897
    If what you described is what you guys are actually trying to do, then I cannot understand how separating probe data from scene was not the first feature implemented. Not to mention missing runtime updating of probes...
     
    NotaNaN, TerraUnity, EagleG and 4 others like this.
  32. AntonioModer

    AntonioModer

    Joined:
    Jul 29, 2014
    Posts:
    54
    Hi.
    Why do the Ball glow on the base ?
     

    Attached Files:

    Last edited: Mar 8, 2022
    AydinDeveloper likes this.
  33. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    3,152
    Using 2022.1.0b10 the baking time seems to be wrong. It counts up and seems to be the time elapsed rather than time left:

    bt.png
     
    EagleG likes this.
  34. LumaPxxx

    LumaPxxx

    Joined:
    Oct 3, 2010
    Posts:
    316
    Could anyone answer this ? I would like to know the answer too.

    IMO APVs is super good for large forest rendering and in most cases vegetations are rendered with indirect instancing.
     
    Onat-H likes this.
  35. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,683
    From my test it work here, those ferns are rendered using indirect instancing,
    and this scene only lit by baked emissive capsule
    upload_2022-3-11_17-13-24.png
    upload_2022-3-11_17-12-14.png

    Edit:
    Oh wow, i just realize is APV also lit volumetric fog??? this is nice
    upload_2022-3-11_17-17-36.png
     
    Last edited: Mar 14, 2022
  36. LumaPxxx

    LumaPxxx

    Joined:
    Oct 3, 2010
    Posts:
    316
    So... i tried APVs in Unity2022.1.b8 HDRP13.1.5 today.
    everything worked like a charm until i tried to use it for terrain lighting.

    as trees in terrain don't contribute global illumination, you can't have a good lighting for trees with APVs.
    imho forest rendering is the weakest part of unity and APVs will change it all.

    any plans to make trees in terrain work with APVs in the future?



    View attachment 1020045

    Edit:
    i figured it out you have to mark the tree root gameobject as "Contribute Globe Illumination" to make it work.
    even though your root gameobject dose not have any mesh renderer on it.
     
    Last edited: Mar 15, 2022
    ftejada, PutridEx and EagleG like this.
  37. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    381
    Its wonderful you include some nice slides about how to setup and use

    it would be even more wonderful if you include a detail change log about any and all applicable changes for #pragma, define, and tags for new volumes from api 12.1.4 and higher
     
    soleron and newguy123 like this.
  38. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,683
    Hmm it seems instanced mesh are not contribute to APV, they only receive APV.
    Any chance we can get Per Renderer Normal Bias? not as a global settings?
     
  39. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    180
    I am not sure about the details of terrain tree implementation, but I am going to ask internally, hopefully will come up with a proper answer soon!

    At the moment unfortunately APV baking is only seeing whatever the lightmapper sees as the baking go still through it.

    The per-renderer normal bias is unfortunately something we cannot do as we can't afford to put more data in our GBuffer.

    The parameter being on a Volume component could maybe give you some control, although I 100% understand is not the same thing as it'd be more camera dependent than per-object.
     
    Last edited: Mar 14, 2022
    LumaPxxx likes this.
  40. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    180
    The feature is still in expertimental so API is bound to change.

    Anything specific you are looking for for which I can give you an update with current status?
     
  41. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    180
    This looks like a case of leaking. How to go about it depends on your setup and package version; you can start trying changing the bias settings.
     
    AntonioModer likes this.
  42. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    381

    i think perhaps if you could make HAS_PAYLOAD_WITH_UNINIT_GI into a local we could use to add a checkbox would be wonderful ?

    example
    #pragma shader_feature_local _HAS_PAYLOAD_WITH_UNINIT_GI

    also like to ask if you will consider adding support for runtime swapping of light probe data that could be used in dynamic day/night cycles or will you have some other neat solution

    it would also be neat if you could permit overrides for color tinting into harmonics

    cheers
     
  43. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,683
    Hmm global normal bias sadly making it tricky to get a good result on object as specific settings can looks good on some mesh but bad on other
     
  44. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    180
    HAS_PAYLOAD_WITH_UNINIT_GI is an example of something that went away (for unrelated unfortunate reasons).


    It is already part of master! You can bake different states of the lighting and change them. A way to blend them is also coming.
    I understand, unfortunately it is not something we have planned as it would have very big implications on the whole pipeline; I'll keep the feedback in mind though.
    I have been asked to double check that the prefab used for the terrain trees are setup to contribute GI
     
    LumaPxxx and DEEnvironment like this.
  45. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,683
    Well the current APV are overall looks good, there's might some edge cases where i causing weird shading.
    But overall i like it.
    upload_2022-3-15_20-38-50.png

    also i like how it integrate with volumetric fog
    upload_2022-3-15_20-45-24.png

    The only issue that i found is if the APV spacing are too small the baking process seems stalled
     
  46. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    180
    Thank you for the positive feedback too!

    Regarding this last point, is it perpetually stalled it is just a matter of very long bake times? What package version are you on?
     
  47. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,683
    it seems stalled i think, the timer not increase/decrease at all. But if i increase the spacing it bake just fine, sometimes took bit longer/faster obviously depend on the spacing settings
    i'm on 13.1.7
     
  48. LumaPxxx

    LumaPxxx

    Joined:
    Oct 3, 2010
    Posts:
    316
    yea, after some tries,i decided to never pull the highest subdivision slider higher than 2.i guess my scene is too big.:D
     
  49. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,683
    For large scene might want to try to split probe volume into several volumes. not sure about terrain though.

    @francescoc_unity
    i notice sometimes there's pitch black area like this, and in worse case it causing NAN. What is the best practice to avoid this thing?
    upload_2022-3-15_22-43-0.png
     
  50. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    180

    Do you have dilation and virtual offset enabled in the baking window? It could also be very severe ringing. What do the probes look like around that area? (Can use the display probe option in the debug menu)