godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.31k stars 20.24k forks source link

Crash importing gltf file with animated bones from Cinema 4D #30587

Closed orestiskon closed 5 years ago

orestiskon commented 5 years ago

Godot version: 3.1.1

OS/device including version: Windows 10 Pro, Version 1803 CPU: Ryzen 7 1700X GPU: Vega 64

Issue description: I exported this file from Cinema 4D using the official plugin: https://labs.maxon.net/?p=3360 to try importing character animation with joints in Godot.

It crashes on Import. The file loads and plays on Babylon.js sandbox

Steps to reproduce: Load the attached project file, or try the gltf file alone found in the "GLTF Model" subfolder. It crashes when trying to import it.

Minimal reproduction project: Test project for gltf.zip

kruglinski commented 5 years ago

3D assets pipeline in Godot are extremely unfriendly !!!

I stuck in same problem for a while doing so many attempt, finally I found a way to import animated bones.

1.modeling, animating in C4D 2.export as fbx (use 2011 version format, choice on export dialog window), use bake frames option 3.import the fbx file to blender and play test animation to see if it is ok 4.export as dae use offical better collada plugin 5.import the dae to Godot

qarmin commented 5 years ago

Backtrace:

[1] /lib/x86_64-linux-gnu/libc.so.6(+0x43f60) [0x7f9e9a19df60] (??:0)
[2] CowData<EditorSceneImporterGLTF::GLTFNode*>::get(int) const (/home/rafal/Pulpit/godot/./core/cowdata.h:151 (discriminator 7))
[3] Vector<EditorSceneImporterGLTF::GLTFNode*>::operator[](int) const (/home/rafal/Pulpit/godot/./core/vector.h:85)
[4] EditorSceneImporterGLTF::_generate_bone(EditorSceneImporterGLTF::GLTFState&, int, Vector<Skeleton*>&, Node*) (/home/rafal/Pulpit/godot/editor/import/editor_scene_importer_gltf.cpp:1811 (discriminator 2))
[5] EditorSceneImporterGLTF::_generate_scene(EditorSceneImporterGLTF::GLTFState&, int) (/home/rafal/Pulpit/godot/editor/import/editor_scene_importer_gltf.cpp:2150)
[6] EditorSceneImporterGLTF::import_scene(String const&, unsigned int, int, List<String, DefaultAllocator>*, Error*) (/home/rafal/Pulpit/godot/editor/import/editor_scene_importer_gltf.cpp:2266)
[7] ResourceImporterScene::import(String const&, String const&, Map<StringName, Variant, Comparator<StringName>, DefaultAllocator> const&, List<String, DefaultAllocator>*, List<String, DefaultAllocator>*, Variant*) (/home/rafal/Pulpit/godot/editor/import/resource_importer_scene.cpp:1288)
[8] EditorFileSystem::_reimport_file(String const&) (/home/rafal/Pulpit/godot/editor/editor_file_system.cpp:1783)
[9] EditorFileSystem::reimport_files(Vector<String> const&) (/home/rafal/Pulpit/godot/editor/editor_file_system.cpp:1979 (discriminator 3))
[10] EditorFileSystem::_update_scan_actions() (/home/rafal/Pulpit/godot/editor/editor_file_system.cpp:593)
[11] EditorFileSystem::_notification(int) (/home/rafal/Pulpit/godot/editor/editor_file_system.cpp:1166)
[12] EditorFileSystem::_notificationv(int, bool) (/home/rafal/Pulpit/godot/editor/editor_file_system.h:108 (discriminator 14))
[13] Object::notification(int, bool) (/home/rafal/Pulpit/godot/core/object.cpp:945)
[14] SceneTree::_notify_group_pause(StringName const&, int) (/home/rafal/Pulpit/godot/scene/main/scene_tree.cpp:973)
[15] SceneTree::idle(float) (/home/rafal/Pulpit/godot/scene/main/scene_tree.cpp:519 (discriminator 3))
[16] Main::iteration() (/home/rafal/Pulpit/godot/main/main.cpp:1934)
[17] OS_X11::run() (/home/rafal/Pulpit/godot/platform/x11/os_x11.cpp:3177)
[18] godot(main+0x128) [0x13a35ca] (/home/rafal/Pulpit/godot/platform/x11/godot_x11.cpp:57)
[19] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xeb) [0x7f9e9a180b6b] (??:0)
[20] godot(_start+0x2a) [0x13a33ea] (??:?)
marstaik commented 5 years ago

This has been fixed earlier today by #32213

The linked test project imports correctly now: running_man