Search Issue Tracker
Active
Votes
0
Found in
6000.4.0a1
Issue ID
UUM-120926
Regression
No
Light baking fails with errors when Generating Lights in project with Terrain and Unity Compute (GPU) selected in Lightmapping Settings
Steps to reproduce:
1. Create new Unity project using Universal 3D Template
2. Open Project Settings window
3. In Player > Other Settings > Script Compilation > Scripting Define Symbols add UNIFIED_BAKER symbol
4. Press Apply
5. Wait for compiling to finish
6. In Hierarchy window create Terrain GO (Terrain should automatically be set to Static)
7. Open Lighting window
8. Create new Lighting Settings Asset
9. In Lightmapping Settings > Lightmapper select > Unity Compute (GPU)
10. At the bottom of the window press "Generate Lighting"
11. Observe the Console window
Actual results: Light generation fails, errors are thrown in the Console window
Expected results: Light should be generated successfully without any errors thrown in the Console window
Reproducible with versions: 6000.4.0a1
Can’t test with versions: 6000.3.0b4 and lower (Unity Compute (GPU) not available)
Tested on (OS): Windows 11
Errors:
1. [Worker2] IndexOutOfRangeException: Index was outside the bounds of the array.
UnityEditor.PathTracing.LightBakerBridge.BakeInputToWorldConversion.ConvertInstancesAndMeshes (UnityEngine.PathTracing.Core.World world, UnityEditor.PathTracing.LightBakerBridge.BakeInput& bakeInput, UnityEngine.PathTracing.Core.Handle`1[UnityEngine.PathTracing.Core.World+MaterialDescriptor][][]& perInstanceSubMeshMaterials, System.Boolean[][]& perInstanceSubMeshVisibility, UnityEngine.Bounds& sceneBounds, UnityEngine.Mesh[]& meshes, UnityEngine.PathTracing.Lightmapping.FatInstance[]& fatInstances, System.Collections.Generic.List`1[T] allocatedObjects, System.UInt32 renderingObjectLayer) (at ./Library/PackageCache/com.unity.render-pipelines.core@942a815dc3c0/Editor/PathTracing/BakeInputToWorldConversion.cs:424)
2. [Worker2] Asset import failed, "Temp/LightBakerAssetImport/BakeImport.asset" > IndexOutOfRangeException: Index was outside the bounds of the array.
UnityEditor.PathTracing.LightBakerBridge.BakeInputToWorldConversion.ConvertInstancesAndMeshes (UnityEngine.PathTracing.Core.World world, UnityEditor.PathTracing.LightBakerBridge.BakeInput& bakeInput, UnityEngine.PathTracing.Core.Handle`1[UnityEngine.PathTracing.Core.World+MaterialDescriptor][][]& perInstanceSubMeshMaterials, System.Boolean[][]& perInstanceSubMeshVisibility, UnityEngine.Bounds& sceneBounds, UnityEngine.Mesh[]& meshes, UnityEngine.PathTracing.Lightmapping.FatInstance[]& fatInstances, System.Collections.Generic.List`1[T] allocatedObjects, System.UInt32 renderingObjectLayer) (at ./Library/PackageCache/com.unity.render-pipelines.core@942a815dc3c0/Editor/PathTracing/BakeInputToWorldConversion.cs:424)
3. [Worker2] NullReferenceException: Object reference not set to an instance of an object.
UnityEngine.Bindings.ThrowHelper.ThrowNullReferenceException (System.Object obj) (at <648afa66a7fd4d229465d3e0fcb34869>:0)
UnityEngine.LightTransport.BakeProgressState.WasCancelled () (at <648afa66a7fd4d229465d3e0fcb34869>:0)
UnityEditor.PathTracing.LightBakerBridge.LightBakerWorkerProcessImporter.ProgressReporterThreadFunction (UnityEditor.LightBaking.ExternalProcessConnection connection, System.Threading.CancellationToken bakeIsFinished, UnityEngine.LightTransport.BakeProgressState progressState) (at ./Library/PackageCache/com.unity.render-pipelines.core@942a815dc3c0/Editor/PathTracing/LightBakerWorkerProcessImporter.cs:103)
UnityEditor.PathTracing.LightBakerBridge.LightBakerWorkerProcessImporter+<>c__DisplayCla
4. Light baking failed with error code 2 (Failed to communicate with the worker process, it might have crashed).
5. Failed copying the texture from '.../PostProcessingOutput/lightmapRequest0/Lightmap-0_comp_light.exr' to 'Temp/GI/7db43aa4627103201baccaab3de8e56d/Lightmap-0_comp_light.exr'.
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Texture Sampling overlap causes graphical errors on specific Graphics APIs and Devices when using Framebuffer Fetch
- [Android] AssetBundle loading performance degradation when loading from a local Assetbundle
- [iOS][Android] Reflection with Generic Class returns unexpected values
- Shader Variant Collection Asset UI is hard to read when multiple Shaders and keywords are added
- Regression for "WebGL build is missing "malloc" and "free" functions when passing "-sERROR_ON_UNDEFINED_SYMBOLS=0" to emscriptenArgs"
Add comment