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. Dismiss Notice

Light probes ignored in an additive scene [Unity 2019.4.5f1]

Discussion in 'Global Illumination' started by Adam_Streck, Aug 24, 2020.

  1. Adam_Streck

    Adam_Streck

    Joined:
    Jul 31, 2013
    Posts:
    26
    Hi,

    We have a problem that started with the update to 2019.4 from 2019.2.

    When a scene is loaded additively, the probes from the additive scene are ignored by dynamic gameObjects.

    As an example - you can see that the probe on the selected character is taken from a location far away from the character (indicated by the yellow line) - it is the closest light probe in the active scene. The probes in the vicinity of the character are ignored.

    Any ideas?

    upload_2020-8-24_11-30-17.png

    Compare - only one scene loaded:

    upload_2020-8-24_11-37-2.png
     
  2. thefranke

    thefranke

    Unity Technologies

    Joined:
    Jun 20, 2015
    Posts:
    153
    Hey Adam,

    before 19.3, Unity would only consider the probes of the last loaded scene (i.e., you couldn't actually "add" probes with additive scenes). In 19.3, we changed this behavior to be in sync with lightmaps. However, the tetrahedralization structure used to look up probes needs to be updated when loading additive scenes with probes in them, and since this is expensive we have an API call for it:

    LightProbes.Tetrahedralize() or LightProbes.TetrahedralizeAsync()

    https://docs.unity3d.com/ScriptReference/LightProbes.TetrahedralizeAsync.html

    Please try calling it after all your additive scenes were loaded.

    Cheers
     
    Adam_Streck likes this.
  3. Adam_Streck

    Adam_Streck

    Joined:
    Jul 31, 2013
    Posts:
    26
    Hi,

    Thanks for the quick reply. Yes, the LightProbes.Tetrahedralize() has fixed the issue!

    I thought it would be a bug so I just looked through between version bug-fixes, did not occur to me to check the change-log. Thank you.

     
    thefranke likes this.