Search Issue Tracker

Fixed in 2019.4.9f1

Votes

0

Found in

2019.4

2020.1.9f1

2021.1

Issue ID

1286726

Regression

No

[LightProbes] Spherical Harmonics cannot be replaced at runtime when having multiple Scenes in the Hierarchy window

Progressive Lightmapper

-

Spherical Harmonics cannot be replaced at runtime when having multiple Scenes in the Hierarchy window and Light Probes count is doubled in 2019.4, 2020.1, 2020.2

How to reproduce:
1. Open the user's attached "Bug.zip" project
2. Open the "Main" Scene
3. Drag the "Graphics" Scene into the Hierarchy window
4. Enter Play Mode
5. Observe the Console log

Expected result: No error messages are thrown in the Console log and spherical harmonics are getting replaced at runtime
Actual result: "Length mismatch! 140 != 70" and "Trying to set 70 coefficients, but the number of probes is 140." error messages are thrown in the Console log, spherical harmonics are not getting replaced at runtime

Reproducible with: 2019.4.14f1, 2020.1.11f1, 2020.2.0b10, 2021.1.0a3
Could not test with: 2018.4.28f1 (LightProbes.Tetrahedralize method is not supported)

Note:
- In 2021.1.0a1 and above the LightmapSettings.lightProbes.bakedProbes.Length is correct, but for some reason, spherical harmonics are not replaced at runtime (See attached "1286726_2021.mp4")
- The issue is not reproducible if the other scene is loaded instead and not in the Hierarchy window from the beginning (See attached "repro.mp4")

  1. Resolution Note (fix version 2019.4.9f1):

    Please use the newly added LightProbes.needsRetetrahedralization callback to invoke LightProbes.Tetrahedralize when it is needed. Calling LightProbes.Tetrahedralize in an Awake function is not ideal, since GI data might not be loaded at the time, when the function is run. (Added in 2021.2.0a3)

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.