godotengine / godot

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

Mesh gets deformed when running animation #33057

Open Antokolos opened 5 years ago

Antokolos commented 5 years ago

Godot version: 3.2 Alphas 1,2,3

OS/device including version: WIN 10

Issue description: Mesh gets deformed when running animation

Steps to reproduce: Open attached Godot project Open scene rat_grey.escn Run animation 'rat_sits_down_scratchinh' Mesh is deformed during animation: image

Minimal reproduction project: test2.zip

danilw commented 5 years ago

this is same as my bug, you can fix it easy by code(in godot) if you need make it work right now (read my bug post) https://github.com/godotengine/godot/issues/32097

fire commented 5 years ago

Will spend some time investigating.

fire commented 5 years ago

Can you trial using the beta Blender 2.81 gltf/glb export and the Godot 3.2 alphas?

Edited:

https://builder.blender.org/download/

I believe blender escn export needs to be updated to use the new skinned skeleton engine feature.

Also be careful of https://github.com/godotengine/godot/issues/32766

Antokolos commented 5 years ago

@danilw , unfortunately I don't think it is the same bug, because this model works fine in 3.1.1 stable, the bug occured only in 3.2 alphas. @fire , thanks, we'll try it. But our previous experience with dae/gltf was not very good :) There were a lot of problems with animations, and after struggling with all that we found that escn exporter plugin works best for us.

fire commented 5 years ago

We rewrote massive portions of the GLTF2 importer and added a new skinned skeleton mesh engine support. So please try with the specified versions of blender and godot engine.

Antokolos commented 5 years ago

Well, we can try, but we have a lot of assets in escn format, reimporting them all via GLTF will be a massive monkey job task :( Maybe we should finish our project using 3.1.1 after all :( The issue is still reproduced in Godot 3.2 beta 1 image

fire commented 4 years ago

@Antokolos I'm working on a gltf2 exporter, so maybe you can get the data back into blender that way? https://github.com/godotengine/godot/pull/33904

Antokolos commented 4 years ago

@fire , did I understand correctly, I'll be able to export escn file to gltf2 format using this feature? Is it working in Godot 3.2? How can I invoke it? Or you are meaning that we should reimport our models to gltf2? In fact, we HAVE all needed models in Blender 2.79 and we CAN export all these models to gltf2, but, as I've said, there are LOTS of models in our project (236 escn files for now), so reimporting all these models as gltf would be undesirable. Probably we should stay with Godot 3.1.2 with this project and try gltf2 with our next project. And probably escn exporter indeed needs to be updated to use the new skinned skeleton engine feature in order to be usable with future Godot versions. @Jason0214 , what do you think?

fire commented 4 years ago

I would try to ship with your current technology stack.

Blender should be scrip-table to export all your required scenes as gltf.

There are multiple tools that do this https://github.com/TiliSleepStealer/blender-addon-fbx-bundle (has gltf support).

Antokolos commented 4 years ago

If we could get all current escns working as is, that would be splendid, thanks!

As for the scripting, probably that wouldn't be so easy in our case :) Most of our models are stored in one huge blender file for some reason, scattered here and there on different layers. Only our 3D designer knows where some particular model is located in this file.

I'll try to convince him to try using gltf2 in the future, though. The problem is, as I've said, that gltf2 models mostly didn't worked at all when we tried to use it in the past, so this format has bad reputation in our team. I believe that its usage was heavily reworked and we should should give him a chance, though.

Jason0214 commented 4 years ago

Hi @Antokolos , thanks for paying attention to escn-exporter, sorry I am not able to spend much time on developing the addon in the past few months. The addon is broken at several places with Blender2.81 and Godot 3.2 and I am starting to look at it. And I will try to make the skin work asap.

In the meantime, I think @fire's suggestion is very good. In the long run, gltf will be the better way to go, it is well specified and should be very stable once it is supported. escn is kind of a dump of godot scene, so it gets broken easily with updates of scene nodes. And I am not so involved in the development of Godot, which makes it even worse (apologize..) Hope you understand.

Antokolos commented 4 years ago

@Jason0214 , hey, no problem at all! Thank you for maintaning godot-blender-exporter, it was indeed very useful when we started working with 3D in Godot, because, as I've said, it was the only format which allowed as to export animations properly from Blender at this time.

fire commented 4 years ago

Godot 3.2 is released, can you provide a summary of what you did and maybe close the issue if there's nothing to fix.

Antokolos commented 4 years ago

On my end the animations are still broken for already existing escn models, but we already resigned to this fate :) It looks like that the current game will be finished on Godot 3.1.2, and the next one will be probably started with 4.0

Jason0214 commented 4 years ago

@fire Could you please leave this open. Haven't fix anything yet, basically escn exporter falls behind Godot's iterating, need bunch of work to get it back to track. Will respond when I make some updates.

Zireael07 commented 4 years ago

Same here, already existing escn got the animation broken.

fire commented 4 years ago

Can someone post to the status of this?

volzhs commented 4 years ago

it happens when importing deformed mesh by bones. to fix it, mesh should not be deformed with bones. it works with rest position. i don't know how hard it is to import mesh correctly even with deformed by bones, but that would be a great feature.

fire commented 4 years ago

This still happens in 3.2.3.stable.

Can you try to see if updates to ESCN have been made? It's not being maintained by the core developers enough due to lack of resources.