SPINE - Animation Software (LÖVE compatible)

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

SPINE - Animation Software (LÖVE compatible)

Post by monsieur_h » Wed Feb 13, 2013 9:14 am

I'm not sure it belongs to anywhere else in the forum, so I'll just leave that here...
Image
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)

Post by spectralcanine » Wed Feb 13, 2013 4:53 pm

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.

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

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

Post by monsieur_h » Wed Feb 13, 2013 5:54 pm

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)

Post by NateS » Thu Feb 14, 2013 1:50 pm

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)

Post by spectralcanine » Thu Feb 14, 2013 4:16 pm

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)

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

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

Post by monsieur_h » Fri Feb 15, 2013 8:03 am

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)

Post by NateS » Fri Feb 15, 2013 2:37 pm

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.

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

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

Post by monsieur_h » Sun Feb 17, 2013 2:04 pm

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)

Post by spectralcanine » Sun Feb 17, 2013 5:15 pm

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)

Post by NateS » Sun Feb 17, 2013 5:34 pm

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. :)

Post Reply

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 4 guests