Pauan / blender-rigid-body-bones

Blender Addon which adds rigid body / spring physics to bones
126 stars 9 forks source link

Weird unintended scaling effect. #7

Closed DubiousHam closed 3 years ago

DubiousHam commented 3 years ago

Heya! love the addon! huge time saver.

but I've had an issue recently. when switching between pose and object mode, the bones on her ears will Scale and distort oddly. almost as if there Parent object has been scaled or skewed.

770fc440606596664e4ab9ec2db430ac

i can't seem to find the parent of the rigidbody joint to see if thats the case. and even if i did, any fixes i make would just be undone by the addon itself i imagine.

i haven't scaled any one of her control bones. there isn't really an animation yet, so that can't be an issue. it is my understanding that you can move and rotate the Active bones around. only on frame 1. but i suspect that might be the source of the issue here.

any idea what I'm doing wrong here?

also have ya ever thought about putting this up on some market place so we can support the development of the addon financially?

Pauan commented 3 years ago

I haven't run into that problem on any of my projects. Could you please attach your .blend file? That would make it a lot easier for me to find the problem. You can cleanup any unnecessary things if you want. If you would prefer to keep it private, you can e-mail it to me (pauanyu+github@pm.me)

Pauan commented 3 years ago

Okay, so there's two issues here:

  1. You have a bunch of errors, because a non-Active bone cannot have an Active parent. It shows you in the Armature panel which bones are wrong.

    You can fix it by either making those bones Active, or by changing their parent (so they are no longer a child of an Active bone).

    If you change the parent, then the child bone will no longer influence its old parent. If you still want it to influence the parent, you can use the Constraints panel to create a constraint between the two bones. You can see the IK.blend or Constraints.blend examples for how to do this.

  2. Even after fixing the broken bones, the scale issue was still there. There was a minor bug with the bone matrixes, I have fixed that with version 1.6.1, thanks for the report.

DubiousHam commented 3 years ago

thanks so much!

oh right! yeah i couldn't find any documentation on what those errors in the panel meant. yeah now that ya mention it yah i had some fluff control bones on her ears 🤔

but that wasn't the cause of my specific issue?

so just for future reference, what errors occur by having a non active bone be the child of an active bone?

i can't really notice any errors caused by it myself. but i may just be ignorant.

Pauan commented 3 years ago

In the Rigid Body panel it will say Children of Active must be Active for the incorrect bones. Unfortunately it can't explain in detail, because it has to fit in a small panel.

The reason you can't have non-Active children is because that will cause a circular dependency in Blender (because the Active parent automatically moves, which then moves the child, but the child isn't Active so it can't move).

So when the addon detects that situation, it disables the child bone. That fixes the circular dependency, but it means the child bone won't behave properly.

but that wasn't the cause of my specific issue?

That's correct, the add-on was incorrectly applying the bone's parent matrix. This only happens in extremely rare situations, which is why I hadn't noticed it before (even after a lot of testing).

DubiousHam commented 3 years ago

ah! so basically. i hadn't noticed an issues with that because i haven't had to animate in a situation where that was the case. i would have noticed an issue the second i tried to use those floof controls. Gotcha! Thanks again man!