- Edited
floor constraint IK and scale inheritance
Hello everyone,
I currently have some troubles animating a 5 parts leg (it's an insect).
I really have to use IK constraint. And I really have to use at least 2 bones on one constraint, if I dont, the foot move, it's a pain to fix (in fact I really can't fix it). I tried add more ik constraints on the leg, trying to play with parents and children but I got nothing good (lack of freedom, ugly positions... ) so I finally use 2 constraints only per leg and even if it's not perfect the result is satisfying enough to me in the workflow. Alas, the restraint bones must inherit from the scaling, that's quite ugly because I really need to change the scaling and don't want to inherit it in other bones... the only solution to me is to forget about constraint and loose a lot of time to do animation.
Any tip please ?
Thanks for your time 8)
Hello Didjynn!
You can disable scale inheritance in the properties of the bones that don't need it. Just uncheck Scale
Tree - Spine User Guide: Properties
If you're having troubles with a setup, you could post a screenshot or some references of how you'd want it to move, and I can try to help you figure it out if you want (:
Sure thing
Image removed due to the lack of support for HTTPS. | Show Anyway
The problem is, with bones linked to a constraint I can't uncheck inheritance.
Also as you may see, I'm using 2 constraints for the front legs and only one for the 4 others. I tried with more and it seemed better to me at first but I had to fight with it to get something nice and not have to rework everyting everytime so I would like to know if I'm just bad and if there is a better solution.
Tnahks :rofl:
So, a way to make the images scalable independently is to create a bone child of the constrained one and parent the images to it.
I think the back legs have a rather good rig, I wouldn't change it, regarding the front legs/(arms?) you could maybe have a two bone IK like the ones in the back, but keep the tiny bones of the two last bit to change how that bends at necessity. I tried to search for some reference of how ants can bend their body parts, and it's been hard to find a video showing the front legs/arms bending. So this could give us hope
Do you have an alternate head looking to the front? (I see that group of bones apparently attached to nothing) you could probably reuse the bones you already have and rearrange the bones to look correct only during the animation.
As animators, we're often tempted to add bones and rig whatever has a joint. Sometimes this isn't really necessary, especially for parts that move little to none, so don't worry about simplifying a bit to preserve your sanity.
Thanks, I'll try the additional bone asap.
The floating bones are for another head, I have 2 skins very similar to each others but the 3rd have a very different head.
What do you mean for "keep the tiny bones of the two last bit" ? The foot ? I tried with 2 double constrained bones but the foot was moving and I had to move it a lot to get what I wanted. Maybe did I fail somewhere, I don't know.
I initialy tried to constrain the foot to the ground but it didn't work so I finally constrained the part joining the foot and it works perfectly. The only thing is in GameMaker Studio, the foot have the wrong orientation and this is really annoying.
In spine, there is no problem with the foot in any animation. In GameMaker on the right side, foot go in the wrong direction and I have no idea why :sweat:
Edit :
So your technique let me resize the bone but then of course the child bone (or the next bone, I mean the second bone constrained) doesn't follow this resize ... so I guess I'll have to create a new file with a special skull and make it by hand, it seems like the only solution to me. I tried to get something nice but the constrain make the 2 bones move (that's the purpose so of course it does that) but it means I can't correct the position of the 2nd bone of the constrain as I want to.
Image removed due to the lack of support for HTTPS. | Show Anyway
Finally, doing a new skull just for this animation doesn't seem so good, the final purpose is to use it in GameMaker so I would try to avoid to change the file for another while in game for performances reason. Is there really no way to resize it ?
I don't find any good way here, or I loose a lot of time on the animation without using the IK or some animations will just look ugly :broken:
The bad part about this is that GameMaker is in sync with an older version of Spine, where the latest things like IK stretch, or disabling inherit scale/rotation, and others aren't available for you to use. The good thing is that they should be in the process of updating their runtime.
You can achieve a similar effect by parenting the foot to the IK target instead.
I'm sorry the proposed solution didn't work. Maybe having 1bone IKS might be better.
What do you mean by resizing the skull? are you using different skins or is it a different view of the same head?
One bone can give me more control, since I made all my animations for this one I'll try on my next projects. The problem is if I make an IK constraint (I'll call it IKC from now on) on each bone of the leg it is quite boring to move it all and I have troubles with the IKC I use to fix the foot to the ground. If the direct parent bone of the foot have an constrain, it doesn't seem to care animore about the foot constrain. I mean in some cases it will just be useless (no orientation at all, no restriction to not go "through the floor") or it will follow the orientation but not be blocked even slightly so it let my foot move where it wants and make buggy ugly moves (it's hard to explain without a video and I wonder if I'm doing things right, I bought and discovered Spine less than a month ago).
what do you mean by "What do you mean by resizing the skull? are you using different skins or is it a different view of the same head?"
I do not find where I talked about resizing the skull, only legs. I'm using 3 skins currently, 2 are very similar and 3rd have a very similar body but the head is really different if you're talking about the bones in the air.
https://twitter.com/i/status/1096460143896809472
Will we see a feature to "lock" IK constrained bones to not let them rotate more than what we want them to ? Like this : Image removed due to the lack of support for HTTPS. | Show Anyway
I do not want to take much of your time but if you want, I can send you my file.
Constraints can be reordered: Constraints: Order so if you see a constraint suddenly stopping working in the editor, try pressing the reset button on the constraint node, or reordering the constraints in the list.
As said, I think parenting the foot to the target bone should keep them in place. The target bone is never a parent of the Ik bones, but they do follow it, so you shouldn't encounter problems with this.
I must have misunderstood the "it" here:
Finally, doing a new skull just for this animation doesn't seem so good[...] Is there really no way to resize it ?
And I thought it was referring to the first phrase on that paragraph, my bad! So was it referring to legs instead?
Nice gif in the tweet! the animation looks good too!
Range constraints have been proposed: Range constraints · #375 · EsotericSoftware/spine-editor
They might be added in the future, but I can't confirm it. I'll add your +1 to it!
If you prefer you could send the file, sure.
- Edited
Thanks a lot for all your help, I did see all video tutorials but it seems like I forgot about this reorder story, it works much better now ! :yes:
Even if I can't find where is this "reset" button
I'm a little confused about the target bone here and the parent.
Erikari wroteAs said, I think parenting the foot to the target bone should keep them in place. The target bone is never a parent of the Ik bones, but they do follow it, so you shouldn't encounter problems with this.
Is the target bone the orange point on which we create the IKC ?
Erikari wroteI must have misunderstood the "it" here
My bad, it is hard to explain when there is visual and mechanics. I meant the upper part of the leg, the first of the 2 bones using the IKC. I am fine with front and back legs the the one in the middle need to give an impression of depth without being too mechanical so I try to get a smooth move by not having the foot too high in the air with the walking animation. For this, I need to resize the upper leg part but it gives me a lot of troubles because of the IKC that don't allow me to resize it alone without his child. With your idea of the additional bone it works but it makes me create a new bone for this use only for only one animation and it is quite sad for performances reasons (well I don't know if it will have a big impact but 1 bone x 200 ants for only one animation sound sad to me) and anyway the resizing doesn't fit the animation and it would make me change the 2 middle legs for every animation :x I'm not ready for this I would need to change IKC too.
About the twitter link, tThank you for the compliment, I just wanted the show you the reason of my flying bones, on the gif you can see the small and the big head. Just wanted to know if I used the best solution (I'm not lazy :wait: but I like to optimize my workflow)
WHile I'm here (and you too) can I ask you if I change the size of the pictures I'm using, how hard would it be to resize the bones and all animations to fit the new size ?
For the export when we choose a different export size than 1, does it export all the bones and the picture file to the size asked ?
Also, I often have a problem with child-parent order with one I would like to be the child of his parent but not of the grandfather (family stories...)
For example, I have 3 IKC : top, middle and bottom of the leg. Would there be a way to make the top and middle child of the foot and child of the thorax but the foot would not be child of the thorax ? I would like when I move the root bone of my character to move everything except the foot. But when I'm moving the foot I would like to move all the leg but of course not the thorax.
Finally, maybe it would be nice to be able to lock some bones and not others. We can hide them to avoid to select them by mistake but I would like to see them.
Thanks again :handshake:
Edit : Image removed due to the lack of support for HTTPS. | Show Anyway
I found back the problem I can get to fix a foot to the ground.
With that organisation, whatever the organisation of the IKC or which bone is a child of which one, the foot will go through the IKC (even if it still follows it). I dont really know how to deal with that.
In fact I tried other ways, I can't make it better. I guess it is because of the way I do my foots, maybe should I use one more bone
Didjynn wroteEven if I can't find where is this "reset" button
When you are in the tree, click on the constraints node. Two buttons will appear:
Didjynn wroteIs the target bone the orange point on which we create the IKC ?
yes! Inverse Kinematics - Spine User Guide
Didjynn wroteJust wanted to know if I used the best solution
I think your solution is valid! Considering you probably don't want to redo the animation, that the head is so different, that you're trying to optimize, and that you're on GM, I think it's a good choice.
Didjynn wrotecan I ask you if I change the size of the pictures I'm using, how hard would it be to resize the bones and all animations to fit the new size ?
Have these two links! it's doable don't worry:
Fitting new high-res assets with a smaller skeleton?
how to properly resize your project?
Didjynn wroteFor the export when we choose a different export size than 1, does it export all the bones and the picture file to the size asked ?
Exactly! if you export at 0.5, you'll have an atlas that is half the original size.
Didjynn wrote(family stories...)
Ok this had me giggle
Didjynn wroteI would like when I move the root bone of my character to move everything except the foot. But when I'm moving the foot I would like to move all the leg but of course not the thorax.
Is the foot part of an IK constraint? parent the IK target to the root in this case and it should work as desired. Spineboy is rigged this way.
Didjynn wroteFinally, maybe it would be nice to be able to lock some bones and not others.
You can uncheck Select
in the bone properties to make a bone visible but to avoid accidentally clicking on it if this is what you mean by locking it.
Re image: I can't see the organization you did to the hierarchy, I only see bones here.
You have several options: parent the leg IK to the foot IK, viceversa, and keep both separated. I tend to like parenting the leg to the foot on some craracters, but the opposite on others, so I suggest you try it out to see which one would work best for you.
You can disable scale inheritance in the properties of the bones that don't need it. Just uncheck Scale Tree - Spine User Guide: Properties
This helped so much!
I wanted to have some stretchy creature (like a blob) with rigid parts floating in the stretchy, moving under-skeleton.
Thank you!
-Nathan
Glad it helped you too