Search Issue Tracker
Fixed in 2019.3.X
Votes
1
Found in
2017.1.1p2
Issue ID
962277
Regression
No
'Optimize Mesh Data' does not consider materials assigned by scenes when deciding whether to remove vertex color data
Repro:
Phase 1 (demonstration of expected behavior)
1. Open the attached repro project.
2. Switch to PC/Mac/Linux standalone
3. Open the scene "SceneBundle/RainbowScene" and enter play mode in the editor.
4. You should notice that the ends of the rainbow fade out. This is done using vertex alpha in the FBX itself.
Phase 2 (demonstration of the problem)
5. Click the menu item "Build/Build Asset Bundles".
6. Switch to the "Loader" scene and enter play mode. This will use the assets in the bundles instead.
7. You should notice that the ends of the rainbow do not fade out. This is because the vertex alpha has been removed by the 'Optimize Mesh Data' player setting.
8. If you examine the FBX, you'll see that it has a default material with a default shader "Standard" selected, which does not apparently use vertex color data.
9. If you examine the FBX instance in RainbowScene, it has overridden its material and is using a different shader "StoryVille/AdditiveUIShine" which uses vertex color data.
Phase 3 (demonstration of workarounds)
10. Open "SceneBundle/RainbowScene" again.
11. Find "Map_Rainbow_01" in the scene and drag it anywhere inside the AssetBundle folder to create a prefab there.
12. Redo steps 5 and 6. You'll notice that the rainbow fades at the ends properly now.
13. Apparently, the existence of the prefab in the project is used at build time to inform the 'Optimize Mesh Data' process that the vertex colors are required, preventing them from being removed.
Expected: The FBX instance inside RainbowScene with its scene-overridden material should also inform 'Optimize Mesh Data' that vertex colors are required.
Reproduced in 2017.1.1p2, 2017.3.0b6, 2018.1.0a1
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- UI Text color is incorrect when text is rendered on SubMeshUI
- "Invalid SortingGroup index set in Renderer" errors when making many modifications in same frame
- Crash on GizmoBufferSizeHistory::GetBuffer() when opening a specific scene
- RenderTexture is not initialized when it is set as Material's Texture
- Branch node outputs a random value instead of a constant on the false conditon
Add comment