- Đã chỉnh sửa
IK constraints now available in Spine 1.9.0+!
Edit: See IK documentation! http://esotericsoftware.com/spine-using-ik
IK constraints are in Spine version 1.9.0, which is now available. :clap: It currently allows for two bone IK as well as IK/FK mixing, which can be keyed. This allows you to mix and match FK and IK within the same animations. Coupled with skinning, IK makes for extremely easy animating of meshes that deform realistically.
Hình ảnh bị xóa do không hỗ trợ HTTPS. | Vẫn hiển thị
In the animation above, IK is used on the raptor's feet. This locks the feet to the ground and the knees and ankles adjust automatically as the body bounces up and down.
I'm going on a short vacation soon, so we did a big crunch time push to get this released before then. It works from start to finish and has a good deal of polish, but there are some minor features we will be working on in the future.
Currently none of the runtimes support IK. The IK data is also not yet output in the JSON or binary formats. We wanted to get IK in your hands as soon as possible.
If you aren't familiar with IK, it stands for inverse kinematics. IK adjusts the rotation of a hierarchy of bones so the tip of the last bone points at a specific place. Eg, you can use this to pin feet to the ground, so when your character crouches the knees bend instead of the feet going through the ground. You can also animate the target the bones point to, which can make many kinds of animation much easier and use a lot fewer keys.
To use IK in Spine, select two bones, click Constraints
in the tree, add a new IK constraint, then choose a target bone. Now the two bones will always point to the target bone. You probably want to create a bone solely for the purpose of being the IK target.
You can adjust the IK/FK mixing on the constraint's properties in the tree. This allows you to use keys on your FK pose to use a mix of FK and IK. To see the FK pose, IK pose and the mix pose at the same time, check the visibility dot next to the constraint. When the visibility dot is unchecked (the default) then you will only see the mix pose and the bones are drawn as an outline to show that the scale, rotation and/or translation is being controlled by a constraint and cannot be edited.
1.9.01 fixes a few issues. A few more still remain, but are relatively minor. Eg, the translation axes when dragging the translate tool can be incorrect on bones controlled by an IK constraint when the constraint is visible, bone compensation can be incorrect on bones controlled by an IK constraint, etc.
I am taking a short vacation to visit family and will be unavailable for 3 weeks. Shiu is available to field your questions.
Broken my brain (( Can you plz make a video tutorial?
https://www.youtube.com/watch?v=orqb4Hz ... e=youtu.be here you go It's not step by step but should help you get started.
where is the example file?
There is no example file yet since the feature isn't fully complete. I will create an example scene today so you can check that out when I upload it, just keep in mind that things are likely to change slightly.
I've created an example project now, you can find it at http://esotericsoftware.com/files/examp ... xample.zip
There are a couple of things that will become much easier to do once we are finished with IK. The Spineboy skeleton has two animations you can check.
The awesome features just keep rolling in, If there was one thing about Spine I missed from modern 3D modeling programs it was IK constraints. I notice you mention IK data not being exported out in JSON format, are there going to be options to check what data we would like exported out in JSON? skinning data, IK, FFD, Mesh? Curiosity for some runtimes that are not updated as quickly as Spine does or legacy options for outdated runtimes (if that occurs).
I can't say if there will be options for what data to export since I don't know, but it's not something I've heard Nate mention. Currently if you want to use IK for animation and export it, you'll need to key the bones after IK, not ideal but it will be sorted when Nate is back from the US. The reason we wanted to release IK already is that we can then receive input from users to improve on it and also bugs will be found quicker, so in the end it means it will reach a more polished state quicker. I've certainly had a lot of fun with it already but I am already aware of a couple of things that needs sorting out.
Oh, Awesome! Thank you for this tutorial!
Nate already did some work on skeletons as attachments but it's not ready yet. "Just" custom renderer
How far is he with the progress? I would be glad to see that custom renderer, though.
I don't know how much work is left on it. What exactly do you mean with custom renderer?
I have managed to change SkeletonRenderer and SkeletonAttachment class to support custom draw order, but I ran into this problem... The pogo and that indian are two different skeletons.
Should probably create a new thread to discuss custom draw order rendering. I'm afraid it's something Nate will have to give his input on since I won't be able to help you with it, I'm not a programmer by trade.
Looking great! I was wondering if Spine skeletons will be supporting IK in realtime as well, where IK targets can be positioned dynamically? As it is done in the Spine editor, I'm sure this could also be done inside a runtime?
Thanks! Yes that is the plan, this is why we made IK only two bones since anything more takes too much processing power and it is also much easier to control. The exact details are not yet decided though.
Is it possible to use more than 2 bones for IK?
puzzler đã viếtIs it possible to use more than 2 bones for IK?
Hehe I answered that right above your post. But no it is not possible to use more than 2 bones for IK. We want IK to be available at runtime so it has to be lightweight. We do plan on allowing 1 bone constraints as well. But at this moment no more than 2 bones.
We'll only support 1 and 2 bone IK to start. Note you can use IK on any two bones in the hierarchy, even if there are other bones between them. Eg if you have torso, neck, head then you could do IK on torso and head if you wanted.