godotengine / godot

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

Problems importing rigs generated with Rigify addon and animations using them #4112

Closed slapin closed 5 years ago

slapin commented 8 years ago

When importing 3D scene with character mesh made using Rigify addon, having several animations,

the following errors are printed to console and the import is not usable and animations are all distorted. this doesn't happen with simple skeletons made by hand.

flags: 98 flags: 98 flags: 98 flags: 98 flags: 98 flags: 98 ERROR: set_path: Another resource is loaded from path: res://characters/minigirl1.scn At: core/resource.cpp:177. SAVING TO: res://characters/minigirl1.scn SAVING: res://characters/minigirl1.scn SAVE PATH: ../minigirl1.dae SAVE MD5: 9e8697900a2f8f2fd412e4ad777816b6 ERROR: _surface_set_arrays: Index idx out of size (total_bones). At: drivers/gles2/rasterizer_gles2.cpp:2575. ERROR: _surface_set_arrays: Index idx out of size (total_bones). At: drivers/gles2/rasterizer_gles2.cpp:2575. settings changed ERROR: _surface_set_arrays: Index idx out of size (total_bones). At: drivers/gles2/rasterizer_gles2.cpp:2575.

akien-mga commented 5 years ago

Could you check if this is still reproducible in the current master branch, and if so provide a scene that triggers the issue?

Note for readers who also don't know what Rigify is, it's a Blender rigging extension: https://en.blender.org/index.php/Extensions:2.6/Py/Scripts/Rigging/Rigify

glaforte commented 5 years ago

I tested with Blender 2.79 Rigify, the Godot Better Exporter for Blender and the Godot 3.1/master. I could not reproduce the issue - it worked fine with my quick&dirty animated cylinder-human. I'll have to echo Akien 😄 -> @slapin Do you have a (small) Blender file that reproduces the issue?

slapin commented 5 years ago

OMG.

Simple models always worked.

  1. I currently able to export makehuman character with default skeleton fine. Works.
  2. If I add blend shapes at some stage memory issues happen, but that is currently out of my focus.
  3. Exporting rigify-based character imported from makehuman or modelled on my own produces animation errors. I guess that is because of large number of bones or because of incorrect bone parenting. As most major game engines do had some rigify issues (and resolved them by now) I guess some things remain. My rigify total bone count is 406 now with 265 deform bones. If you do not find any issue with exporting rigify characters anymore, I guess this can be closed. I no longer use Rigify and do another rigging approach so to have always correct parenting (never use any rig which breaks parenting for constraints) using skeleton proxy for IK/ragdoll so I'm good. As for generic rigify issues - I do not care anymore. As soon as en masse Godot dev will use 3D the bug might be opened again and debugged properly, now I can't spend too much time being only one finding bugs like this. I got my workarounds working.

For future reader - you will probably do not want to use rigify anyway, as IK/Ragdoll are not up to complex skeleton, so you will have to have simplified skeleton manually constrained to big skeleton. This way you can handle skeleton lods easier. You will need 2 skeletons - big one and small one. You will set them up as proxy. You can use character produced by Rigify for animating, deform-only skeleton for actual character and simple skeleton for IK/Ragdoll. You set up constraints for bones to repeat original motion. You export only proxy characters. This way you will have both animations and IK

On Thu, Dec 6, 2018 at 5:52 PM Guillaume Laforte notifications@github.com wrote:

I tested with Blender 2.79 Rigify, the Godot Better Exporter for Blender and the Godot 3.1/master. I could not reproduce the issue - it worked fine with my quick&dirty animated cylinder-human. I'll have to echo Akien 😄 -> @slapin https://github.com/slapin Do you have a (small) Blender file that reproduces the issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/godotengine/godot/issues/4112#issuecomment-444896428, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAX02sKHwc814BJZlLsAMyaGGLNgcyKks5u2S8_gaJpZM4H095P .

glaforte commented 5 years ago

@slapin Thanks for the update! I agree that this issue report should be closed and a new issue can be opened when someone re-triggers this issue (or any similar issue). Hopefully, we'll have a faster turn-around time in the future :)

akien-mga commented 5 years ago

Thanks to both of you for testing :)