I have a project where I procedurally generate a cylinder mesh that has a few deformities. The first deformity is supported by ArrayMesh and SurfaceTool where I can radially shrink and expand a CylinderMesh's width. Note: This cylinder is of varying length and segment count depending on some circumstances.
The other thing I want to do is procedurally bends in the cylinder. I thought of some ways to do this, but realized that in all likelihood the truly best way to do it would be to just have a skeleton that I can apply noise to.
I'll note that I initially thought that using a path and using a multi mesh might work but that doesn't seem to allow for a mutable mesh and instead just applies copies of one mesh along its path instead of something that is changed.
Anyways so it seems like there is no real support of a dynamic skeleton from what I can tell.
It seems like you can create bones and weights in a MeshArray using ARRAY_BONES and ARRAY_WEIGHTS. This is pretty undocumented as an API, but it seems as if it's somehow just a setup to link one or more bones to your vertices with different weights and NOT a method of adding or removing bones. It lacks any support of linking bones to each other, naming them or giving them a location.
As for just creating nodes, there is Skeleton3D, PhysicalBone3D and BoneAttachment3D. It seems like there is somehow some interface there, you can create the Skeleton, link it to the mesh, and add bones as children, but they don't show up under the skeleton's bones at all. It seems like configuring the PhysicalBone3D with a CollisionBody and setting its position and size etc etc is what we want to do, but again it just doesn't end up under bones. I'm also not completely sure how to create their relationships. I am pretty sure that the existing API doesn't even expect child bone nodes anyway, but for the skeleton to just be aware of bones via named bones from a mesh loaded from disk.
Any idea on how to programmatically add skeletons to meshes OR I guess how to bend cylinder meshes in a functional way?