Muscle Sim Bone Objects

Hey everyone. I’m new to this but I want to know just how much heavy lifting would be involved to implement this paper.

GitHub: Open-source code

What makes this different from normal posebones is that they are able to twist and collide. That would be really great for real-time muscle sim. I imagine going into pose mode, moving bones around and watching the muscle objects stretching and colliding to make accurate muscle deformations. These deformations could be applied to a surface mesh via linear blend skinning just like normal posebones.

There are two routes I can think of.

  1. Create a new object called a muscle that employs the above paper.

  2. Try to implement this with the existing PoseBone architecture by combining multiple posebones with constraints. ( This is very similar to B-Bones, perhaps the solver could make use of these. )

For number 2, I feel like a python module could be implemented. But I feel it would be better to code this in C as I would imagine it would be faster. In this, a “muscle” object would be a collection of posebones, like bendy bones, whose position, rotation, and scale would be calculated by VIPER. I think this would be the best method as constraints would carry over as would linear blend skinning.

Does this seem like something that could easily be done? Also, if one does not use CUDA should I expect this to still run at real-time speed?

1 Like

As with most simulations like this you can’t implement it as a bone in blender per se.

This is because you must simulate the muscles from their starting position to their current position to be able to use it. This means that you can’t pose a character without also simulating passage of time.
Our armature system is time indifferent which means that you can evaluate the armature on only the current frame and get a proper result.

So this would have to be a treated as our other simulation systems.
There are plans to have a “continuous” mode in the future where simulations can run in the background while you work with the blender scene. But as far as I know work on that has not started.

I don’t think you need or should add a new object type for this. From the paper it seems like it will work just like our cloth, soft body, or rigid body systems.

IE you add a physics modifier to a mesh object and it can start simulating.

Using the orginial code that is in CPP and using CUDA seems kinda vital for having a fast simulation as it seems like most of the speed touted in the paper comes from their GPU (CUDA) implementation.

5 Likes

I am so sorry for the ridiculously late reply…

I think having this interactive would be so cool though. To see the mesh bending and twisting because of the sim without having to do a bake would be wonderful.

I know you said they aren’t bones but it is easier for me to describe this using bones so excuse my use of the word :confounded:

I’m thinking you could allow the user to transform this “theoretical” deforming bone just like a normal bone. Driven with transformations on the key frames. However, the bone’s bodies (between the fixed endpoints, head → tail) would be transformed by the physics described in the paper. Removing the sims ability to adjust the overall transformation of the bone would greatly simplify the problem and would mean that one would only need to look at local key frames to the current frame to use the sim. The body of the bone could then drive the linear blend skinning.

This is why I was thinking something like bendy bones, but with this physics sim applied to the chain.

If I wanted to play with this, where is a good place to start?

This is the only thing I could find with “Pose Mode” label so far,

1 Like

Interesting topic here. I have done test using curves using and soft bodies for muscle simulations in Blender. My primary goal here was to see if blender could have dynamic topology with skin sliding.

Blender held up no problems. There are just a couple of things that were missing from the puzzle. The approach is definetly something worth looking into because the curve offers a simple rigging solution for artists.

The approach was inspired by the principle of drawing from the inside out. this approach is building the character from the inside out.

There are a couple of ways that this could be implemented into Blender.

  1. Geometry nodes
  2. Rigging nodes
  3. Apart of the Rigify toolset
  4. Ecorche Curve addon with isolated muscle groups
1 Like