Search Issue Tracker
By Design
Votes
0
Found in
2020.1.0b9
2020.2.0a7
2020.2.0a19
Issue ID
1269657
Regression
Yes
Generated lightmap has blocky artifacts when a Mesh is using generated lightmap UVs with Margin Method set to Calculate
How to reproduce:
1. Open the attached project named "odd_baked_gi_on_model01.zip"
2. Open the Scene01
3. Bake the Lighting
4. Observe the model in the Scene or Game view
Expected result: Lightmap generated for the Scene does not have any artifacts
Actual result: The generated lightmap is blocky and the model is covered by light and dark squares
Reproducible with: 2020.1.0b9(8.1.0), 2020.1.3f1(8.2.0), 2020.2.0a7(8.1.0), 2020.2.0a21(10.0.0-preview.26, 10.1.0-preview.7)
Not reproducible with: 2020.1.0b8(8.1.0), 2020.2.0a1(7.1.8), 2020.2.0a6(8.1.0)
Could not test with: 2018.4.26f1, 2019.4.8f1("Calculate" option for the Margin Method was introduced in 2020.1)
Notes:
1. The attached project is using URP
2. Graphics APIs tested: D3D11, D3D12, Vulkan
3. Artifacts start appearing when a certain threshold is reached for the Min Lightmap Resolution value
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
- Errors when rendering a camera to render texture with only depth
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
Resolution Note (2020.2.X):
We investigated the attached scene and found that the Calculate method is working as intended.
The idea with the Calculate margin method is that the user specifies the minimum lightmap resolution and min object scale with which the associated model is expected to be used. However, in the attached test scene the Min Object Scale was set to 1 in the ModelImporter but the actual object scale used in the scene was 0.0254 (see game object transform). This means that the actual object scale was smaller the Min Object Scale in the mesh importer and this leads to a violation of the assumptions made by the ModelImporter's UV unwrapper.
If we set the object scale to 1 the unwrap/bake worked as expected. Alternatively, you could set Min Object Scale = 0.0254.
This being said, we can understand why the user has a hard time understanding how to use this feature. Our docs and UX is simply not good enough. Firstly, the 2020.1 docs (https://docs.unity3d.com/2020.1/Documentation/Manual/LightingGiUvs-GeneratingLightmappingUVs.html) does not contain information about this feature. Secondly, the information available in 2020.2 docs are not particularly good, https://docs.unity3d.com/2020.2/Documentation/Manual/LightingGiUvs-GeneratingLightmappingUVs.html.
We have created tickets to ensure that the docs are improved in this area.