Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. 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. m4robb

    m4robb

    Joined:
    Aug 2, 2017
    Posts:
    38
    checking in again re light leaks and switching scenes in 2022.1.13. I can do a bake and the scene will look great, no leaks, I switch to a scene in another baking set, then when I come back to the first scene, then I will find leaks when there were none before. I can mitigate this to a large degree but increase probe density (like .2 metres min distance as compared 1 m default), and increase the thickness of wall, and most leaks will not reappear, some still do. Wondering still what is it that causes this leaking when I return to a scene that had already baked without leaks. hopefully I'm explaining the problem well enough.
     
    PutridEx likes this.
  2. SkandYxyz

    SkandYxyz

    Joined:
    Mar 13, 2015
    Posts:
    83
    Hey,

    i see that baking two Probe Volumes during Sunset leads to bright lit probes.
    upload_2022-12-1_17-44-11.png
    Using only main probe volume works
    upload_2022-12-1_17-46-40.png
     
  3. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    If the sun are already below the horizon try to reduce the intensity multiplier
     
  4. m4robb

    m4robb

    Joined:
    Aug 2, 2017
    Posts:
    38
    still on my quest to track down ways to deal with light leaks. I already asked this, but no answer. the HDRP 14 docs mention a Leak Reduction Mode checkbox in the volume override. I cant see this in 2022.3.13 (I do see the override), is it somewhere else? or in a another editor version? I couldn't see it see it in 2023.1.19.
     
  5. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    It's in 2022.2, not 2022.1.
    Unfortunately, even with the light leak mode, depending on your scene you can still have light leaks.
     
  6. m4robb

    m4robb

    Joined:
    Aug 2, 2017
    Posts:
    38
    typo on my part re unity version, meant to write 2022.2.13, some many numbers! but still cant find the Leak Reduction Mode. oh well. re leaks in general, leaks are perhaps part of the deep rabbit-hole of lightmapping. with either progressive or bakery workflows, I'm spending a lot more time and attention on uv mapping and the way meshes are made. more times than not, at least for me, that's the smoking gun when bake catastrophes occur. still a puzzle why or how a bake changes when returning to it from another scene.
     
  7. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    I experienced a similar issue, with custom probe volume adjustment volumes I fix most of the leaks, but increasing samples creates new leaks in different areas.

    - You possibly don't have the show additional options enabled, which I believe the light leak paramater is hidden behind.

    How to show it:

    Video has some weird issue since I forgot to disable some windows, but it gets the point across
     
    m4robb likes this.
  8. m4robb

    m4robb

    Joined:
    Aug 2, 2017
    Posts:
    38
    yes! thanks for this, fell a bit stupid for missing this in the first place, but most appreciated. will give it a spin
     
  9. m4robb

    m4robb

    Joined:
    Aug 2, 2017
    Posts:
    38
    does the trick for now, a shot with static and dynamic objects together, a bit more ungarbled then before. Capture5.PNG
     
  10. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    I've been facing an issue where APV sometimes automatically disables itself permanently, even though it's enabled in the HDRP asset and was working fine for multiple bakes.

    Report: IN-24907
    (More info in comments)
     
  11. Skokon

    Skokon

    Joined:
    Jul 23, 2017
    Posts:
    74
    This is so weird, On unity 2022.2.0b16.112.5806

    Lighting bake is stuck on 0% when i have the probe volume component in my scene, but when i remove or disable it, it it bakes :/
     
    Last edited: Dec 9, 2022
  12. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    I noticed HDRP now has APV documentation, nice.
    I do think it's missing mentions of the importance of "light probe sample multiplier" and in general sample count for probe volume.
    Many issues mentioned in the doc page "fix issues with probe volume" can also be caused by low sample counts.
    Maybe give a recommended value as well.
     
    echu33 and impheris like this.
  13. impheris

    impheris

    Joined:
    Dec 30, 2009
    Posts:
    1,747
    totally agree
     
  14. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,692
    That would be great! Additionally it would be great to ask the editor to generate the Volume asset without actually computing colors, i.e. generate the structure, but with empty bricks (so custom colors can be set instead).
     
    PutridEx likes this.
  15. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    838
  16. OBiwer

    OBiwer

    Joined:
    Aug 2, 2022
    Posts:
    61
    having a larger terrain scene, editor is stuck on "Hold on (busy for ....)" which can take easily 10 minutes.
    In this time the editor is in ProbeGIBaking.VirtualOffset and it's in 'Physics.RaycastAll'. This process cannot be canceled. also the "Hold on" window just shows that it's handling the "MouseUp" event.

    Also this reveals a possible ... limitation: what if my mesh renderer has no collider? or just a pretty approximated collider? wouldn't it result in bad probe placements?



    Another issue we encountered: We had a scene without baked light, that scene looked different in the build than in the editor. this issue went away when disabling the adaptive probe volumes in the graphic settings.
     
  17. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    I'm curious what causing black probes in empty space?
    upload_2022-12-16_16-57-12.png
    upload_2022-12-16_16-58-35.png
    upload_2022-12-16_17-0-53.png
     
  18. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
    The virtual offset is something we know needs to be moved on the lightmapper side, the work for that needs to happen but it hasn't yet. If it is too slow for you I suggest disabling it, it is not mandatory and often dilation is enough.

    If a mesh has no collider a new one will be spawn for the process and deleted after.

    Re the other issue, can you please file a bug so we can look at it?
     
  19. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193

    Are you using the GPU lightmapper or the CPU one? We encountered some issues with the GPU in the past...
    If you could provide a small repro we can try looking into what the issue might be.
     
  20. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    I've tried both. I'll try to create a repro project
     
  21. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    838
    Our game has (partial) destruction of certain objects, is apv still feasible here?

    So for example a large bridge asset, or some houses, can be destroyed. It seems possible to bake our scene once with everything intact, and another time with everything destroyed.

    But i cant find a way to load partial datasets, e.g. only load probe volumes in a certain bounds, overwrititng them. So once a building is destroyed we'd like to overwrite the existing probe volume within a bounds, with that from another bake-set.


    https://docs.unity3d.com/Packages/c...l/probevolumes-use.html#configure-baking-sets
     
  22. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    You could use APV, but only if you keep contribute to GI disabled since they aren't static, otherwise APV will treat them as static and when they move or are destroyed, things will look off
    that way they will only receive lighting
     
    Last edited: Dec 16, 2022
    TJHeuvel-net likes this.
  23. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    welp trying to create repro project now all i get is dark probes
    upload_2022-12-16_23-0-17.png
    upload_2022-12-16_23-1-37.png
    so it seems the probes are under exposed, i have to crank the indirect multiplier to a high value. . . do you still want a repro project?

    Edit : @francescoc_unity CASE IN-26148
     
    Last edited: Dec 16, 2022
  24. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    Some possible bugs in 2022.2.1:
    Reflection probe normalization is not working - no bug report
    Probe volumes cause reflection probes to work incorrectly - IN-26395, can be reproduced in HDRP's 3D sample template

    Probe volume can add a lot to an outdoor scene lighting just by ticking contribute to GI for the terrain, all other objects only receive lighting.
     
    Last edited: Dec 19, 2022
  25. kite3h

    kite3h

    Joined:
    Aug 27, 2012
    Posts:
    200
    You trick people by cleverly mixing up the facts.
    We already know that mesh-to-sdf is used for skills used in enemy and lion.
    Because it was released on your company's demoteam.
    We already know that we can get GI and AO from SDF. This is because Unreal has already told many people about it.
     
  26. SomethingElse12

    SomethingElse12

    Joined:
    Apr 4, 2022
    Posts:
    64
    Where did lightning scenarios go in 2023 alpha? Window->Rendering->Lightning does not have it, neither does baking set.
     
  27. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
    Thank you to the people submitting the bugs!

    You are a bit confused I think :)
    Using SDF for something doesn't mean it is used for everything :) Also the subject is fairly complex, I suggest to read around a bit to understand tradeoffs etc.

    No twisting of facts here.

    Moved in the lighting panel under the probe volume tab, also you will need to enable the feature on the HDRP asset as it was decided internally that it is still an experimental feature.
     
    Last edited: Dec 20, 2022
    MaxWitsch and Avol like this.
  28. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    any info on why APV baking stuck on 50% and the remaining timer are keep increasing?
    upload_2022-12-21_16-56-0.png
     
  29. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    I tested the latest HDRP package from the master branch and there might an issue with virtual offset, I noticed one commit related to it, virtual offset wasn't running at all even when enabled, even for probes inside of geo, at least the debugger didn't show it

    It's been backported to 2022.2 Internal/2022.2/staging by UnityAljosha · Pull Request #7772 · Unity-Technologies/Graphics (github.com)

    so the issue might still be there for the backport, unless it's related to other changes in the master branch, you likely know about this but thought I'd mention it just in case :D
     
    Last edited: Dec 22, 2022
  30. keeponshading

    keeponshading

    Joined:
    Sep 6, 2018
    Posts:
    937
    wilgieseler and impheris like this.
  31. unisip

    unisip

    Joined:
    Sep 15, 2010
    Posts:
    341
    I am a bit confused about "bake active scene" in a multi scene scenario.

    I have a huge level split into about 10 scenes. My runtime scenario is that all my scenes get loaded additively (or at least, for visibility reasons, I will have a subset of three scenes loading at any given time).

    I can't bake it all at once, so creating a baking set and using "bake active scene" seems like the solution for this.
    However, I ran a very simple test, with two scenes, each once with a plane an a spot light, spacially side by side.

    Here is what i tried:
    1. set both lights to green, and save both scenes, bake the whole set. Works fine, I can see that each scene ends up with one lightmap showing green color. My probe volumes are fine too.
    2. set both lights to red, save both scenes.
    3. load both scenes, set first one as active. Press "bake active scene"

    As a result, I can see that both scenes have been modified, and both lightmaps now show red, meaning that not only Scene 1 has been baked, but also - apparently - Scene 2.

    My question: if "bake active scene" actually bakes both my scenes, what's the point compared to "bake loaded scenes" ?

    [Edit] To rephrase this: From my test, my understanding is that "bake active scene" will actually rebake the whole set of scenes and move the data to the active scene folder. It seems like the wording of that button led me to believe that we could actually bake scenes in a set one by one (to prevent very long baking times). Now I feel that this is not possible.

    If I go bake to the previous workflow (that is, generate lighting for each scenes separately and load scenes additively), I get all my lightmaps loaded correctly but I only get a probe volume for the last loaded scene.

    Is there any solution to my problem ? (getting all lightmaps and all probe volumes loaded). RIght now the only one I see is baking the whole set at once, which very likely will crash the lightmapper due to the size of my level
     
    Last edited: Jan 12, 2023
  32. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    676
    Is it possible to bake probe volumes without lightbaking the scene at all?
     
  33. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    what do you mean by light baking? Do you mean without baking at all, so realtime? if so no
    if you mean without baking lightmaps, it's possible you just have to mark all objects to receive light probes
     
  34. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    676
    I mean just baking the probes without generating lightmap UVs for all the static meshes and baking the traditional lightmaps on the meshes first. I can't get it to bake any probe volumes on their own unless there is a lightmap baked first.
     
    Last edited: Jan 14, 2023
    newguy123 likes this.
  35. SkandYxyz

    SkandYxyz

    Joined:
    Mar 13, 2015
    Posts:
    83
    I experience blending lighting scenarios every frame as a huge bottleneck.
    upload_2023-1-18_21-50-36.png

    Any ideas how to reduce processing time despite only calling it every x frames? I guess this would also lead to unwanted spikes.

    I see it correlates with the scenario blending memory budget. Lowering this increases performance. Setting it to low breaks blending. setting it to medium is faster then high.

    DX12 in this case is much slower than DX11.

    Any chance for compression of APV data? This could help decreasing GPU memory needs and framerate drops during blend. As far as I remember Bakery has implemented Texture3D compression.

    The only way to have no spikes is with low memory profiles and streaming. but then, i have to face this:
    upload_2023-1-21_23-8-53.png
    upload_2023-1-21_23-9-44.png
    upload_2023-1-21_23-10-19.png

    For streaming it might be better to have more smaller tiles unloaded and loaded at the border so the player does not see it.

    Any suggestions?

    Kind Regards
     
    Last edited: Jan 21, 2023
  36. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    By the way, @francescoc_unity
    my assumption on the reason unity's demo could get very good results from APV is due to the open nature of the level, due to large windows letting in light from outside, if it was completely (or close to) closed off from outside lighting you would start noticing an increase in leaking.

    For example take this scene:
    (0.5 probe density, 2k env/indir samples, dilation & virtual offset)
    Unity_D1Nr17gKAb.png
    Looks clean, no big issues.

    Same level but closed off almost completely (except the doors):
    Unity_4HXU6WhPGJ.png

    Big difference, this is where APV struggles for static lighting, I've also tried many different probe densities & samples, although 0.5 & 2k is already a lot and takes a while to bake even though the level is fairly small.

    View/normal bias can help but increasing it to a large value can lead to noticeable lighting changes when moving which is tough to accept.
     
    ontrigger and newguy123 like this.
  37. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193

    Have you tried using adjustment volumes? Also consider increasing the density around leaky parts
     
    impheris likes this.
  38. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    Yeah, although it's hard to pinpoint the problematic probes with so many, the new probe debug option in 2023.1 helps a lot, not in 2022 though.

    Increasing density beyond 0.2 is tough, this one room already takes a while to bake, there's also the sample issue, which really starts showing in dark environments/closed interiors like in the second picture. And with so many probes, increasing the samples adds a lot to bake times. Size on disk is also starting to get pretty big considering the level size.

    The scene had an increased view bias, which helps, without the increase the leaking is worse, but when moving in-game you can notice the light changing which looks a bit off, even though it's only at 0.43 view bias.
     
  39. SkandYxyz

    SkandYxyz

    Joined:
    Mar 13, 2015
    Posts:
    83
    Do you have plans to implement a baking api for different lighting scenarios? This way one could change the time of day and bake all lighting scenarios one after another with one click.

    Kind regards
     
  40. m4robb

    m4robb

    Joined:
    Aug 2, 2017
    Posts:
    38
    hi,are there any code examples to change baking sets via code during run-time?
     
  41. ebaender

    ebaender

    Joined:
    Oct 29, 2020
    Posts:
    98
    I'm trying to learn using Probe Volumes by converting the sample scene, but there is a massive problem with the reflections. They look fine in the first room, the second one already looks off and the third one is a complete nightmare. I can't even fix this by adjusting the exposure override for that volume, the reflections are still way too strong. I read the entire section on probe volumes in the HDRP documentation, but other than enabling reflection probe normalization in the global HDRP settings and the occlusion only reflections volume override I found nothing related to reflections. In fact toggling probe normalization seems to make no difference at all even after baking everything again, is the feature just broken in 2022.2? Even if it worked the example picture in the documentation shows it making only a slight difference, so there must be more wrong than just that.
     

    Attached Files:

  42. ebaender

    ebaender

    Joined:
    Oct 29, 2020
    Posts:
    98
    Nevermind, I didn't see that there is a separate section for baked reflections in the global HDRP settings where you also need to enable Prove Volumes.
     
  43. SkandYxyz

    SkandYxyz

    Joined:
    Mar 13, 2015
    Posts:
    83
    Another thing I found to be a problem ist the hard coded limit of 64 reflection probes at the same time. If you want to place reflection probes on terrain you can either only place an 8*8 grid or use one realtime reflection probe at camera position. Can you remove this limit?

    Kind regards
     
  44. SomethingElse12

    SomethingElse12

    Joined:
    Apr 4, 2022
    Posts:
    64
    can already do that through some code (example from my game), but this currently crashes during a second bake (also when done manually, without any error unity just closes) in 2023 beta/alpha, used to work fine with 2022, possibly cuz scenes became bigger.

    Code (CSharp):
    1. public void BakeAll()
    2.         {
    3.             float time = Time.realtimeSinceStartup;
    4.  
    5.             BakeDay();
    6.             BakeMidDay();
    7.             BakeNight();
    8.  
    9.             float seconds = (Time.realtimeSinceStartup - time);
    10.             Debug.Log("Baking Completed In: " + TimeSpan.FromSeconds(seconds).Days + "d. " + TimeSpan.FromSeconds(seconds).Hours + ":" + TimeSpan.FromSeconds(seconds).Minutes + ":" + TimeSpan.FromSeconds(seconds).Seconds);
    11.         }
    12.  
    13.         public void BakeDay()
    14.         {
    15.             ProbeReferenceVolume.instance.lightingScenario = "Day";
    16.             WeatherAndSkyManager.Get.SetWeatherAndTime(0.0f, Game.WeatherType.Sparse);
    17.  
    18.             bool baked = Lightmapping.Bake();
    19.             if (baked)
    20.                 Debug.Log("[Day] baked succesfully!");
    21.         }
    22.  
    23.         public void BakeMidDay()
    24.         {
    25.             ProbeReferenceVolume.instance.lightingScenario = "Mid-Day";
    26.             WeatherAndSkyManager.Get.SetWeatherAndTime(0.5f, Game.WeatherType.Sparse);
    27.            
    28.             bool baked = Lightmapping.Bake();
    29.             if (baked)
    30.                 Debug.Log("[Mid-Day] baked succesfully!");
    31.         }
    32.  
    33.         public void BakeNight()
    34.         {
    35.             ProbeReferenceVolume.instance.lightingScenario = "Night";
    36.             WeatherAndSkyManager.Get.SetWeatherAndTime(1.0f, Game.WeatherType.Sparse);
    37.  
    38.             bool baked = Lightmapping.Bake();
    39.             if (baked)
    40.                 Debug.Log("[Night] baked succesfully!");
    41.         }
     
  45. m4robb

    m4robb

    Joined:
    Aug 2, 2017
    Posts:
    38
    bumping this, sorry, still needing to know if there are there any code examples to change baking sets via code during run-time? or can we even do that, or is there some sort of work around to a problem I'm running into, if a scene is loaded, but not activated, then activated, and still keeping the baking set from the first scene. hope my explanation makes sense
     
  46. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    @francescoc_unity
    I'm not sure If i misunderstood layer masks for APV, but it doesn't seem to be working as I expected:
    I have two volumes, one at 0.45m density, the other at 1.35m. The volume with 0.45 is intended just for the walls, using a layer called wall that only walls have.

    When I'm using just the "wall" Probe volume, it works as expected. Look at this pic:
    Unity_hnu5UZJ5yw.png

    But when I enable the second probe volume, which has all layers ticked except walls, considering the second volume has 1.35m density, this happens:
    Unity_y2JYeR9vLl.png


    Doesn't look like 1.35m, to make sure I tried the second volume with 4.05m but same result.
    Is this working as expected, maybe some limitation in how placement is done for the probe volume?

    Both probe volumes cover the building entirely.
    Video of layer setup:
     
  47. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
    Hey!

    Can you please file a bug with this? :)
     
  48. Cheo6

    Cheo6

    Joined:
    Nov 20, 2017
    Posts:
    32
    Hello, I'd like to ask for some clarification about the possibility of real-time global illumination : if I understand the first post correctly, the APV system does not currently support real-time global illumination, for that we should use either SSGI and/or the now legacy light probes system. My question is : will real-time global illumination be implemented in the future for APV ? If so, do we have an estimated date of release for that ? Lastly, I'd like to add that marking the light probe system as legacy when it possess a major feature the APV system doesn't have seems wrong in my opinion.
     
    graskovi likes this.
  49. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    Sure thing - IN-30979
     
  50. nehvaleem

    nehvaleem

    Joined:
    Dec 13, 2012
    Posts:
    450
    I am using 2022.2 and I am unable to see probes from apv in the scene view. In the Lighting Window I have Light Proble Visualization set to All Probes with Cells + display weights, occlusion enabled. Gizmos are active in scene view but still no probes are rendered. Did I miss something obvious?