Search Unity

How to move Light Probes in Run Time?

Discussion in 'Global Illumination' started by YJack, May 25, 2022.

  1. YJack

    YJack

    Joined:
    Apr 7, 2010
    Posts:
    44
    I'm not the first one to face this problem as I saw some other people having the same issue in the forums. The problem is that all solutions until now are dirty workarounds with issues affecting pipeline and, some times, supported features (like LPPV).

    I need to offset my light probes in runtime. Procedural environments demands that offset to use Light Probes.

    Looks simple, however, their world position are fixed and the position param is read-only. I wasn't able to find a way to change Light Probe positions. Reflection doesn't work since this position property doesn't give a return based on some local variable or method. I wasn't able to hack an access to enlighten on C++ side until now (which is also not a good thing to do). Also, I wasn't able to find a way to add an offset for those probes on shader side.

    Bethesda presented a solution creating their own custom probes which is not very intuitive for artists and brings workflow issues (like change renderer component, add aux code to manage that and make this reflect on all affected shaders). Also, the talk don't give a in-depth explanation so if anyone knows more about it, I'll be very happy to hear it.

    Some people suggested to use anchor override to remap position, which works but breaks LPPV and requires swap light probes/anchor position without be noticeable (what is a very bad requirenment for lighting).

    Some years ago, Unity added the static method LightProbes.Tetrahedralize and that works fine when loading additive scenes but only works in fixed positions. Tetrahedralize or CalculateInterpolatedLightAndOcclusionProbes, the exposed methods from LightProbe class, doesn't help solve this either.

    I'm trying to hack a way to move those probes positions (without use Anchor Override or Custom Probes), or, at least, find a good reason why Unity doesn't have this implemented. The only answer I saw from Unity was that this was an edge case. Procedural maps are an edge case??? Plz, guys.

    Plz, if anyone have some idea. I'll be glad to hear it. (sorry for the big text. I'm a bit stressed with this limitation)
     
    Last edited: May 27, 2022
  2. kristijonas_unity

    kristijonas_unity

    Unity Technologies

    Joined:
    Feb 8, 2018
    Posts:
    1,080
    There's a feature in our backlog which will enable users to modify light probe positions via a public API. We cannot provide an ETA, as a refactor in the area is required for it to work.
     
    CosmicStud and YJack like this.
  3. YJack

    YJack

    Joined:
    Apr 7, 2010
    Posts:
    44
    Thanks for the feedback, @kristijonas_unity. Please, let us know when you have an ETA for that. Can you explain a bit how to use custom probes as Bethesda did? I guess this is the most suitable solution atm and looks a bit tricky to achieve the desired result just following their presentation.
     
  4. Pema-Malling

    Pema-Malling

    Unity Technologies

    Joined:
    Jul 3, 2020
    Posts:
    327
    YJack likes this.