• Editor
  • Experimenting with New Transform Constraint

Agreed, as Spine projects get more complex they feel like magic at first! It can be OK if the complexity is truly warranted, but as you said we should help people understand and achieve the most common goals so they can apply that to their more unique scenarios.

Using a transform constraint like this and leveraging the wrapping of world rotation 0-360 to achieve modulo is very clever, but probably not the simplest solution. Now that we have sliders, you should be able to get a much more straightforward solution. It's also more powerful, as you can animate the walk however you like.

Related Discussions
...

Ah lol Yes! we can just move hip and call all the legs to move by binding hip to sliders. I am trying that next!

For the spider to pause between steps, you'd just animate it!

Here's a neat one:

Изображение удалено из-за отсутствия поддержки HTTPS. | Показать

There's only a single bone rotating here. The seconds hand is controlled be an animation, so there is full control of the tick-to-tick movement. Also note the shadows.

You have to share this project with us! I only need the images though want to find out the way myself

Good luck! 😃

clock.zip
108kB
  • warmanw ответили на это сообщение.
    • Изменено

    Hi @Nate ,
    is it possible to share the solution, how it works? I have done an animation for the "minute hand"-bone (10frames) with one tick. Then i created a slider constraint with "second hand"-bone rotation for "minute hand"-bone-animation, limitation 90 to 89. So when the second hand-bone passes through the 12, the "minute hand" ticks one further, but once it hits "3" (on clock, 90° more) it snaps back. Frame-counter of slider constraint jumped back from 900 to 0 in this moment --> It jumps back, when it hits 0° rotation. What steps am i missing?

    Do i have to use the 180°-360° rotation split, what Harald has written above to avoid the snap? Or is there another solution with the slider?

    Sure, I can post the finished project, but that ruins the fun a little so I'll wait a while. 😬 If I post it, there would be a strong temptation to just look at the solution rather than figure it out. Better not to tempt!

    Probably you are running into "world rotation wrapping". World rotation is defined as the direction the bone is pointing in world space, which in the Spine editor is screen space, ie your monitor. There are only 360 degrees in a circle. As a bone rotates, at some point its world rotation has to jump from 359.999 back to 0. That jump can wreak havoc with your slider or transform constraints, since it will cause the target bones to jump.

    0 world rotation is pointing right, which would be 03:00 on a clock. That's why you see a jump at 03:00. As as you rotate clockwise past 03:00 you jump from 0 to 359.999 degrees world rotation.

    To prevent jumps with your constraints, use local space by checking Local on the left (source bone) side of the transform constraint properties. In local space the local rotation is defined so 0 degrees is pointing in the direction of the parent bone and any other value is how far from 0. In local space you can go > 360 or < -360, around and around, without any jumps back to 0.

    It's so common to use local space on the source side, maybe it should be the default. 🤔

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

      Ok, local was already a solution option, but then my constraint couldn't move anymore. I could see i still used the world coordinates instead of local coordinates. So one step further 🙂. Thanks for the hint. So don't share the project. 😃

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

      Nate Nothing seems to be working properly 😄

      I used the motor bone to rotate all the hand and added a tick animation (a slider bound to the motor bone) for the second hand, which ticks but doesn’t move forward. I can’t figure out how you manage the stepped movement of the minute hand.

      For the shadows, I use transform constraints to just move them locally from -20 to 20 on the Y-axis during the 0–180° rotation. But when I duplicate the constraint for the other half, the constraint overrides the previous one.

      Any tips for us? 😄

      Nate
      我是通过滑块跟物理去做的,不知道是否正确,但是阴影我不知道该怎么处理了

        the shadows also can be done with sliders but I really want to see if there is an option with transform constraints

        my shadows work but only half the cycle 😃

          Nate


          另外我觉得滑块约束缺一个跟变换约束一样逻辑的东西
          1.下面主要用来控制它的映射方式,直接通过匹配数值就好了
          2.通过混合数值的大小和正反来控制,映射的比列
          滑块约束也添加一个类似变换约束的匹配数值,和混合来控制比例,会不会方便很多?

          warmanw 哈哈哈期待他们公布答案

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

            So I basically made another tick animation for minute hand now it looks great, still need to solve shadow issue

            • Изменено

            yugutou If you annotate your images only with numbers, then write text for each number, we can translate it more easily. 🙂

            I translated the image text, but I'm still not sure what your suggestion is. Can you explain it more? Do you suggest a slider setting to choose positive or negative? You can uncheck Loop for a slider and it works similar to transform constraint Clamp.

            warmanw the shadows also can be done with sliders but I really want to see if there is an option with transform constraints

            Probably it's possible, but sliders are so easy!

            Here's a little clue from our (Soeren's) solution:

            • yugutou ответили на это сообщение.
            • warmanw оценил это.
              • Изменено

              That's not a clue but solution 😃 I thought we only should use one second hand animation slider

              Doesn't it make sense to allow lower transform constraint to affect if the the higher in the order has being clamped so it doesn't affect. I hope this make sense. Its like i wear shorts which fully covers my hips but it does not cover legs. Currently i dont see legs kinda shorts replace legs

              A slider can stomp (or mix from) values from your animations. If you don't like that, which is common, then you can check Additive on the slider. That makes key values add to whatever the pose is when the constraint is applied, instead of replacing (or mixing from) the current value. Keys are stored relative to the setup pose, so when you key the setup pose, it's actually storing zero. The current value plus zero is of course the current value, so you can have an animation that has no effect in some parts.

              Here's the project with our solution:

              Try your own solution before looking at this project! Don't ruin the fun! 😃

              clock-solution.zip
              109kB
              • warmanw ответили на это сообщение.

                Nate 还是不太明白你的建议是什么

                就是为滑块约束也添加上,类似变换约束的【匹配】按钮,这样就不用手动输入数值了

                变换约束的【混合】,通过0-100、-100-0,或者任意数值,来控制骨骼之间的映射变换比例,和正反变换方向的

                我认为滑块约束的混合或者应该有个类似的功能,用来控制骨骼跟时间轴之间的映射变换比例,和映射方向
                目前滑块约束的混合,是用来控制动画的混合,而不是骨骼跟时间轴映射之间的混合
                不知道这样描述可以吗