Two bone rig + bone parented to it with independent angel - glitch when unparent.

Discuss Moho bugs (or suspected bugs) with other users. To report bugs to Smith Micro, please visit support.smithmicro.com

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
formxshape
Posts: 31
Joined: Fri Mar 10, 2017 2:05 pm

Two bone rig + bone parented to it with independent angel - glitch when unparent.

Post by formxshape »

So if you have a simple arm rig of two bones, just drawn as normal. Then you have a third bone that you parent to the last bone of that arm right, set it to independent angle. Imagine an arm holding something that has its own angle you want to animate, ballon for example.

Now when you animate and you want to have the character let go of the balloon, so you un-parent that 3rd bone - hmm.. angle goes funny, rotation is off. No problem try to rotate it at the place the 'un-parent' keyframe is - and it won't rotate.

I think something is going on with the maths as the angle goes crazy high like 700+
User avatar
hayasidist
Posts: 3525
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Two bone rig + bone parented to it with independent angel - glitch when unparent.

Post by hayasidist »

formxshape wrote: Thu Apr 20, 2023 7:38 pm So if you have a simple arm rig of two bones, just drawn as normal. Then you have a third bone that you parent to the last bone of that arm right, set it to independent angle. Imagine an arm holding something that has its own angle you want to animate, ballon for example.

Now when you animate and you want to have the character let go of the balloon, so you un-parent that 3rd bone - hmm.. angle goes funny, rotation is off. No problem try to rotate it at the place the 'un-parent' keyframe is - and it won't rotate.

I think something is going on with the maths as the angle goes crazy high like 700+
I'm not seeing the "can't rotate at the un-parent" keyframe (IOW I can rotate the bone I set up in the 3-bone test rig). Do you have other bones in there or other constraints?

as for the "weird angle" -- I don't think that's a problem. The bone angle of a parented bone is relative to its parent; but an un-parented bone has an absolute angle. e.g. a bone that looks as though it's pointing up at 90 degrees might actually have a 270 angle if its parent is at 180 (180+270 = 450; 450-360 = 90) and it's the 450 that gets "kept" when the parenting is released. Without seeing the file, I can't comment exactly, but I can readily imagine a set of parent / child angles that could give an unparented value of 700+
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: Two bone rig + bone parented to it with independent angel - glitch when unparent.

Post by Daxel »

I'm not sure about the "not being able to rotate the bone" part, but regarding the unexpected angle change, I think that happens when you turn independent angle off, not when you unparent the bone.

I just did a test and unparenting the balloon bone doesn't cause any change on the bone perceived angle or direction, only on the numerical value of the angle, which is expected because the numerical value was relative to its parent.

But when you turn independent angle off, then the perceived angle actually changes. That is not exactly a bug but it is an inconvenience. It would be more practical if Moho could automatically adapt the angle when turning independent angle on or off. I think that is exactly what this is script is for (didn't test it myself): https://mohoscripts.com/script/ae_fixedangle
User avatar
synthsin75
Posts: 9975
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Two bone rig + bone parented to it with independent angel - glitch when unparent.

Post by synthsin75 »

Since independent angle isn't animateable, there's no point in the timeline where you'd need to transition from on to off.
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: Two bone rig + bone parented to it with independent angel - glitch when unparent.

Post by Daxel »

synthsin75 wrote: Fri Apr 21, 2023 1:35 am Since independent angle isn't animateable, there's no point in the timeline where you'd need to transition from on to off.
Ah, you are right. The script seems to adapt the whole animation when you turn it on or off if I understood correctly this time. It says "Fixes all the angle animation both in Mainline and actions to not to change after Independent angle value flipped".

Then I don't know how the angle changes after unparenting. Sorry for adding confusion. Try sharing a project file.
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: Two bone rig + bone parented to it with independent angel - glitch when unparent.

Post by Daxel »

Ah, I got it. You are using angle constrains on the "balloon" bone. Then when you unparent the bone, the direction of the bone should remain the same just with different angle values, but because the angle constrains don't allow the bone to have the different angle value to retain it's direction, the bone gets stuck in one constrain limit or the other, and you can't rotate it.

However, I found a workarround. You think you can't rotate the bone, but you actually can. Just try to rotate it normally, with the transform bone tool, and keep making circles with your mouse even if the bone stays still. It will eventually catch up with the angle that is inside the constrain interval and the bone will rotate.

Doesn't look like bug but yeah I guess Moho could do something under the hood to make these two features (animated unparenting and angle constrains) work better together.

I'm guessing that the angle constrains work taking the bone angle at frame 0 (for example 50º) and substracting/adding the constrains, so if the constrains are -20 +20, the interval would always be from 30º to 70º. So when you unparent the bone at frame 24, the bone tries (but fails because of the constrains) to retain its direction changing it's angle value that could be now 190º for example but the valid interval keeps being the same, so the bone is now out of the valid interval and is stuck. If moho under the hood could update the valid interval variable when the unparenting of a bone happens, and calculate it from the new angle, I guess that should work. But maybe it's not that simple.
Last edited by Daxel on Sat Apr 22, 2023 6:49 pm, edited 1 time in total.
User avatar
hayasidist
Posts: 3525
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Two bone rig + bone parented to it with independent angel - glitch when unparent.

Post by hayasidist »

Daxel wrote: Sat Apr 22, 2023 11:41 am ... However, I found a workarround. You think you can't rotate the bone, but you actually can. Just try to rotate it normally, with the transform bone tool, and keep making circles with your mouse even if the bone stays still. It will eventually catch up with the angle that is inside the constrain interval and the bone will rotate. ...
or just type the number you want into the "angle" field in the transform bone tool?!
Daxel
Posts: 996
Joined: Wed Mar 27, 2019 8:34 pm

Re: Two bone rig + bone parented to it with independent angel - glitch when unparent.

Post by Daxel »

hayasidist wrote: Sat Apr 22, 2023 12:35 pm
or just type the number you want into the "angle" field in the transform bone tool?!
No, that won't work if the bone is outside of the valid interval. The number will go back to it's previous value even if you try to change it. But making a circle with the mouse is still fairly easy and well, it works.
Post Reply