Search Issue Tracker

Won't Fix

Votes

1

Found in

2022.3.60f1

6000.0.42f1

6000.1.0b10

6000.2.0a6

6000.3.0a1

Issue ID

UUM-100265

Regression

Yes

Light Probes get baked when calling LightProbes.Tetrahedralize

-

How to reproduce:
1. Open attached "IN-95782" project (See google drive link in the comments)
2. Enter Play Mode
3. Click the "Toggle Light" button at the top of the Game view
4. Observe the result

Expected result: Dynamic objects become dark
Actual result: Dynamic objects don't change

Reproducible in: 2022.2.0a10, 2022.3.60f1, 6000.0.42f1, 6000.1.0b10, 6000.2.0a6
Not reproducible in: 2021.3.49f1, 2022.2.0a9

Reproducible on: Windows 11
Not reproducible on: No other environments tested

Notes:
- Also reproducible in Player
- Commenting out the LightProbes.Tetrahedralize(); line results in expected result

  1. Resolution Note:

    The behavior, although unfortunate is as expected.
    The Unity Engine internally has 2 separate data sets for its probes:

    StagingData. It is a temporary zone where we keep track of the latest changes (scene load/unload, moving probes) without applying the tetrahedralization yet (because it is expensive).
    RenderData. It contains the probe data that is actually consumed by the rendering part of the engine.
    Most methods like (LightProbes.SetPositionsSelf for instance) apply their changes to the staging data. Nothing is made visible to the rendering until Tetrahedralize() is called.
    LightProbes.bakedProbes on the other hand bypasses that process and directly updates the RenderData. It's fast and convenient but on the other hand the changes are overwritten once the renderData is recomputed in a Tetrahedralize() call.
    In most basic scenarios, calling Tetrahedralize() is not needed because each scene includes in its baking data the probes tetrahedralization for the probe positions at bake time. The stagingData can be automatically copied to the renderData. But when more than one scene is loaded or the probes have been moved, that initial tetrahedralization becomes obsolete and a call to Tetrahedralize() becomes necessary to recompute the tetrahedralization for the union of all the loaded scenes probes.

    We understand that this behavior can be confusing and far from ideal. We're exploring ways to provide a clearer and more intuitive API for working with probes, though we cannot commit to a specific timeframe for when those improvements will be available.

Add comment

Log in to post comment