• Runtimes
  • [Unity] Editor Integration Improvements

Mitch wrote
Snazzlebot wrote

The skeleton utility script looks amazing Mitch, thanks for all the work. Can't wait to try it!

It's comin 🙂 I'm probbbbably going to wait for IK support from Nate just to keep the codebase nice n' clean. Maybe they'll come out at the same time :think:

In other news Pharan made this for my birthday today.

Totally nailed the caricature hahah... :rofl:

Happy Birthday! And thank you so much for this.
Can't wait!

Related Discussions
...

This is really awesome work and now the integration looks really professional! This is the love that the Unity editor support needed.

Some more gizmo info in the scene view would be great, for debugging, designing etc (icons with slot names attached to each slot, current slot name, rotation, bone length etc that you can toggle on/off)

Some more things I'd like to see (and now I'm just thinking greedily and maybe things like this belong in examples 😉 ):

  • For the ragdoll effect - I'd love to be able to apply it interactively like in the "Clumsy Ninja" app so if I pick up one of my characters by 1 of its bones at runtime, then it "hangs" realistically from the selected bone until the character is placed on the ground again https://itunes.apple.com/se/app/clumsy-ninja/id561416817?l=en&mt=8
  • A built-in helper to provide "look-at" support for eyes. After setting up which bones are eyes and pupils and the extent of the eye whites, then a simple script attached at runtime to a game object should allow the eyes to look at and follow the movement of it. A similar script could be used for targeting systems too for weapons that should point at a crosshair game object or at a target.
  • Like you intimated in the video, automatic creation of colliders based on the mesh would be great

Look at support for eyes can be done with IK. Since the IK target is a bone, using Mitch's magic you can just move the BoneComponent GameObject where you want and set the mix so it is fully controlling the IK target bone.

Nate wrote

Look at support for eyes can be done with IK. Since the IK target is a bone, using Mitch's magic you can just move the BoneComponent GameObject where you want and set the mix so it is fully controlling the IK target bone.

Cool! But is there runtime support for IK yet? Or we don't need it at runtime?
How would we set this up? I can't wrap my head around how it would work :bang:

IK runtime support is coming soon. Set an IK constraint so the eye bone always points to the eye target bone. Use Mitch's stuff to move the eye target bone where you want and the eye bone automatically rotates to point at it.

Nate wrote

IK runtime support is coming soon. Set an IK constraint so the eye bone always points to the eye target bone. Use Mitch's stuff to move the eye target bone where you want and the eye bone automatically rotates to point at it.

OK, sounds great! I'd love an example from Mitch when this is all in place. Everything is so bleeding-edge at the moment that I can't see all of the moving parts or how to use them 😉

From other posts I see that IK runtime support for Unity will be coming in the next week or so - would be great!

mark wrote
Nate wrote

IK runtime support is coming soon. Set an IK constraint so the eye bone always points to the eye target bone. Use Mitch's stuff to move the eye target bone where you want and the eye bone automatically rotates to point at it.

OK, sounds great! I'd love an example from Mitch when this is all in place. Everything is so bleeding-edge at the moment that I can't see all of the moving parts or how to use them 😉

From other posts I see that IK runtime support for Unity will be coming in the next week or so - would be great!

Yep - I'm waiting on Nate to get the true Spine-IK stuff ready so I can be sure to support it 100% with SkeletonUtility. Also, rxmarcus posted a video of runtime IK working using my bleeding edge Spine Extensions with an IK rig and gun controller I whipped up for it - that code will also go out soon too; just would rather release it when all the IK stuff goes live to avoid codebase overlap and confusion 🙂

Not sure if this is a Windows thing but the material generation was failing for me because there were rogue spaces in the atlas.txt files I was ingesting. I've edited SpineEditorUtilities.cs to fix it and made a pull request to the spine-runtimes repository.

4 أيام لاحقا
Mitch wrote
mark wrote
Nate wrote

IK runtime support is coming soon. Set an IK constraint so the eye bone always points to the eye target bone. Use Mitch's stuff to move the eye target bone where you want and the eye bone automatically rotates to point at it.

OK, sounds great! I'd love an example from Mitch when this is all in place. Everything is so bleeding-edge at the moment that I can't see all of the moving parts or how to use them 😉

From other posts I see that IK runtime support for Unity will be coming in the next week or so - would be great!

Yep - I'm waiting on Nate to get the true Spine-IK stuff ready so I can be sure to support it 100% with SkeletonUtility. Also, rxmarcus posted a video of runtime IK working using my bleeding edge Spine Extensions with an IK rig and gun controller I whipped up for it - that code will also go out soon too; just would rather release it when all the IK stuff goes live to avoid codebase overlap and confusion 🙂

Cool! Really looking forward to it all coming together and seeing the cool examples.
I did see the rxmarcus video and it's very nice 🙂
I'm totally into Unity now (and Spine of course 😉) so I really appreciate the extra Unity love with the simplified workflows and any cool examples 8)

This looks very cool, looking forward to it.

Got a question though, I've been using 2d toolkit primarily for 2d development in Unity. Is this tool compatible with 2d toolkit?

If not, is this extensible enough so that I could add some sort of mediator between this and 2d toolkit?

Thanks, and again, looking very sweet.

Got a question though, I've been using 2d toolkit primarily for 2d development in Unity. Is this tool compatible with 2d toolkit?

It will be. 2DTK gave me a free license a week or so ago, been too busy to get to it but yes, it will be supported as well 🙂

very cool, thanks 🙂

6 أيام لاحقا

Mitch,
this looks awesome and I am really looking forward to it. 🙂
I would like to ask if there is any ETA for the skeleton utility to go live?

Ivanneke wrote

Mitch,
this looks awesome and I am really looking forward to it. 🙂
I would like to ask if there is any ETA for the skeleton utility to go live?

Waiting for Nate to get IK into the runtimes! There are some breaking changes in regards to update-order that can happen with IK so I figure might as well release it all when its sorted out.

20 أيام لاحقا

Hey! Sorry for nagging, but when is this coming?

Very soon, maybe today? Mitch has done some super amazing stuff! It's really impressive.

Actually I just noticed this is in the official runtime repository already! Everything related to the new import seems to be working now. It's fantastic.
Is there anything I'm missing?

The new import is in but Mitch has done much more. He has a way of generating GameObjects that follow bones, similar to BoneComponent, and can also do the opposite: modifying the GameObjects can modify the bones. This leads to some really fancy rigs. You can leverage Unity's physics for parts of your skeleton, keep feet on the ground with IK, etc.

Just wanted to give a heads-up for the following video from Unite 2014. They demoed creating a 2d character with the help of the new 2d hierarchy, some IK scripts and then animated in mecanim.
What might be interesting here is the way they have integrated support for IK with handles and gizmos for angle limits.
Who knows - this might be able to be Mitch-ified? 😉

Unite 2014 - 2D Best Practices In Unity http://youtu.be/HM17mAmLd7k
Example code - https://www.dropbox.com/s/kmssm4bc4saezvv/Unite%20Seattle%202D%20Examples.zip

It's neat, though with pretty painful setup and animating. Also the CCD IK isn't deterministic and uses more CPU. The angle limits are nice and we'd like to support that. Spine's IK is only the first version. 🙂

Nate wrote

It's neat, though with pretty painful setup and animating. Also the CCD IK isn't deterministic and uses more CPU. The angle limits are nice and we'd like to support that. Spine's IK is only the first version. 🙂

Yep, but I was suggesting incorporating ideas from this into the Unity workflow for Spine, not replacing the Spine workflow 😉

mark wrote
Nate wrote

It's neat, though with pretty painful setup and animating. Also the CCD IK isn't deterministic and uses more CPU. The angle limits are nice and we'd like to support that. Spine's IK is only the first version. 🙂

Yep, but I was suggesting incorporating ideas from this into the Unity workflow for Spine, not replacing the Spine workflow 😉

The nice thing about my skeleton utility tools is that you are totally welcome to setup IK using those scripts by setting the "BoneComponent" (renamed it; more on that later) to Transform mode and letting the SimpleCCD script handle the rest.

Mitch wrote
mark wrote
Nate wrote

It's neat, though with pretty painful setup and animating. Also the CCD IK isn't deterministic and uses more CPU. The angle limits are nice and we'd like to support that. Spine's IK is only the first version. 🙂

Yep, but I was suggesting incorporating ideas from this into the Unity workflow for Spine, not replacing the Spine workflow 😉

The nice thing about my skeleton utility tools is that you are totally welcome to setup IK using those scripts by setting the "BoneComponent" (renamed it; more on that later) to Transform mode and letting the SimpleCCD script handle the rest.

Cool! Really looking forward to this stuff! 🙂

Alright; who wants to Alpha test this mess? 😮 I need some victi....volunteers. Skype me at: Fenrisul


http://www.xdtech.net/spine/SpineUnity_ ... itypackage

Well, its in the wild now. Use at your own risk. Strongly suggest importing into a blank project (includes both Spine C# and Spine Unity runtimes).

Examples, tutorial videos and feature walk through coming as soon as my throat isn't sore.

Should we put it in Git?

Mitch, I write Playmaker integration of Spine Runtime, and i'm very excited where you take Unity's runtime. I just wanna ask you for a list of what might be as useful actions of your current state of work for Playmaker. We already have three basic actions (see http://esotericsoftware.com/forum/viewtopic.php?f=7&t=3288) I would love to have complete control over spine runtime in Playmaker so that we can create animation controllers there and I see in your post's video that there might be useful actions for what you already achieved in Unity's runtime.

Nate wrote

Should we put it in Git?

Not yet 🙂 Hammering out some glaring issues.


New version up
http://www.xdtech.net/spine/SpineUnity_ ... itypackage

And a video showing how to drive the Raptor examples tail using physics instead of animation.

Amazing!, this will also work for character with long hair etc. etc...
Well done Mitch 🙂

A couple of errors showing up when importing in a blank project:

Script 'Animation' has the same name as built-in Unity component.
AddComponent and GetComponent will not work with this script.

Assets/spine-unity/SkeletonUtility/SkeletonUtilityBone.cs(98,35): error CS0103: The name `GetComponentInParent' does not exist in the current context


Oh, right. Did a quick Google and GetComponentInParent only works from Unity 4.5 onwards. So there's that.

We just added this to our character roster. One guess how we are going to handle animating his beard 🙂 . Thanks again for some amazing work Mitch! Been playing around with this a lot and everything is working pretty great for me so far. The only issue I'm experiencing is when creating ragdolls, it seems no matter what I do my characters root/hip bone wont drop... so my character looks like he is suspended from the waist. Any thoughts on this?

If you're using the Hinge Chain helper function, is the Hip bone in Override or Follow mode?


Now with more multi-skeleton draw order control.

And more rigidbody / hinge / IK examples



I'm tired and just getting my voice back - don't blame me for disconnected sentences.

AsteriSk! 😃 Payback for mocking my nice bounding boxes!

Sword in the stone pull animation is really freaking awesome!

That's so cool!!!

But you should definitely take some time off to read your 7K+ emails! 😛

Will there be some explanations about how to get IK constraints to raise up a little on uneven terrain, like seen in the video with the sword guy?
I think the feature I try to explain calls "locomotion".

For the uneven terrain footwork magic, you just need to set up your skeleton for normal foot IK, and then control those IK target bones with SkeletonUtility and one extra script that comes SkeletonUtility stuff specifically for this. Mitch made it easy.

Sounds awesome 🙂
I'll look into the script, kinda interesting how it's done.

Full package of Spine C#, Spine Unity, and the example content from the repo with additional SkeletonUtility examples as well.
http://www.xdtech.net/spine/SpineUnity_ ... itypackage

Pull request submitted for official runtimes. Youtube stuff comin soon.

Has been merged! :party:

Nate wrote

Has been merged! :party:

Quick! Everyone break my stuff!

(No seriously, break it, and report it so I can fix it)

Good stuff mitch 🙂

Should SkeletonUtility reset all its values under Slots when the game is run?