godot: MeshLibraries don't preserve editor-created materials
Godot version:
3.0.6 (self-built from commit 8ac39d886307d76c286e804e027fc39f6b5aaac6)
master
(commit 8dd00ed1762c4956b3231d709ce0d01ee9b306c8)
OS/device including version:
Arch Linux (4.19.4-arch1-1-ARCH, Mesa 18.2.5-1)
Issue description:
Materials on editor-created meshes are not preserved in a MeshLibrary created via “Convert To -> MeshLibrary”. It sounds very similar to what was happening in #1239, but I’m not sure it’s the same issue.
Steps to reproduce:
- Create scene with a root node and a child MeshInstance where mesh is created via “New PlaneMesh”
- Create a SpatialMaterial for mesh, set Albedo to (255,0,0)
- Save scene, then “Convert To” -> “MeshLibrary…”
- Create GridMap in new scene, using the MeshLibrary created in Step 3 as theme.
- Place the plane on grid
Expected: A red plane Result: A white plane
Minimal reproduction project: gridmap_material_issue_example.zip
** Additional Information: **
master
build printed out the following after executing Step 3:
ERROR: create_from_image: Condition ' p_image.is_null() ' is true.
At: scene/resources/texture.cpp:191.
ERROR: texture_get_data: Condition ' !texture->active ' is true. returned: Ref<Image>()
At: drivers/gles3/rasterizer_storage_gles3.cpp:1033.
ERROR: _write_resource: Resource was not pre cached for the resource section, bug?
At: scene/resources/scene_format_text.cpp:1369.
And the following after Step 4:
ERROR: create_from_image: Condition ' p_image.is_null() ' is true.
At: scene/resources/texture.cpp:191.
ERROR: texture_get_data: Condition ' !texture->active ' is true. returned: Ref<Image>()
At: drivers/gles3/rasterizer_storage_gles3.cpp:1033.
ERROR: texture_get_data: Condition ' !texture->active ' is true. returned: Ref<Image>()
At: drivers/gles3/rasterizer_storage_gles3.cpp:1033.
ERROR: texture_get_data: Condition ' !texture->active ' is true. returned: Ref<Image>()
At: drivers/gles3/rasterizer_storage_gles3.cpp:1033.
ERROR: texture_get_data: Condition ' !texture->active ' is true. returned: Ref<Image>()
At: drivers/gles3/rasterizer_storage_gles3.cpp:1033.
ERROR: texture_get_data: Condition ' !texture->active ' is true. returned: Ref<Image>()
At: drivers/gles3/rasterizer_storage_gles3.cpp:1033.
ERROR: texture_get_data: Condition ' !texture->active ' is true. returned: Ref<Image>()
At: drivers/gles3/rasterizer_storage_gles3.cpp:1033.
ERROR: texture_get_data: Condition ' !texture->active ' is true. returned: Ref<Image>()
At: drivers/gles3/rasterizer_storage_gles3.cpp:1033.
ERROR: texture_get_data: Condition ' !texture->active ' is true. returned: Ref<Image>()
At: drivers/gles3/rasterizer_storage_gles3.cpp:1033.
ERROR: texture_get_data: Condition ' !texture->active ' is true. returned: Ref<Image>()
At: drivers/gles3/rasterizer_storage_gles3.cpp:1033.
ERROR: texture_get_data: Condition ' !texture->active ' is true. returned: Ref<Image>()
At: drivers/gles3/rasterizer_storage_gles3.cpp:1033.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17 (8 by maintainers)
I don’t see why this has been closed. I just started getting into Godot and this is a huge turnoff. I really don’t fancy creating ten meshes that are exactly the same just because I want to use the same cube with a different texture in my gridmap.
Love Godot, but this issue, while having workarounds, is still and issue. I don’t see why it has been closed either.
I understand concerns about closing this issue. But strictly speaking this one is solved. The problem is more the improvements needed to the feature in general, and AFAIK it will be worked on, I hoped on 3.2 but may be delayed, depending on volunteers will, and patreons + community votes (perfectly fine for me). I abandoned completely the use of this feature for now as I found using procedurally generated mesh more fit to my project.
Clarified this in documentation here: https://github.com/godotengine/godot-docs/commit/f118ce32137ba57174def4e0e8290e11a3e85c9c Also, errors shown before no longre happen, so closing this.