Hi Spine-team,
do you think it will be technically possible in the future to move a path-constraint bone(chain) with another bone/constraint on the path, not only with the position slider? I know it is a constraint for itself and the calculation colud be complicated, but it would create so much more flexibility and less animation work. Let me know your thoughts!
Path-Constraint
Hello,
It is indeed possible to influence the position of a path constraint using another bone or constraint. This can be achieved by weighting the path to bones and then moving those bones. This method allows for greater flexibility and can reduce the amount of animation work required.
For example, you can bind the path to follow a bone by selecting the path, opening the weights panel, binding the bone, and then editing the weights of the path so that one end follows the bone you chose and the other follows the parent bone or another bone of your choice. At runtime, you can move these bones programmatically, which will affect the path just as it does in Spine.
For more detailed information, you can refer to the Path constraints - Spine User Guide and the Manipulate Path Constraint Via Script forum discussion.
I hope this helps! Let me know if you have any further questions.
Thanks Spinebot,
i had nearly the same idea, but the problem is the path-structure will be changed and i don't want that. My target would be to move for example one constrained bone on the path without changing the path. Actually i want the same as what the position slider does, only with the change, my chosen bone can move the path constrained bone on the path. For exmaple when i move the parented/constrained chosen bone 10mm to the right,then the path constrained bone moves the same way only on the path. Is this possible?
Misaki Ok, let me try it
I created a small spine file with bones. There is path with a path constrained bone. You can move it with the position slider. Let's say it is a part of character1("path bone" in example), what i want to move on a path. Then you have a character2 with a main part (body, head, whatever) and a child bone of it (Hand or anything else). Target is to move the child bone of char2 on path of char1. That means i create a constraint from child bone (char2) to path bone (char1). There are 2 cases for me:
Case1: The path bone is the target
Case2: The child bone is the target
To Case1:
Advantage:That is the solution that i need to use to reach my target. I can move the position slider and the child bone moves on the path.
Disadvantage: I need to animate the position slider and the main(parent) bone of char2 to not to distort char2 (Hand moves, but the body would stand still, when i don't move it). I would like to avoid this.
To Case 2:
Disadvantage: Child bone moves the path bone, but the path bone doesn't move on the path anymore. (Changing the order of the constraints results in no movement). I don't reach my target.
Now my question from the beginning and the advantage of it: What if you could move the main bone/child bone and the path bone continues to move on the path. Then i wouldn't have any distortion anymore and it would be easier to rig (at least in my eyes). Maybe i have a wrong idea/thought in my mind, but then enlighten me, please . I hope it is understandable what i want.
Attached the spine file with the 2 cases in the animation
The example project is quite abstract. There are 2 animations but it's not clear what they are showing or what you would like to happen instead, even after reading your text. I'm not understanding what you want to achieve.
You should state what you want to achieve completely separately from what you have tried to achieve it. Describe the movements you want from your skeleton without considering rigging or constraints.
borleech I think now I probably understand the rig you are looking for. For example, if the Path bone
is a bone for a car toy, the Child of Main bone
is a kid's hand, and the main bone is the kid's body, and if the kid's hand is constrained to be at the position of the car toy and the car toy is moved along the path to create an animation of the kid playing with the car toy, the kid's arm will stretch and contract. So you want to move the main body along with that.
I think there are several ways to solve this problem, and maybe I can make an example of it, so I'll post it here later.
- 編集済み
Misaki Ok, i am curious . I think that's what i'am looking for.
Nate Sorry for confusing.The only thing what i want to know is, if it is possible to move a path constrained bone on the path with a constrained bone as target bone (in this case the path constraint bone is not the target bone for the constraint). That's the reason for the two 2 animation cases. One animation is for this case (case2) and the other for the usual working way (so i think). I hope it's more clear now?
- 編集済み
borleech Sorry for the wait. I have tried to create a rig example that utilizes the constraints as much as possible, so that the Main
bone does not have to be animated manually while the position slider of the path constraint is being animated:
You can download this skeleton project below:
What I did was to add a transform constrain to the Main
bone as well as the Child
bone, and then add an IK constraint to make the Main
bone rotate with the movement of the Path bone
. As a result, it is necessary to animate the Mix of the transform constraint on the Main
bone, however, no other bones are animated while the path position slider is animated:
Since both IK and transform constraints are applied to the same bone, it is probably difficult to see how they affect each other at first glance, so please turn off and on the visiblity dots next to each constraint's name to see what role each plays. I hope this helps, but please let me know if this rig doesn't solve your problem.
Misaki You are absolutely awesome. You show so much patience for the problems of the spiners (is that a word?) and at the same time the help is outstanding. You only don't write down the help, you create extra a spine file and so on. Great work!
And yes, that's the solution i was looking for. I forgot to use again the second constraint for the same bone as you mentioned it in my last forum post. And i need to ask, did you draw the example by yourself?
And yet i would like to know why it is not possible to change the path bone with a constrained bone without using the position slider or why did you choose this slider? Is it a calculation or transformation problem? Isn't it possible to calculate the position of the path bone on the path? For example i move the body/main bone and the car just moves on the path with it, when the car bone is constrained to the path.It doesn't matter whether the path goes down or up as in the example. When you are annoyed of the topic, let me know .
borleech I am glad this was helpful to you! I drew the art myself by looking at the Spine project you posted and imagining what the composition would be if I were to add a picture to it.
And yet i would like to know why it is not possible to change the path bone with a constrained bone without using the position slider or why did you choose this slider? Is it a calculation or transformation problem? Isn't it possible to calculate the position of the path bone on the path?
Hmmm, I see, so this is the point you are concerned about. Just in case you missed it, it is possible to move bones on a path not only on a slider, but also on a viewport. When the path used in a path constraint or the constraint is selected, an arrow icon appears on the path that can be dragged in the viewport. Dragging it will update the position slider information:
As you can see in the video, it automatically snaps to the edge of the path, so there may be cases where it is a little difficult to move it, but if you want a more intuitive way to move it, this method may be better.
There currently seems to be no way to turn off snapping to the end of a path, perhaps we should be able to turn it off while holding down the Shift
key.
Regarding the question of why it needs to be moved by the slider, I can somewhat understand that such a question would come to mind if there was only one bone being constrained, but a path constraint can constrain multiple bones, so it is more efficient to have position information collectively than to have position information for each of the constrained bones.
In addition, the path constraint can be applied not only to Mix 100, but also to Mix 50, and so on. For example, if you have a flying bat and you want it to fly around in a circular area with slightly random movements to the left, right, up and down, you can use both the random movements created by Translate and the circular flying movements created by the path constraint's position slider. Therefore, it is easier to find the position by the percentage on the path, or the value of where it is within the length of the path, than by the specific X/Y coordinates.
I hope these will be helpful to you!