Hello, I need tips for rigging accordion.
Here is the video how accordion works in case you don't know. Keyboard part is always static, bellows are attached both to keyboard and bass part, and bellows can be rotated and streched by pulling and pushing back bass part.
Knowing that, my logical solution is to have root bone at keyboard part so it can rotate whole instrument. Bellow is rigged and parented to keyboard, and bone on bass should be IK so by moving it with hand, you scale and shear automatically. However, I am a new with spine, and most of tutorials I found are for the characters, humanoids, cloth and so on. This is when I rotate nested bones of bellow.
As can be seen here, this places where I marked should always be connected to keyboard part and bass part, not to be moved. How to achieve that, put bones there and make them somehow static just be parenting them, and weight painting those edges of mesh?
I come from Blender so I know thing or two about rigging but it's bit different.
I know it's a lot of to cover, thanks in advance for help!
Rigging accordion
To rig an accordion in Spine, you can follow a logical setup similar to what you described. Start by creating a root bone at the keyboard part to allow the entire instrument to rotate. The bellows should be rigged with bones that are parented to the keyboard, ensuring that the edges of the bellows remain connected to both the keyboard and bass parts. You can achieve this by using weights to bind the mesh to the bones, ensuring that the vertices at the edges have a strong influence from the bones at the keyboard and bass parts. For the bass part, you can use an IK constraint to allow for movement that scales and shears the bellows as you pull and push it. This setup will help maintain the static nature of the keyboard and bass parts while allowing the bellows to stretch and rotate appropriately.
If you don't mind sharing the images I'd be happy to give it a shot! I think it could be kept very simple with just two bones and a denser mesh but I'd like to be able to test it out.
Good morning Erika,
Here it is. I tried both cuting it in Photoshop and importing also, having it as single image. I figured out it's better to have it as one because later you can crop it in Spine, in my opinion.
Here's a quick and super simple example, let me know if it's what you were going for or if there are issues!
Erika Wow how is this simple and effective. Makes sense however, but my first thought was that I need few bones for every part. It works fine, I just edited weight paint so keyboard is not affected, only bellow. I am gonna try make man playing it, we will see how it works. Maybe gonna need few answers more, thanks for time!
Weights alone can get you quite far in many cases. Eg:
https://esotericsoftware.com/spine-tips#21-cake