Search Issue Tracker
By Design
Votes
0
Found in
2018.4
2019.4
2019.4.28f1c1
2020.3
2021.1
2021.2
Issue ID
1343870
Regression
No
Light brightness gets intense until the 'Lightmap Encoding' quality is changed when baking Lightmap
How to reproduce:
1. Open the attached project's Scene labeled "Test"
2. Change the 'Lightmap Encoding' to 'Normal Quality' (Edit->Project Settings->Player->Other Settings->Rendering)
3. Bake the Lightmap (BakeTools->Bake)
4. Observe the Light in the Scene View
Expected result: Light brightness is not intense and doesn't change after modifying the 'Lightmap Encoding' quality value
Actual result: Light brightness is intense and reverts to normal after modifying the 'Lightmap Encoding' quality value
Reproducible with: 2018.4.36f1, 2019.4.28f1, 2020.3.13f1, 2021.1.13f1, 2021.2.0b1
Note:
- Reproducible with macOS and Windows
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- var VisionOSEDRHeadromm has a comma instead of a dot when building with Metal Rendering App Mode and local OS localization is set to German
- IAP Catalog remove product “x” and add product “+” buttons are not consistent with other remove and add buttons in the Editor
- Performance issues in Play Mode when quickly hovering the mouse cursor over Hierarchy GameObjects
- Frame Debugger displays incorrect output when FidelityFX Super Resolution or Spatial-Temporal Upscaler is used with Temporal Anti-aliasing or Subpixel Morphological Anti-aliasing
- The layout system is failing to correctly calculate or apply the height of the Japanese fallback font when the primary English font's metrics are used
Resolution Note (2022.1.X):
Lightmap Encoding is not exactly an input to light baking. It affects the texture importers for lightmaps, and thus causes lightmaps to be reimported when the setting is changed in the Project Settings window. The setting is relevant primarily after baking.
When you change this setting in said window the internal Lightmapping.OnUpdateLightmapEncoding(BuildTargetGroup) is called immediately after, which, among other actions, will reimport lightmaps. If you want to use reflection to change the lightmap encoding setting, you should also use reflection to call this method like shown in the snippet below.
Doing this before baking, however, does not make much sense, since as soon as you change the project setting, the chosen encoding will be used for all lightmaps in the project. Lightmap encoding being per-bake or per-lightmap is currently not supported.
Snippet of how to call OnUpdateLightmapEncoding:
```
typeof(Lightmapping).GetMethod("OnUpdateLightmapEncoding", BindingFlags.NonPublic | BindingFlags.Static).Invoke(null, new object[] { EditorUserBuildSettings.selectedBuildTargetGroup });
```