godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.16k stars 97 forks source link

Implement skinning with MultiMeshInstance #1730

Open Arnklit opened 4 years ago

Arnklit commented 4 years ago

Describe the project you are working on: A fur add-on https://github.com/Arnklit/ShellFurGodot

Describe the problem or limitation you are having in your project: To generate the fur I'm using a shell method of generating many copies of the mesh. When the mesh is static I can use MultiMeshInstance and it works great, but when it's a skinned mesh I currently need to generate a single mesh of many copies of the original mesh and bind them all to the skeleton. This means I end up with really heavy skinning and I'm not getting the benefits of MMI where you can choose to only display some of the instances and I'm not able to use blendshapes, since that would make the generated mesh size even worse.

Describe the feature / enhancement and how it helps to overcome the problem or limitation: It would make my fur tool much more efficient and able to handle blendshapes.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams: MultiMeshInstance could simply have the same options as MeshInstance with skeleton, skin and blendshapes or it could be hidden and just available through API.

If this enhancement will not be used often, can it be worked around with a few lines of script?: I don't think there is any way to work around it. As far as I can tell there is no way to manually manipulate the mesh being given to the MMI in the same way as the MeshInstance deforms it with the skeleton.

Is there a reason why this should be core and not an add-on in the asset library?: I'm not sure about this, maybe it would be possible to do a GDNative or module version where I make my own version of MMI that supports this, but I wouldn't know how at this point.

fire commented 2 years ago

I support this. @Arnklit Do you have a good design? I recall the particle system modified this too.

ODtian commented 10 months ago

Currently we have 3 ways to skin.

I like the second way the most, advanced animation feature is important to skinning mesh, you may want full support for animation blending, ragdoll or even IK not just playing same animation, although syncing a lot of bone transforms maybe a challenge.

By the way here is a video to show how impressive instanced skinning mesh is, even on webgl.

fire commented 10 months ago

I agree with the proposal but I don’t know if its feasible. Someone needs to investigate