## SPINE - Animation Software (LÖVE compatible)

General discussion about LÖVE, Lua, game development, puns, and unicorns.
monsieur_h
Citizen
Posts: 65
Joined: Tue Oct 30, 2012 4:43 pm

### SPINE - Animation Software (LÖVE compatible)

I'm not sure it belongs to anywhere else in the forum, so I'll just leave that here...

That's a 2D animation software proposing LÖVE compatibility. That's not free, but not expensive either. They are currently leading a crowdfunding campaign on Kickstarter. Their goal of \$16,000 to make it Lua/LÖVE compatible is already reached, but that may interests some people to know about it.

Their kickstarter page:
http://www.kickstarter.com/projects/eso ... ware/spine

Web site (with a free version):
http://esotericsoftware.com/

spectralcanine
Citizen
Posts: 65
Joined: Sat Dec 22, 2012 8:17 am

### Re: SPINE - Animation Software (LÖVE compatible)

At first I was going to say that it looks like a simplified Blender, but it actually looks like a pretty good and useful program (I always wanted a 2D skeletal animated object, to test different IK methods, dynamic animations and so on).

It doesn't seem to support IK, though.

monsieur_h
Citizen
Posts: 65
Joined: Tue Oct 30, 2012 4:43 pm

### Re: SPINE - Animation Software (LÖVE compatible)

That's a good point. I didn't thought of IK support. Even if it's optionnal to me for 2D games, it would totally a good feature. Gotta look for more details in the website.

NateS
Prole
Posts: 8
Joined: Thu Feb 14, 2013 1:47 pm

### Re: SPINE - Animation Software (LÖVE compatible)

Hi guys, I'm Nate, the programmer behind Spine. I'm happy to answer any questions you might have!

Spine does have IK, but currently only for posing the skeleton (click the Pose tool, drag a box to select multiple bones, then drag a bone), not during runtime. IK at runtime would be awesome, but often you can achieve the same results using keys. Of course there are some things only runtime IK can do.

spectralcanine
Citizen
Posts: 65
Joined: Sat Dec 22, 2012 8:17 am

### Re: SPINE - Animation Software (LÖVE compatible)

I was referring to posing in Spine, since the demo only showed FK.

I was always more interested in a tool to generate 2D skeletons, rather than what you call "runtime" as code to show it.
All sorts of cool experiments can be done with IK and physics combined.

The requirement of physics kind of defeats the purpose of making a general code base that runs IK animations, as opposed to exporting them as static animations, and probably exporting also the fact that they are indeed IK chains for the game code to handle.
The end result is largely dependent on game code (a simple example: blend a static walk animation with IK chains that make sure the legs are actually walking on the ground. The only game that I know of that does this, and in fact a whole lot of other dynamic animations, is Overgrowth)

monsieur_h
Citizen
Posts: 65
Joined: Tue Oct 30, 2012 4:43 pm

### Re: SPINE - Animation Software (LÖVE compatible)

Hey Nate ! Great job so far. Could you tell us a bit more about thoses runtimes you will develop for LÖVE, C++ and (hopefully) lot more of languages?

In essence, how are they working? Will there be a set of classes providing sort of Entity:animate(), Entity:sendVariable() and Entity:collides(x, y)? What is let to the programmer, and what is provided? I would have checked the libgdx documentation on your website, but I don't have access to it until I have my licence ( aka, the end of the kickstarter campaign ).

NateS
Prole
Posts: 8
Joined: Thu Feb 14, 2013 1:47 pm

### Re: SPINE - Animation Software (LÖVE compatible)

Sure.

First, the runtimes have two loaders, one for JSON and one for binary. Both do the same thing, which is to load the skeleton data and animations from files. The skeleton data contains the bones and slots for the setup pose, and also the skins which contain all the attachments. You create a skeleton from the skeleton data. The skeleton holds state for one on-screen instance, such as the current pose of the bones and which attachments are in which slots. Any number of skeletons can use the same skeleton data.

To animate your skeleton, you pass it to the animation along with a time that the skeleton has been in that animation state. Eg, from the libgdx SkeletonTest example:

Code: Select all

animation.apply(skeleton, time, true);
skeleton.updateWorldTransform();
skeleton.draw(batch);

The apply method poses the skeleton at the specific time (the boolean true is for whether the animation should loop if time exceeds the animation's duration). Posing the skeleton just modifies the bones' local position, rotation, and scale. The updateWorldTransform method updates the world position, rotation, and scale for each bone. The draw method uses the world positions and draws all the attachments in the correct place. You can also access the local and world positions of the bones, eg to position particle effects.

Animation mixing works like this, from the libgdx MixTest example:

Code: Select all

walkAnimation.apply(skeleton, time, true);
jumpAnimation.mix(skeleton, time - beforeJump, false, 1 - (time - blendOutStart) / blendOut);

The apply method poses the bones with the walk animation. The mix method blends the current pose (which will be walking) with the jump animation. The mix method takes the same parameters as apply, with an extra one which is how much to interpolate between the current pose and the new pose (0 to 1). The math to compute the time and blending amount looks tricky, but with a proper state machine to manage the animation states like you'd have in a game, it is straightforward. This animation mixing lets you transition smoothly from one animation to another.

When we get to it, you'll be able to define bounding boxes in Spine, then can do hit detection using built-in method. For now, the runtimes consist of loading the data, providing a nice object model for the bones, slots, skins, attachments, aniamtions, etc and manipulating the skeleton either directly (eg attaching a specific item or setting a bone's rotation) or by applying animations. Drawing is also handled.

monsieur_h
Citizen
Posts: 65
Joined: Tue Oct 30, 2012 4:43 pm

### Re: SPINE - Animation Software (LÖVE compatible)

Crystal Clear! Can't wait to try that!

spectralcanine
Citizen
Posts: 65
Joined: Sat Dec 22, 2012 8:17 am

### Re: SPINE - Animation Software (LÖVE compatible)

It sounds like you're trying to make a 2D game engine rather than animation software.

NateS
Prole
Posts: 8
Joined: Thu Feb 14, 2013 1:47 pm

### Re: SPINE - Animation Software (LÖVE compatible)

spectralcanine, what I have described is how 2D skeletal animation works. I can also explain what a game engine is, if that would be helpful.

### Who is online

Users browsing this forum: No registered users and 23 guests