How to attach a SoftBody3D to an animated character mesh

Godot Version

Godot 4.2.1 stable

Question

The character in my game has a cloak which I am using a softbody3d to simulate. The cloak is divided into two sections with the hood and sleeve being rigged and animated, and the cape section being driven by the softbody simulation. (See image for reference)


My question is how do I attach the softbody section to the animated section such that there’s no gap in the cloak? My initial idea was to have a separate armature with bones along the seam and use the child of constraints in Blender to have the bones follow the vertices and then use these bones as the attachment points, but the constraints don’t transfer over into Godot.
Basically, I need the pinned points of the softbody to follow the animation while the rest is simulated.

1 Like

Hello everyone, I am also interested in this as I would like to add SoftBody clothes to my character.
@musicgun47 Have you been able to find an integrated solution or maybe a workaround ?

I’ve pretty much shelved this issue for the moment as it’s not an essential part of the implementation, and as such have been working on other parts of the game that are more important at this stage.

However, I do think I may have found the solution, but I have yet to test it to see if it works so…

Essentially what I would do in my case is have the entire cape as one object and rig it to the skeleton as normal. Then you’d import the cape separately as a softbody3d and add it as a child to the skeleton. The important property that needs to be set is the Skin property under the MeshInstance3D. This is what tells the engine how to animate the mesh. As far as I can see, having this set will tell the engine to animate the mesh according to the animations and then the soft body simulation should take over for all un-pinned points.

As I said, I haven’t tried this so I’m not sure if it will work, but theoretically it should. Unfortunately, the Skin resource is completely undocumented, but based on the name and a bit of digging in the source code, this should be correct. Also, I haven’t fully worked out the import process to get this to work yet, so still a bit of experimenting required to work out a proper pipeline for this sort of thing.