godotengine / godot

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

Incorrect mesh deformation during animation in 3D model DAE #25806

Closed N8n5h closed 4 years ago

N8n5h commented 5 years ago

Godot version: v3.1.beta.custom_build.be98a6e

OS/device including version: OS: Ubuntu 18.04.1

Issue description: Incorrect mesh deformation during animation original in Blender The model and the animation (from Mixamo) were imported to Blender as fbx (Default + Ignore Leaf Bones + Automatic Bone orientation), and then exported to Godot with no changes, with the better-collada-exporter and this settings

Blender version: 2.79 2018-03-22 14:10 f4dc9f9d68b better-collada-exporter addon: build from 2019-02-11 13∶23

Minimal reproduction project: testing1.zip (Blender file) testing-godot-project.zip

Juankz commented 5 years ago

I believe this is an issue with the collada exporter. Try exporting with the resting pose.

N8n5h commented 5 years ago

I believe this is an issue with the collada exporter. Try exporting with the resting pose.

I tried that but then the animation won't play, the character will stay in T-pose

Juankz commented 5 years ago

As a work around. Import the working animation as a separate file and then add it to the T pose exported model.

Or export to gltf, I haven't seen this issue with gltf models, only dae.

Still this is a bug that harms the workflow considerably

N8n5h commented 5 years ago

As a work around. Import the working animation as a separate file and then add it to the T pose exported model.

Please, can you elaborate the steps to do that?

Juankz commented 5 years ago

I'm writting this from memory, hope I don't miss anything:

  1. Export animated model
  2. Inside Godot select the .dae and go to the import panel, search for animation and change from builtIn to Files (or external, I don't remember the exact name). This generates a new file in your file system. By default is something like default.anim
  3. Export model with T-pose
  4. Import T-pose model, select its animation player and load the animation file from step 3 using the bottom panel
N8n5h commented 5 years ago

I tried that but I didn't get it to work as expected. The animation still doesn't work and the scale and the rotation is messed up.

Update: Ok, I managed to get it working now. I didn't notice I only exported the rig for the animation file without the mesh. But I tried again this time exporting it with the mesh and it works.

N8n5h commented 5 years ago

Any progress on this? There are a few issues I found that I cannot report yet because they might be related to the workaround for this issue...

fire commented 4 years ago

I wasn't able to get dae working in blender 2.81.

However gltf2 in blender 2.81 and with https://github.com/KhronosGroup/glTF-Blender-IO/pull/857.

worked.

editor_screenshot_2020-01-10T151316-0800

testing1.zip

fire commented 4 years ago

If you want we can close this issue, I don't know how much more work will be done to maintain the Collada importer.

jitspoe commented 4 years ago

If you still want to use collada, there are a couple forks of the better collada exporter that work in newer blenders. I think they also fix the issue described in this bug (it was an exporter issue, not an engine issue).

https://github.com/HungryProton/collada-exporter-2.8 https://github.com/artellblender/collada-exporter-2.8