Rigid body / spring physics for bones

It’s basically feature complete, it’s well tested, and it’s very fast. But it could always use more testing (especially on real world projects).

It’s very safe and robust, but theoretically in very extreme situations it could mess up your bone’s parenting, so make backups of your .blend files!

Also, don’t add any objects into the RigidBodyBones collection, they will be deleted. In fact you just shouldn’t touch the RigidBodyBones collection at all.

Note that you need Blender 2.91.0 or higher, because of a severe bug in earlier versions of Blender.

7 Likes

I released version 1.2:

4 Likes

This addon looks incredible and super complete, I’m just starting to test it but it has a ton of options. Having said that, I had some problems.

  • If you active the bones in something different that frame 1 I think it offsets the position of the bone using the current frame and it just breaks (disabling and enabling rigid body, frame 1, fixes this)

Activating in frame 86

Going back to frame 1

  • If you have auto keyframe activated and no previous keyframes, the first move it’s gonna offset the dynamic bones.

  • Activating bones and pressing ctrl+z crashes blender (Tried it in a default config to see if it was conflicting with other addon)

  • Changing multiple bones to the min amount of weight 0.001 kg and pressing play crashed blender

  • I think the “disable collision” should be renamed to “parent collision” and shape to “shape collision” since at first it looks like the shapes are just guides

  • The default shape setting should be compound or capsule with 0.93 Y scale with rotation springs active since every other shape default setting has overlapping problems and at first glance it feels like the addon is wonky. This is more about first impressions

Those are all my findings for now, thank you very much for the addon it was just what I was looking for.

tested on: blender-2.91.0-02677ec4e0fa-windows64

This is a known bug in Blender:

I believe that is also a bug in Blender. I’ve had Blender crash many times with rigid bodies (even when not using this addon). The crashes seem to be random (but always when hitting Play).

Capsule only supports 2 dimensions, whereas box supports 3. Because “Disable collisions” defaults to true (and it should generally be left at true), there shouldn’t be any overlapping problems.

Why do you think that having springs enabled by default is better?

I’ll look into this.

1 Like

I had a feeling the crashes were gonna be blender side so there is no much to do there.

About the capsule instead of boxes I think the problem that I was having is specific to forked bones, it makes it collide the moment you press play.

The spring comment was in connection to the forked bone since it felt more stable with springs on so nevermind.

If you don’t mind me asking I was wondering if there are plans to implement or if it’s even possible to add subdivided bbone support and scale springs to get, in some instances, a more cartoony result.

Something like this, I used wiggle bones for the tip

Ty

Oh, that makes sense, since “Disable collisions” only applies to the parent, not siblings. So in that case you would have to resize the fork hitboxes so that way they don’t collide. Or you could move them to a different Collection (in Advanced).

I hadn’t thought of that, let me see if it’s possible.

1 Like

After investigating this, it’s not possible, because bbones cannot be changed individually, instead they are completely controlled by Blender.

However, you can achieve the same effect by simply subdividing the bones a few times (using Armature → Subdivide), and then copying the Rigid Body settings (using Pose → Rigid Body → Copy from Active):

As a bonus, this will also work with game engines, since it’s using regular bones.

4 Likes

I released version 1.3:

2 Likes

I encountered a small problem.

If there is no Rigid Body World created there is something like a 45 line error in console while changing modes with an armature selected. Creating the rigid world fixes the error.

Also if you get the previous error and delete that armature there is a new error that says it’s impossible to find the armature and the addon doesn’t let you activate the bones anymore.

#second error
Traceback (most recent call last):
  2.91\scripts\addons\Rigid Body Bones\utils.py", line 36, in update
    f(*args)
  2.91\scripts\addons\Rigid Body Bones\events.py", line 126, in next_tick
    utils.select_active(context, dirty.armature)
  2.91\scripts\addons\Rigid Body Bones\utils.py", line 169, in select_active
    obj.select_set(True)
RuntimeError: Error: Object 'Armature' can't be selected because it is not in View Layer 'View Layer'!

The first error is negligible so if you don’t delete any bones before activating the addon or creating a Rigid World it should be fine.

Other than that the addon works amazingly and as you said it saves a ton of time setting up rigs, since it does the heavy lifting you can even connect new constraints to rigid body ends and make puppet like animations. Thanks again!

2 Likes

Marionette 2.0

2 Likes

I released version 1.4:

2 Likes

I released a hotfix version 1.4.1:

4 Likes

I released version 1.5.0 (this is a big release):

2 Likes

Is it okay if I use your video for the README?

1 Like

Of course!

Here is the file in case it helps (use it however you want)

marionette test.blend (3.1 MB)

1 Like

I released version 1.6.0:

3 Likes

@Motiomancer Version 1.5.0 broke your marionette, because it no longer runs the simulation in Pose mode.

So in version 1.6.0 I added the ability to create constraints between whatever bones you want.

I used that to fix your marionette (which I added to the examples and README). And as a bonus, it can now be animated, since the string handles can now be keyframed.

1 Like

I really like the addition of the constrain option, it helps a lot!

After testing the new version (I was still using 1.41) for what I understand the state of bones and rigid body components is being stored and turned on and off in between object and pose mode so now its possible to change the starting position easily, which is great. Previously the only way to change the initial pose was, or editing the armature or deactivating rigid body and making the current pose the Rest Position.

The drawback of this is that you have to jump between object and pose mode to preview the changes since the rigid body constrains are deactivated. If the simulation needs fine tuning you are going to start feeling that extra step, this also applies to adjusting collisions.

So I was wondering if its possible to have a button to change the bones into “editable pose” and then press it again to go back into simulation instead of triggering it automatically with the mode change. That way everything can be done in pose mode.

If it can’t be done ignore what I said, the addon already does more than enough for me and I truly appreciate it.

I released version 1.6.1, which has a Pose mode simulation option (this behaves the same as it did in 1.5.0):

5 Likes

Its perfect, Thankyou!