Godot: glTF 2.0 : Some meshes not loaded

Created on 19 Oct 2018  路  9Comments  路  Source: godotengine/godot

Godot version: #23138

OS/device including version: Win 10

Issue description:
I have many fbx models, since Godot is not supported FBX format, so I try to convert to glTF using https://github.com/facebookincubator/FBX2glTF and import it to Godot. The result meshes from the face is gone. Image on the right side is 3DBuilder from windows apps.
image
I try blender and import the glTF, meshes are fine but armature is broken.

Steps to reproduce:
Import this file unitychan.zip
This is UnityChan from unity, I don't know if this allowed. Tell me if not allowed, I will delete this file.

bug import

Most helpful comment

All 9 comments

Assuming this is the same file https://github.com/kaorun55/UnitySandbox/blob/master/ModelView/Assets/UnityChan/Models/unitychan.fbx blender is unable to open it either.

blender_2018-10-19_12-06-18

Here is the view from blender 2.8

Although this plugin has the same problem since it uses fbx2gltf, you might want to try it.

https://github.com/fire/com-chibifire-fbx-plugin/releases

Currently gltf anim has problems which I've done a fix for but it's 3.2 https://github.com/godotengine/godot/pull/22876.

yes, you are right, that's why I need to convert it to glTF, since blender FBX import has a lot of limitation when it comes from Maya. If you import the glTF to the Blender, it will be fine, but armature is broken.

The model is indeed imported correctly in blender, just the face rotation and scale is incorrect. You can select those parts and clear location, rotation and scale, then scale 0.01 and rotate x 90. The face return to correct location.

image

image

@bojidar-bg When I import any of the .gltf files from Kenney's free Nature Kit asset pack, the meshes do not appear in Godot 3.1 Beta 5. I am able to import the files into Blender without a problem and then export to .dae to import into Godot, though.

Here's an example of one of the files (with .txt appended to the file name so that I can upload it) (though I encounter the same problem with all of them):

tree_detailed.gltf.txt

The editor shows some variant of this error when I attempt import and/or changing import settings:

 core/os/file_access.cpp:560 - Condition ' !f ' is true. returned: Vector<uint8_t>()
 editor/import/editor_scene_importer_gltf.cpp:510 - Condition ' (int)(offset + buffer_end) > buffer.size() ' is true. returned: ERR_PARSE_ERROR
 editor/import/editor_scene_importer_gltf.cpp:510 - Condition ' (int)(offset + buffer_end) > buffer.size() ' is true. returned: ERR_PARSE_ERROR
 editor/import/editor_scene_importer_gltf.cpp:510 - Condition ' (int)(offset + buffer_end) > buffer.size() ' is true. returned: ERR_PARSE_ERROR
 editor/import/editor_scene_importer_gltf.cpp:510 - Condition ' (int)(offset + buffer_end) > buffer.size() ' is true. returned: ERR_PARSE_ERROR
 editor/import/editor_scene_importer_gltf.cpp:510 - Condition ' (int)(offset + buffer_end) > buffer.size() ' is true. returned: ERR_PARSE_ERROR
 servers/visual_server.cpp:969 - Condition ' array_len == 0 ' is true.
 scene/resources/mesh.cpp:796 - Condition ' len == 0 ' is true.
 scene/resources/mesh.cpp:928 - Index p_idx=-1 out of size (surfaces.size()=0)
 editor/import/editor_scene_importer_gltf.cpp:510 - Condition ' (int)(offset + buffer_end) > buffer.size() ' is true. returned: ERR_PARSE_ERROR
 editor/import/editor_scene_importer_gltf.cpp:510 - Condition ' (int)(offset + buffer_end) > buffer.size() ' is true. returned: ERR_PARSE_ERROR
 editor/import/editor_scene_importer_gltf.cpp:510 - Condition ' (int)(offset + buffer_end) > buffer.size() ' is true. returned: ERR_PARSE_ERROR
 editor/import/editor_scene_importer_gltf.cpp:510 - Condition ' (int)(offset + buffer_end) > buffer.size() ' is true. returned: ERR_PARSE_ERROR
 editor/import/editor_scene_importer_gltf.cpp:510 - Condition ' (int)(offset + buffer_end) > buffer.size() ' is true. returned: ERR_PARSE_ERROR
 servers/visual_server.cpp:969 - Condition ' array_len == 0 ' is true.
 scene/resources/mesh.cpp:796 - Condition ' len == 0 ' is true.
 scene/resources/mesh.cpp:928 - Index p_idx=-1 out of size (surfaces.size()=0)

I should note I was using the MacOS versions of Godot 3.1b5 on Mojave.

Your get such errors if you forget to copy the associated *.bin files. The internal godot filesystem seems to be broken, try to use the OS file manager to copy the gltf+bin files.

editor_screenshot_2020-01-09T132253-0800

Appears to import correctly.

Thanks for your contribution.

Was this page helpful?
0 / 5 - 0 ratings