Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  3. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    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. adrien-de-tocqueville

    adrien-de-tocqueville

    Unity Technologies

    Joined:
    Mar 16, 2020
    Posts:
    304
    The issue was related to virtual offset. If terrain doesn't bake lighting data even with virtual offset disabled, then it looks like something is going wrong on lightmapper side.
    I managed to bake sucessfully both on 23.3 and 23.1 with a terrain, could you report a bug with a scene attached maybe ?
     
  2. SomethingElse12

    SomethingElse12

    Joined:
    Apr 4, 2022
    Posts:
    55
    Tried disabling pretty much all of the settings in APV. didn't help. Don't have it working in multiple projects.
     
  3. SomethingElse12

    SomethingElse12

    Joined:
    Apr 4, 2022
    Posts:
    55
    Also very often getting this error after bake 2023.1, nothing gets baked cuz of it. Have to clear all cache, delete all probe data files restart unity and switch around cpu and gpu bakes to resolve it, sometimes even requires to recreate scene. needing to rebake all scenes in the probe set.
    upload_2023-12-6_9-48-7.png

    In 2023.3 getting this while baking with gpu (nothing gets baked):

    upload_2023-12-6_15-18-21.png

    Also getting this in 2023.3

    upload_2023-12-6_15-47-19.png

    This is, what I assume is from baking scenes separately, but in the same baking set. which I need to bake bigger world.
    upload_2023-12-6_15-51-6.png

    Getting this in 2023.3, though terrain does have a material.Could be related to shader graph triplanar material. but it doesn't bake with regular one too, just never noticed this message in other unity versions.
    upload_2023-12-7_16-35-4.png
     
    Last edited: Dec 7, 2023
  4. wilgieseler

    wilgieseler

    Joined:
    Oct 17, 2013
    Posts:
    85
    Same story on 2023.2.3f1. Figure it's worth mentioning since the editor seems to come out about a day before the release notes. (!!!??)
     
  5. Minos321

    Minos321

    Joined:
    Jul 7, 2018
    Posts:
    44
    Does anyone know why sometimes nothing happens when starting a bake? When a bake works for me, it shows multiple messages on the bottom right as soon as I hit the bake button, and then it goes to baking global illumination and shows the progress. But every now I hit bake and the baking status switches immediately to "baking global illumination 0%" and just stays there without doing any progress. To fix this, I have to restart Unity, and then it will work again. Any ideas why this could be happening?

    Edit: Seems like it stopped happening since yesterday. Go figure.
     
    Last edited: Dec 15, 2023
  6. Minos321

    Minos321

    Joined:
    Jul 7, 2018
    Posts:
    44
    Hey everyone! Just wanted to share an environment that I'm lighting with APV. I can't overstate how in love I'm with this tech. As an environment artist, this is a dream come true. After I placed the probe volumes properly (1m distancing for the gameplay space and much higher for the backdrop), the bake times (with high probe quality) are around 1-2 minutes. The lighting data is only 10mb. I did some tests with RTX, and the visuals were very close, other than APV looks even better (IMO) because the bounces were more pronounced. This scene is running easily at 120 fps in 4k (with DLSS) on my machine. Incredible! Anyway, here are some screenshots. I just wanted to callout the APV team for this amazing feature. Insane work guys!




    upload_2023-12-14_20-11-11.png

    If you want to follow more of this project, check out my twitter: https://twitter.com/thiagoklafke
     
    olavrv, KYL3R, newguy123 and 11 others like this.
  7. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    838
    Hey in our large scenes we are seemingly always getting these errors:
    upload_2023-12-19_13-49-52.png

    This is when using Unity 2023.2. The project is rather difficult to report because of its size (200gb plus), how do i best get it resolved?
     
  8. LumaPxxx

    LumaPxxx

    Joined:
    Oct 3, 2010
    Posts:
    347
    just stop using 2023,2 or 2023,3, they are not useable.
    the last version you can do baking terrains with APV is 2023.1.20
     
    TJHeuvel-net likes this.
  9. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,262
    well that sucks...
     
  10. TJHeuvel-net

    TJHeuvel-net

    Joined:
    Jul 31, 2012
    Posts:
    838
    We managed to build, just didnt use the entire scene but a (useable) subportion of it. And disabled virtual offsets because that broke. And made a local change to the light transport package so it doesnt break when trees have lodgroups (reported as bug too).
     
  11. Minos321

    Minos321

    Joined:
    Jul 7, 2018
    Posts:
    44
    Hello everyone! I searched through the thread and couldn't find a clear answer since APV is still being heavily worked on. But what's ideal way to go about having different lighting scenarios in the same level? For example, I want to have a day, night and a cloudy version, only changing the probe volumes and lighting prefabs. I'm confused about how to go about this and make it in a modular manner, so in other levels I can just drag and drop the appropriate lighting prefabs (day_clear, day_cloudy, night_clear, etc...) and then bake the separate sets. Is there any documentation that points in the right direction? Any help will be greatly appreciated. Thanks!
     
  12. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    you need to add a new lighting scenario and blend the weight manually at runtime
    https://github.com/Unity-Technologi...g/Assets/Scenes/007-BasicAPV/LightScenario.cs
     
    tmonestudio and Minos321 like this.
  13. Minos321

    Minos321

    Joined:
    Jul 7, 2018
    Posts:
    44
  14. LumaPxxx

    LumaPxxx

    Joined:
    Oct 3, 2010
    Posts:
    347
    I found the performance drops heavily when the baked scenario data bigger than 800mb-1200mb.

    my game running at 90fps with 500mb baked apv data.
    running at 50fps with 1.2GB baked apv data.

    it happened in both 2023.1.20 HDRP and 2023.3.b1 HDRP no matter i set the Memory budget to high or low.
    the streaming is enabled already,disk streaming is also enabled in 2023.3.

    my spec is rtx4090 + 7900X + 64GBram + 2TB 980Pro
    i really can't accept performance like this,because the quality are far from recent days AAA game as i'm already using large probe spacing more than 2m to avoid performance hit while my spec is the top one.

    to suit to use unity i have already change my open world game into small islands with few 1km*1km to 2k*2km islands.
    and this performance hit happens when i use value smaller than 2m probe spacing for the current island and 54m probe spacing for the other islands.
    the quality are already very low compare to AAA games.

    this is really frustrating.
     
    Last edited: Jan 12, 2024
  15. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    936
    In 2023.3 this setting is disabled if global illumination baking is disabled. But the setting works regardless, IMO this option should be moved.
     
  16. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    936
    What kind of data does the lighting scenario include? Does it blend the skybox?
     
  17. adrien-de-tocqueville

    adrien-de-tocqueville

    Unity Technologies

    Joined:
    Mar 16, 2020
    Posts:
    304
    APV data is serialized in different files, 3 common, then 2 per scenario:
    Common data:
    Baking Set.CellBricksData.bytes
    - bricks subdivision data
    Baking Set.CellSharedData.bytes
    - validity masks
    - sky occlusion L0 L1 (if enabled)
    - sky occlusion shading direction (if enabled)
    Baking Set.CellSupportData.bytes
    - debug data like virtual offsets or adjustment volume interactions (stripped in non dev builds)

    Per scenario data:
    Baking Set-Scenario.CellData.bytes
    - probes L0 and L1
    Baking Set-Scenario.CellOptionalData.bytes
    - probes L2 (stripped during player build if not used in RP asset)
     
  18. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    936
    So if I wanted do a time of day transition like this:



    I'd have to work out the skybox blending (if I used a custom skybox anyway), and toggling lights and stuff? Is there some kind of native event setup I could do to make values change based on the lighting scenario update?

    Are there other code examples?
     
  19. Kabinet13

    Kabinet13

    Joined:
    Jun 13, 2019
    Posts:
    151
    That video you linked is of the new sky occlusion feature, not scenario blending. You should be able to bake once with sky occlusion and then have lighting react dynamically to any ambient probe changes. If I remember correctly
     
  20. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    936
    it seems to also include scenario blending with the lights at the end.

    unfortunately the only downloadable version of this project is made for 2022.3.
     
  21. SimonasGrigalaitis1

    SimonasGrigalaitis1

    Joined:
    May 24, 2022
    Posts:
    1
    Hello all! I would like to ask is this is some kind of bug or its by design?

    Situation:
    Green objects are static and receiving GI from APV
    Red object is static and receiving GI from lightmap
    Scene has one directional light with mixed mode

    Question: Shouldn't green objects start using probe data after realtime shadow mask range?
     

    Attached Files:

  22. JohnPontoco

    JohnPontoco

    Joined:
    Dec 23, 2013
    Posts:
    292
    Hey all, we're using HDRP and we've noticed that the HDRenderPipelineGlobalSettings.asset stores some APV data per-scene in the apvScenesData field.

    Unfortunately, this list just grows infinitely forever because items are never removed, even if scenes are deleted. This means the asset keeps strong asset references to a bunch of unused profiles, and generally just accumulates tons of cruft as developers add and remove scenes.

    It also causes *tons* of merge conflicts for us. Every time someone adds a scene, an element is added to the end of the list, which must be merged manually if others do the same. :(

    We'd love to use APV, but the churn on this asset is pretty rough. Are there improvements coming to this in the near future? It seems like this data should be stored alongside the baked lighting data in a separate file per-scene.
     
  23. adrien-de-tocqueville

    adrien-de-tocqueville

    Unity Technologies

    Joined:
    Mar 16, 2020
    Posts:
    304
    For this kind of time of day, you don't need lighting scenarios as most of the lighting comes from the sky, so it's will be more performant to use sky occlusion. So you simply need to update your skybox (and in URP you also have to update the ambient probe but i don't know how it works, summoning @maximeg_unity )

    On top of that, you can use scenarios to handle local lights turning on.
    Otherwise you can do everything using scenarios, but since you have to set the interpolation factor manually from script there's no event.
    Here's a very basic script showing the APIs for scenario blending. It should be available in the doc soon

    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class BlendLightingScenarios : MonoBehaviour
    6. {
    7.     UnityEngine.Rendering.ProbeReferenceVolume probeRefVolume;
    8.     public string scenario01 = "Scenario01Name";
    9.     public string scenario02 = "Scenario02Name";
    10.     [Range(0, 1)] public float blendingFactor = 0.5f;
    11.     [Min(1)] public int numberOfCellsBlendedPerFrame = 10;
    12.  
    13.     void Start()
    14.     {
    15.         probeRefVolume = UnityEngine.Rendering.ProbeReferenceVolume.instance;
    16.         probeRefVolume.lightingScenario = scenario01;
    17.         probeRefVolume.numberOfCellsBlendedPerFrame = numberOfCellsBlendedPerFrame;
    18.     }
    19.  
    20.     void Update()
    21.     {
    22.         probeRefVolume.BlendLightingScenario(scenario02, blendingFactor);
    23.     }
    24. }
     
    sacb0y likes this.
  24. adrien-de-tocqueville

    adrien-de-tocqueville

    Unity Technologies

    Joined:
    Mar 16, 2020
    Posts:
    304
    Shadowmask isn't currently implemented on APV. I should work on it soon, so it should be ready for Unity 6 release (2023.3)
     
    PaulMDev and sacb0y like this.
  25. adrien-de-tocqueville

    adrien-de-tocqueville

    Unity Technologies

    Joined:
    Mar 16, 2020
    Posts:
    304
    Which version are you using ? serialized data have been removed from the global settings in 23.3, and serialization has changed over the versions. In any case you can report a bug if needed so i can look into it
     
    JohnPontoco likes this.
  26. maximeg_unity

    maximeg_unity

    Unity Technologies

    Joined:
    Apr 13, 2022
    Posts:
    9
    In URP there is no automatic mechanism to update the ambient probe based on the sky shader, you need to provide colors manually so the ambient probe matches your animated sky.
    Using the C# API you can set the Ambient Mode to Flat or Trilight, then modify the colors using RenderSettings.ambientSkyColor or RenderSettings.ambientGroundColor, or RenderSettings.ambientEquatorColor
    It will modify the ambient probe and work with the sky occlusion. You are limited to a maximum of three colors for updating the ambient probe though. If you want more color variations, you need to write something more complexe to directly update the spherical harmonics of the ambient probe.
     
    sacb0y and adrien-de-tocqueville like this.
  27. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    936
    Nice! That looks pretty easy, I guess i could setup my own events.

    Shouldn't be hard to implement into my current day and night system.
     
  28. JohnPontoco

    JohnPontoco

    Joined:
    Dec 23, 2013
    Posts:
    292
    It looks like even on latest Graphics Repo, the asset still serializes probe data. See here:

    https://github.com/Unity-Technologi...peline/HDRenderPipelineGlobalSettings.cs#L168

    We're on Unity 2022.3.13f1 and HDRP 14.0.9. Unity 23.3 is still in beta unfortunately.
     
  29. adrien-de-tocqueville

    adrien-de-tocqueville

    Unity Technologies

    Joined:
    Mar 16, 2020
    Posts:
    304
  30. JohnPontoco

    JohnPontoco

    Joined:
    Dec 23, 2013
    Posts:
    292
    Great, glad to hear it! :)

    For 22.3 data is created anytime you create a new scene (subscenes in our case) and then save it. It's pretty straightforward to reproduce, but happy to provide a more accurate repro. (And you can follow the path pretty easily in the code). Is it not supposed to be happening in 22.3?

    I sent in a bug report with my package json. You can reproduce it on an empty project. (IN-65763)
     
  31. JohnPontoco

    JohnPontoco

    Joined:
    Dec 23, 2013
    Posts:
    292
    I've also spotted some performance problems with APV. In particular, entering play mode in any scene will cause ~200ms of wasted time clearing the index.
    upload_2024-1-17_19-22-13.png

    This happens even if it's an empty scene. And even if you don't use APV anywhere in the project.

    It'd be nice to have APV bursted / jobified, given how much data manipulation it does. :)
     
    PutridEx likes this.
  32. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,678
    Is there currently a recommended/stable way to modify APV data via custom code?
    Ideally:
    - Ask Unity to generate brick placement/subdivision, but do not trace any lighting (also, how slow is this process compared to lighting itself?)
    - Get computed sample positions.
    - Set custom SH/direction data for these samples.
    ?
     
    PutridEx likes this.
  33. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    936
    Man I really need a tutorial for APV and Sky Occlusion in URP.

    It seems the setup in HDRP is entirely different, and there's no documentation for APV in URP yet :/

    I can't seem to recreate a solid day and night transition. The APV bake seems static so things don't look right. It seems like with HDRP it needs a certain volume?

    A simple example scene would help.

    EDIT:
    I think i figured out what was causing my confusion. At the moment in URP a lot of the settings don't work right.

    Mixed lighting is a factor but if you're trying to do ONLY APV mixed lighting is locked away until you enable light mapping.

    So what I was doing was I had mixed lighting on my sun light, which caused APV to include pretty much all baked data. Once I set the sun to realtime the behavior was a bit more as expected.

    Then I could see lights used in the scene had their impact baked and sky occlusion did it's thing along side that.

    I guess there's a lot of UI work in the beta, but hopefully this is fixed by release cause as it is it's very confusing.
     
    Last edited: Jan 21, 2024
  34. cyanryanlion

    cyanryanlion

    Joined:
    Feb 17, 2020
    Posts:
    25
    Hey, will dynamic APV be able to replace enlighten for having emissive objects as well as realtime lights cast indirect light on both static and dynamic objects?

    This is currently what's keeping me using enlighten, especially regarding emissive objects lighting static objects where the emission color changes regularly (e.g. global illumination that comes from tv/cinema screens. The emissive objects are static but change in intensity/color and cast light onto both static and dynamic objects).
     
    Last edited: Jan 21, 2024
  35. adrien-de-tocqueville

    adrien-de-tocqueville

    Unity Technologies

    Joined:
    Mar 16, 2020
    Posts:
    304
    there was a slow loop, thanks for reporting it's fixed

    There is no API currently, but there could be one. I expect you don't want to overwrite anything else than lighting data (so keep sky occlusion, virtual offset, and dilation).
    Would it work for you to get a list of probe positions (no brick information) for already baked data and then send an array of sh and validity data to overwrite baked data. On top of that i can add an API to bake everything except lighting from script (probe placement is very fast, then virtual offset and sky occlusion are slower but optional). This is probably not the most efficient but should be stable and fit most use cases.

    yes this should be supported, but it won't come with unity 6
     
  36. cyanryanlion

    cyanryanlion

    Joined:
    Feb 17, 2020
    Posts:
    25
    Is there any way to use APV or an API related to APV to just generate light probe positions. Then I could transfer those positions over to the old light probe group? So that I can essentially just use APV to help auto place light probes.

    EDIT: I think this might be covered above with the mention of a possible API of getting probe positions and an API to manually just bake them rather than needing to go through the whole light baking API. I will add to this though that my usecase is to use Enlighten and currently there seems to be "you can't use APV with Enlighten" warning messages so it would be good if the APIs for generating probe positions etc still work even if enlighten is being used, rather than having to swap everything over to using light volumes, bake and then change eveything back to light probes and bake again.
     
    Last edited: Jan 25, 2024
  37. wilgieseler

    wilgieseler

    Joined:
    Oct 17, 2013
    Posts:
    85
    At some point after 2023.2.0f1 I started encountering an issue where the APVs seem to cut out in certain areas of the scene and camera orientations. This happens in Windows builds and the Windows editor, and in Mac builds, but it does not happen in the Mac editor. Is this a bug that is known and will be fixed? Could it somehow be caused by my settings?

    Also note towards the end of the video distant APV sections seem to cut out independently of the nearby ones - it's not always global.

    Would it be better to use 2023.3.0b4 for APVs?

    I've uploaded a YouTube video of the problem:

     
  38. adrien-de-tocqueville

    adrien-de-tocqueville

    Unity Technologies

    Joined:
    Mar 16, 2020
    Posts:
    304
    This looks like a streaming issue. Can you show me a screenshot of these settings ? And if scenarios are enabled, are you actually using them in the scene during the video or do you only have one ?

    upload_2024-1-30_14-50-14.png
     
  39. wilgieseler

    wilgieseler

    Joined:
    Oct 17, 2013
    Posts:
    85
    Attached screenshots. I believe I disabled "Disk Streaming" at some point in the past because of another bug. Only one lighting scenario.
     

    Attached Files:

  40. wilgieseler

    wilgieseler

    Joined:
    Oct 17, 2013
    Posts:
    85
    I tried using the exact settings you have, then again disabling Lighting Scenarios, and again disabling GPU and Disk Streaming. All of them exhibit the same behavior captured in the video.

    Also, what's the situation with the terrain bake issues? When will a fix for that land?
     
  41. adrien-de-tocqueville

    adrien-de-tocqueville

    Unity Technologies

    Joined:
    Mar 16, 2020
    Posts:
    304
    Ok thanks; it's very weird, at first it looked like it's due to the system trying to load cells when they come into view.
    There's a weight factor prioritizing cells depending on the dot product between the view dir and the cell pos, maybe it's too agressive here causing some closeby cells to be unloaded when the view dir changes rapidly.

    If you enable the 'Display cells' option in the rendering debugger, the cells loaded should display green, and the others in red or blue depending on their state. That could confirm the issue. If the place where light flickers happens in green cells, then it's a bug

    Also you could try increases the memory budget from Medium to High, maybe that could help
    It looks like you have some pretty big cells (3 * 105 meters) so maybe you can't have a lot of them stored in the buffer pool at the same time which causes a lot of unloading
     
    Last edited: Jan 31, 2024
  42. wilgieseler

    wilgieseler

    Joined:
    Oct 17, 2013
    Posts:
    85
    After a bunch more experiments this seems to have been the issue. Increasing the memory budget to High fixed the issue (at least for now). (I didn't spot this earlier because I had multiple quality presets with different settings and so it wasn't obvious what setting was activated in different tests.) Could you explain a bit more about why the memory budget might have this effect? Is this working as designed or some kind of bug? Also, the low memory budget seems to be 512 in the YAML. Is that MB? And the high is 2048? Would this be expected given my baking set is only 121 MB?
     
  43. guycalledfrank

    guycalledfrank

    Joined:
    May 13, 2013
    Posts:
    1,678
    Would be cool to have sky occlusion overwriteable as well - I already have a pretty fast way to compute it.

    But yeah, that sounds really good! :)
     
  44. MoruganKodi

    MoruganKodi

    Joined:
    Feb 11, 2015
    Posts:
    79
    I have noticed it's pissble APVs could work far better out of the box if you change your interval offsets.

    For example: This scene - wher everything is 100% grid aligned
    upload_2024-2-2_16-27-58.png

    Now tried using APVS with this scene but they caused a number of issue which made the work in fixing them more trouble than they are worth ( compared to regular reflection probes ).

    This is because while they are grid aligned - we need an option to generate spacing using a half-offset grid instead.
    • Currently, probes are places at exact integral prositions: EG: 1, 2, 4, 6, 8
    • My scene will work almost perfectly by default ( except invalidations ) if you allow grids to be placed inside center of units, EG: 0.5, 1.5, 2.5, 4.5, 8.5, ....
    • Half offsets would also ensure no probes end up inside "pillars", "poles" and such when they (props) are centered on a world unit ( EG: exactly 1,0,2 ).
    • I want to be able to use half-offsets globally,
    • My projects code assumes object placement also perfectly to the textured grid seen above ( as part of gameplay ). And offsetting the scene models to work with APVS forces one to assume the "center" of a world folume must be offset instead ( instead of probes ).
    • In the above screenshot - it would mean probes would be centered in the center of a tile - instead of a corner - when compared to a tiled texture ( like the floor in the above screenshot ).
    My scenes assume walls are 0.2 thickness ( usually ) - which means under the current state of APVS, there will always be probes generated "inside" my walls.

    Because of the amount of work needed to "manually" fix invalid probe positions - I have fallen back to Baked Indirect and Lightmaps ( for now ) - as they are far less time consuming to work with ( even when they bake slower ).

    What is the possibility of adjusting APVs to allow globally "always" generating probes at half offsets?

    For certain projects - especially grid aligned scenes - this will actually save us a huge amount of work - and we can spend less time trying to offset invalid probes which intersect our walls.


    EDIT: Feature Request - you could alternatively allow us to inherit from a "probe volume script" and customize how probes are placed via scripting during generation.
     
    Last edited: Feb 2, 2024
  45. adrien-de-tocqueville

    adrien-de-tocqueville

    Unity Technologies

    Joined:
    Mar 16, 2020
    Posts:
    304
    That's a valid request, which could also help for placing or cells when your scene would fit inside a single cell but could need up to 8 because of it's position. I'll try to find some time to implement that.
     
  46. MoruganKodi

    MoruganKodi

    Joined:
    Feb 11, 2015
    Posts:
    79
    This will be amazing if you get this implemented - thanks for reading - and excuse my dyslexia ;).
    I'll give it a test drive with above scene again if/when that is implemented. Feel free to poke me.
     
  47. wilgieseler

    wilgieseler

    Joined:
    Oct 17, 2013
    Posts:
    85
    My crappy solution for the grid alignment problem was just to set the probe distance to a non-round number like 1.848483
     
  48. MoruganKodi

    MoruganKodi

    Joined:
    Feb 11, 2015
    Posts:
    79
    That unfortunately wouldn't work if my "objects" are placed at integral positions only.
    EG: A wall perpendicular to you will always be at integral position (0, 0, 10) - when looking down Z - and I would like my probes to be in the exact opposite of that - so I would expect all of my probes on this side of the wall to start at (0.5, 0.5, 9.5).

    This means in "corners" - the probe will always be at a predicable distance to each face of a wall (and the floor). A random fractional spacing causes probes to become more randomly spaced and as such a "predictable" outcome relative to a grid aligned modular scene wouldn't really work - as it still implies an increased chance of probes intersecting a 0.2 thickness wall when walls are spaced at exact integrals.

    A half offset is a more elegant solution - and will still save time and effort in scene setup like this.

    It also means - if I have a 0.8 thickness wall - the probes inside that wall can pretty much be ignored in many cases - particulary if my "spacing" starts at 0.5 , as the nearest probe to a wall could be at a distance of 0.1, - close enough for dynamic objects that I would not care about invalidating those - as the tiling of cells is once again "predictable" - but simply using half offsets for grid aligned scenes.
     
    Last edited: Feb 3, 2024
  49. MoruganKodi

    MoruganKodi

    Joined:
    Feb 11, 2015
    Posts:
    79
    I do however have a couple other feedback points/ideas and wondering how possible these would be to implement in APVS:

    - "Explicit" volumes: - when building indoor only ( eg: rectanglar rooms ) - APV places probes outside my local volumes, which as a result forces me to try and invalidate or push those probes - for Internal Only lighting - this creates extra work. Would it be possible to implement a "toggle" on a local volume which ensures only probes inside the volume are valid (or included, where only these probes count for lighting meshes - in particular static meshes ) - this will be useful alongside half offsets in grid aligned scenes - and will help prevent our interior scenes from capturing light on the opposite side of a wall. ( i don't want sunlight/skylight interpolating into the probes on the "interior" side of a wall ).

    EG: My desired result - is that I would only want a probe placed inside my room ( volume ), and never outside - because this scene is exclusively interior only.

    Clipboard01.png


    - Flood Fill volumes: Perhaps a "flood fill" volume technique can be used to place probes inside a volume without passing though walls - in partcular, diagonal or curved walls, by only building cells by filling from within a volume - where hitting static walls here could result in an automatic offset in the opposite direction. While generating - you can use an outward fill to find said wall/curve - which can determine and automatic offset or deletion of cells, resulting probes inwards - instead of intersectng the wall - keeping probes on the inside of the volume and hopefully not intersecting static geometry ( architecture ).
    I am not sure how this would work for exterior (outward facing) walls - but would also be a time saver for interior environments ( inward facing walls ).

    Other than that - the only other thing I see as needed is the "half offset" thing I mentioned above.


    Edit: I noticed APVs dont seem to capture "Shadow Only" shadow casters (mesh renderers) - including static renderers.
     
    Last edited: Feb 3, 2024
  50. bossa_quick

    bossa_quick

    Joined:
    Feb 5, 2020
    Posts:
    7

    Would you consider being able to create the apv structure in a runtime api? It would be incredibly valuable for myself and I'm sure others to be able to create the apv bricks and probe positions then use our own solutions to fill in sky occlusion and lighting in whatever way we like and then have that data be overridable and apv continues to work as it does. I ask because it would be possible (non trivial sure, but possible) to write a low fidelity raytracer to bake some information in those probes for ugc content to get a preview of what lighting would look like without requiring ugc creators to own / install unity
     
    miinoy and guycalledfrank like this.