• Editor
  • Transform Constraints Relative Option

Hey I am making a video tutorial about transform constraints and want to fully understand the relative property

First of all, I rarely use it, in general I use very little complex setups, but as of now I know that turning on Relative is exactly the same if we just clicked Match and went without Relative option

Please correct me if I am wrong

Related Discussions
...

The Relative property in transform constraints modifies the constrained bones by adding the target bone's transform to the constrained bone's transform before the constraint is applied. This means the resulting transform is relative to the constrained bone's original transform.

When Relative is unchecked, the constrained bones' transform is modified to match the target bone's transform directly, meaning the original transform of the constrained bone has no effect when the mix is 100%.

Using the Match button sets the offset sliders to match the current transform of the first constrained bone, effectively making the constrained bone's transform match the target bone's transform at that moment. This can be seen as a one-time adjustment, whereas the Relative option continuously applies the target bone's transform relative to the constrained bone's original transform.

In summary, Relative continuously adds the target bone's transform to the constrained bone's original transform, while Match sets a fixed offset based on the current transform.

Yes thanks for explaining that was very clear. Actually the tooltip is also very clear but its hard to understand the actually use of it, so when I don't use it I very much forget what it does..

so if bone(A)(to be constrained) is at (-50,50) and target - at (0,0) coordinates

their difference is 50,50 so new position after constraining with Relative checked will be (-50+50, 50+50)? But No, bone A stays where it was -50,50g

  • Nate ответили на это сообщение.

    warmanw their difference is 50,50 so new position after constraining with Relative checked will be (-50+50, 50+50)? But No, bone A stays where it was -50,50g

    No, why did you use the difference? The result is (-50,50) + (0,0).

    Say you have a transform constraint with Relative checked, 1 bone constrained named constrained, the target is named target, the translate X and Y mixes are 100, and the offsets are all 0. The target position is added to constrained. It works the same for rotation, etc. You can add it in local or world space by using the Local checkbox. You can use offsets so the target can be at some other position and have no effect eg constrained bone position + target position + offset.

    Relative is for when you want to add the target transform to the constrained bones. It allows the constrained bones to be transformed around as normal, but still be affected by the target bone.

    When Relative is unchecked, the target transform overrides the constrained bone's transform. You can use mixes to get an effect in between, but that can have issues with rotation jumping to the shortest rotation between the two. When Relative is checked, since 4.2.40-beta you won't get the rotation jumping around when the mix is between 0 and 1.

    No, why did you use the difference? The result is (-50,50) + (0,0).

    Tooltip says the difference between the constrained and target bones

    Relative is for when you want to add the target transform to the constrained bones. It allows the constrained bones to be transformed around as normal, but still be affected by the target bone.

    Well it's a shame I did not know this. I always thought if you want to have both you will have to use mix value 50%

    since 4.2.40-beta you won't get the rotation jumping around when the mix is between 0 and 1

    I still get the jump

    • Nate ответили на это сообщение.

      warmanw Tooltip says the difference between the constrained and target bones

      You're right, the tooltip is wrong. We'll fix it in 4.3.

      warmanw I still get the jump

      Oops, I misremembered the issue. If you want no jump, check Local. Relative can be checked or unchecked, there is no jump as long as Local is checked.

      • warmanw ответили на это сообщение.

        Nate I feel so much better now knowing all that, You just increased the price of my Spine course by $1 😃

        • Nate оценил это.

        Just noticed when Relative is enabled copying bones transform from before being constrained to after constrainmed 100 mix does not work, is it supposed to be like that? I can still freely move constrained bone but not paste the transforms

        And what is the difference between [local-off , relative-on] and [local-on, relative-on]

        I can see only one difference, Shear X is not working for [local-on , relative-on]

        If local if off the constraint sets the world transform.
        If local if on the constraint sets the local transform.

        There is no shearX in transform constraints, only shear Y.

        What you say makes total sense until it doesn't, here are few questions in the video

        1. If constrained locally: I move target by X axis should I expect constrained bone move by X the same amount?
        2. You said there is no shearX, and I can see it in the constraint properties, but clearly I can shear target bone by x and Y axes and get different results when its not in local
        3. Tooltip for local says COnstrained bones local transform is set to ptarget bone local transform.. shouldn't it be the other way around?
        4. I tried different setups but still [local-off , relative-on] and [local-on, relative-on] working exactly the same(except shear X), can you tell me how to setup so I see the difference with at least one of my eyes

        Please post your project, as I can't explain the behavior from the video when not all the constraint settings are shown, and the effort needed to recreate the project when you already have it done would be wasteful.

        • warmanw ответили на это сообщение.

          Sure here is it

          Nate

          transform-constraints.zip
          103kB

          Thanks!

          It would be slightly more clear to label the setups that are not local as "world".

          If you want to see the difference when there are different parents, it can help to transform (eg rotate) one of the parents so it's pointing in a different direction.

          1) "Local" can be tricky when it comes to translation. A bone's translation is stored in the parent bone's coordinate system. Many times "local" means the parent coordinate system for translation. This is because when we talk about the "local transform" we mean local rotation, parent translation, local scale, and local shear. It's awkward to talk about all that and also somehow make it clear that we mean "parent" for translation. This causes confusion in other areas (like when you can pick local, parent, or world axes) where local really does mean the bone's own coordinate system (not the parent's). When checking Local for a transform constraint, it's the parent's coordinate system for translation.

          2) and 4) The shearY mix slider for a transform constraint affects if shearY is copied from the target to the constrained bones.

          Transform constraint doesn't use shearX at all for Local. In fact Spine's shearX exists only for convenience. This is because shearX changes the direction of the bone's X axis, which is exactly what rotation does! The difference is just that shearX affects the Y axis rotation the opposite amount, so it appears to not move. You can achieve the same result as shearX with a transform constraint by rotating the bone (to change the direction the X axis points) and then using shearY the opposite amount (to restore the Y axis to its previous orientation).

          As mentioned, the target bone's shearX affects the direction of its X axis. When calculating the "world rotation" it's the 0-360 angle in the world coordinate system of the X axis, therefore shearX affects world rotation. When transform constraint Local is unchecked (ie world) the world rotation is copied to the constrained bones. If shearY mix is zero, then this will result in the constrained bones rotating without any shear. If shearY mix is 100 then the world rotation of the Y axis is also copied. This can make it look like shearX is being copied, but it's really just a combination of rotation and shearY, described above. If you turn off the rotation mix and adjust the target bone's shearX, you'll see shearY change but rotation doesn't.

          I can appreciate (more than anyone) if not all of that is intuitive. When copying individual parts of bone transforms, it's was quite tricky to get Spine's behavior to make sense and work reasonably in all situations. I do think it's useful to understand at least the basics of how transform constraints works, but it's not necessary to understand every corner case, as there are many combinations for Local, Relative, and the mixes. There are 8 settings so 82=256 combinations, and that's assuming mixes are either 0 or 100. Sometimes it can take some experimentation to get exactly the result you are looking for.

          3) Nope, the target bone is where the transform comes from. The constrained bones are the bones that the transform values are copied to. There is only one target but there can be multiple constrained bones.

          • warmanw ответили на это сообщение.

            Nate Thanks for the time! Let me digest this 🤯