Page 1 of 1

Positional Bone Constraints

Posted: Sun Jan 17, 2021 3:56 am
by SimplSam
You may have seen a number of demos of face and head rigs (like below), where bones are used as joysticks to manipulate a puppets features.

It would be groovy if we could have a new Bone Distance Constraint that would allow us to constrain the maximum distance a bone can travel from its partner origin bone, and thus could limit the drag area of the control bone.

The relationship could be flipped to only allow the controlled child bone within a certain distance of the origin bone. Or the child should be forced to stay at a fixed distance, but rotatable around the radius. Allowing it to follow a fixed circular path, or follow its target from an offset. Blender has a similar feature, and this could be thought of as a type of extension of the target bone system.

This may help in multiple rigging and animating situations to prevent folds etc, or enforce body joint rules.

So the options would be:
- Free movement within a fixed radius
- Movement at a fixed radius / follow at a fixed radius
- Movement only outside a fixed radius

I have included some demo content from Troy and Majid below:


Content courtesy of:
Troy Picou "Creating Rig Controllers in Moho" - https://www.youtube.com/watch?v=Z5Ay6hfVxas
Majid ShirAli Animation "Robin hood Head turning - Moho pro 12 ( Anime Studio )" - https://www.youtube.com/watch?v=SAxRZXxiRpI

Re: Radial Bone Distance Constraints

Posted: Sun Jan 17, 2021 1:47 pm
by Daxel
I like it. I don't need it right now but it is a simple and useful feature to have.

Re: Positional Bone Constraints

Posted: Sat Jun 17, 2023 1:21 am
by SimplSam
I have now created a proof-of-concept demonstration for the operation of Positional Bone Constraints

The bones are otherwise normal, but have their position constrained either relative to their frame 0 position, or to the position of their parent bone.

Linear constraints are X, Y (rectangular), and Radial are based on a radius (circular). The constraint is enforced purely during Edit/Animate - using a modified version of the Bone Transformation tool.


Re: Positional Bone Constraints

Posted: Sat Jun 17, 2023 3:40 am
by synthsin75
That looks amazing, Sam! I've been meaning to try doing that myself. I was planning to use other bones to define the max x/y motion. Hadn't even thought of doing a minimum or radial.

You could possible enforce the minimum offsets...without a layerscript anyway...by keyframing each frame (or frame intervals) between the currently keyed frame and the last key.
The difficult part would be if you then tried to key a frame in between those two.

Re: Positional Bone Constraints

Posted: Sat Jun 17, 2023 1:10 pm
by lucasfranca
SimplSam wrote: Sat Jun 17, 2023 1:21 am I have now created a proof-of-concept demonstration for the operation of Positional Bone Constraints

The bones are otherwise normal, but have their position constrained either relative to their frame 0 position, or to the position of their parent bone.

Linear constraints are X, Y (rectangular), and Radial are based on a radius (circular). The constraint is enforced purely during Edit/Animate - using a modified version of the Bone Transformation tool.

I've mentioned this before here on the forum and I think it would really be a huge improvement for riggers and animators to not be lost and keep things more organized. If this were implemented I would be very happy! A friend already did a similar demo with a layer script once.

Would these factors all be added in the bone constraint window? How did you show it there?

Re: Positional Bone Constraints

Posted: Sat Jun 17, 2023 2:41 pm
by SimplSam
synthsin75 wrote: Sat Jun 17, 2023 3:40 am ...You could possible enforce the minimum offsets...without a layerscript anyway...by keyframing each frame (or frame intervals) between the currently keyed frame and the last key.
The difficult part would be if you then tried to key a frame in between those two.
Definitely trying to avoid layer scripts, smartbones and baking. Hopefully (if ever implemented), something can be done behind the scenes - like Follow Path to resolve the issue.

Re: Positional Bone Constraints

Posted: Sat Jun 17, 2023 2:54 pm
by SimplSam
lucasfranca wrote: Sat Jun 17, 2023 1:10 pm ... Would these factors all be added in the bone constraint window? How did you show it there?
Yes. It would need some accompanying settings in the Bone Constraints panel (with additional supporting Bone property variables).

For the demo I used the following (for example) - which was set in the code depending on the Bone name.

Bone YY - Radial

Code: Select all

    self.posConstraintMode = self.POS_CONSTRAIN_RADIAL
    self.posConstraintMin:Set(0, 0)
    self.posConstraintMax:Set(.5, .5)
Bone X - Linear with no up/down movement

Code: Select all

    self.posConstraintMode = self.POS_CONSTRAIN_LINEAR
    self.posConstraintMin:Set(0, 0)
    self.posConstraintMax:Set(.18, 0)