• Editor
  • 4.2-beta status update

Hello. Nate, could you tell us how the development of version 4.2 is going? The blog really lacks a technical development section, I would love to read such posts. I also know that I can see everything you are working on in the roadmap. Previously, the launcher had a beta version of the program, is 4.2 worth waiting for in beta? Can't wait to see and try. It is also very interesting to hear your story about how the idea to make spine was born. What experience in development did you have at that time and what difficulties did you have to face. I googled for information about this, but was very surprised that I did not find any interview with you. Thank you!

Related Discussions
...

Sure, I'm happy to ramble a bit! Hopefully it's not too boring. 🙂 Blog posts tend to take a lot of effort to polish up and we're pretty much always scrambling to get new versions released (recently more than ever). Even if we're seemingly silent, know we are working behind the scenes! We also try to stay active on the forums without fracturing our focus too much.

Sorry for the long silence between releases. We try to avoid that but sometimes a series of things (mis)align and it happens.

There will be a 4.2 beta. It's how we get it in front of you guys for feedback and to ensure that the non-beta version of 4.2 is stable enough for use in production. The beta will start as soon as it's ready. We're happy to get it out as early as possible but sometimes we can't do that, especially for bigger features.

The main challenge for a beta is that whatever we release should mostly continue to work correctly later. For example, we don't want you to do work in the beta and later be unable to open your project with a newer version because things have changed too much.

Depending on what we are working on, that may be very easy, for example if we're adding UI features or changing how tools work. If we're doing bigger changes that affect how things are stored in the project, then we need to be pretty sure about things before releasing them in a beta. If we release and then have to change them, it creates more work for us to massage the old beta project data into how the newer versions work, if that is possible. If not possible, we'd consider that a disaster.

What has happened for 4.2 is we had ideas for physics for a long time. We had prototypes even before 4.0. Finally we felt it was time, we did more serious prototypes and it looked promising. We did proper integration of physics into the editor. That was a significant effort for what's going on behind the scenes because it's very different than how Spine used to work.

Before 4.2, Spine is fully deterministic: for any time on the timeline, the pose of the animation is the same. With physics, that is out the window. The pose from physics depends on what was happening in the previous frames. This makes some things more complex in the Spine editor, but we got that done though, and it's nice. There are 2 modes:

  1. Physics are computed all the time, even when playback is stopped. The pose from physics is affected by the animation playing, looping, bones that you move around, etc.
  2. Physics are computed deterministically from frame 0. At any given time in the timeline, you always get the same pose, though that pose does depend on the previous frames.

An interesting aspect is that this is an important consideration at runtime. Your skeleton will animate with physics as you play animations, but you can also tell the physics that the skeleton moved in the game world space so that physics can respond.

For example, say you have a cape and a running-in-place animation. At runtime you move the skeleton around in the game world. You'll want to tell the physics about that movement so that the cape physics respond appropriately, not just to the animation movement.

You also need to be able to reset the physics at runtime. For example, when your character starts a new level, you don't want their cape physics flapping from whatever they were doing in the last level.

These things means there are some runtime API changes that you'll need to consider starting with 4.2.

Back to what's holding up the 4.2 beta -- so we've did the necessary changes for nondeterminism. Next we brought in how we want physics to work from our prototypes, created UI for configuring it, etc. It worked and was close to be released in the beta. The physics had a node and spring mechanism. You could do neat stuff, like take this setup:

And when animated you'd get a pretty realistic cloth simulation:

Sorry I can't find a GIF of that animating. I found some others though. To spice up this post a bit, here are a few more interesting GIFs. Two nodes and a spring:

More nodes:

More springs:

Collisions:

Nodes can be attached to bone to fix them in place or otherwise drive their position from bones:

You can of course go nuts, this is similar to the cloth setup in the editor screenshot above, but without gravity:

Nodes and springs can drive bones, affecting translation, rotation, and/or scale:

This next one is an animation being played repeatedly in the editor. It shows the two physics modes. When Simulate is not active, the pose resets when the animation repeats. When it is active, the pose is updated continuously even when the animation repeats.

Showing nodes and springs affecting bone rotation and scale:

Anyway, this was all pretty cool. However, we eventually decided it's not actually the way forward. 🙁 It's useful for some things, but not everything we wanted. For other use cases it's hard to control. Despite being so close to release, we decided to redesign and see if we can do better. We came up with a new approach that better fits the use cases, did prototypes, ripped a lot of what we've done out of the editor. It's taking a long time and a little sad to nuke your own work, but the end result will be better. Ideally we would have made these changes earlier, when it would have been less painful. We tried, but we just couldn't have know without making it truly usable, and that took a lot of effort. Out of the pain will be born something even more beautiful. 🙂

So that's where we are now. We have the new things working in the editor again, but not fully and it's not ready to release. It's steadily getting closer though!

As for how we came up with Spine, I wrote a blog post a long time ago -- wow, it's been 10 years. That covers the early days and some of the technology used:
http://esotericsoftware.com/blog/building-spine

It's kind of funny that I was dorking around in QBasic as a teenager with stick figures. I had a really bad editor where you could move the stick figure points around. It stored the points as poses and the game played animations by interpolating between the point positions, very roughly how Spine works. I didn't revisit it until some 20 years later when I was working on games and found the need for Spine.

Nate, thanks for the detailed answer! The post is very interesting!

Very looking forward to it. Have you guys considered Constraints management with this? I definitely want to see if I can apply this to hairs, but I am concerned about managing Constraints when each Hair Skin contains at least 4 strands (each with their appropriate physics profile).

We know organizing many constraints is a pain, but let's not add too much to the release that is taking extra long! We do want to get to that soon though.

5 jours plus tard

@Nate
I REALLY need this!!!!
out of curiosity, is it based on Farseer Physics?

No, it's our own physics. A 3rd party library would be overkill for what we need to do, plus we need it to be very lightweight and run in all game toolkits and languages. It's relatively simple to get basic physics going, though the devil is in the details.

6 jours plus tard

I just have to say the sneak peek looks dope! You guys are doing amazing things, I wish you all the best!

The good thing that you left as with pretty neat 4.1 Spine editor version which is bug free and works amazing. I would struggle with 4.0 honestly would rather work with 3.8 than 4.0

So take your time.

un mois plus tard
Nate a renommé le titre en 4.2-beta status update le .

A little informal update: we've been doing an internal beta and it's looking good. We hope to have the 4.2-beta available in a week or two.

Below is a smattering of examples, done quickly and a little roughly, but they show some of what is possible.

First here is the old alien animation:

Here it is with physics on the head:

It works really well for any hanging parts or accessories, like Spineboy's hair. Here all of Spineboy's hair keys have been deleted and physics constraints added. Note how the hair is dynamic and responds similarly to how it was keyed (but without all that work!). It also responds across animations changes and there is now dynamic hair movement during the aim animation:

Here the platform from our Wave Principle - Animating with Spine #4 video, but without keys on the platform tail:

Here's a chain of bones that behaves similar to a whip when rotated. The bones near the end are also scaled using physics. There are tons of interesting effects that can be squeezed out of the physics! This one could maybe be used for flames in a fire. All of this movement comes from just rotating the one bone.

Here's a quick test on the mix-and-match hair, physics giving some rotation and some translation lag:

It's not limited to just accessories, it can be used on major character features, like the raptor's tail. Here is the raptor with all the tail and gun keys deleted for walk, jump, and roar. 317 keys were deleted! The tail is straight and the gun doesn't move.

It took 12 mouse clicks to setup physics on the tail and gun, giving this:

More time could be spent refining the physics settings, but this is already great. The amount of time physics saves animating things is huge AND the results are better and react dynamically. Plus since your animations have hundreds fewer keys, the data files are smaller.

Anyway, back to work we go to get it finished up. It won't be too long now!

    Nate Will the the runtimes be ready when 4.2 beta debut?

    There's no guarantee that all the runtimes are ready during a beta. To start, only spine-libgdx will be ready. spine-unity and the others will be ready shortly afterward, roughly in popularity order.

      Nate How did your team redesign the physics differently this time around?

      Just to show my excitement, but not really expecting a response to this:
      I'm wondering if we'll be able to key the bones affected by physics nonetheless, kind of overriding the procedural animation, or it's either one or the other.

      I guess I'll see as soon as 4.2 stable comes out 🤤

      Instead of nodes with springs between them, the bone's transform properties are offset based on the bone's movement, then return to the unconstrained pose using physics. This allows you to specify the pose as normal, but have physics give you automatic overlap and follow through.

      You can indeed key the bone properties constrained by physics. Physics offsets the unconstrained transform values, so you can manipulate the transform values yourself even when mix is 100%. Like other constraints, you can mix between the physics (constrained) pose and the unconstrained pose.

      If all that sounds complicated, don't worry, it's quite intuitive in reality.

        Looks bloody amazing!

        Nate Will there be nodes with springs in-between type of physics? I have started to add that type of physics to my Vtuber application but I am not sure if I should keep that physics system.

        Currently we have removed the node/springs in favor of the new system. I'm not sure they'll come back. They were useful for a few particular things, but otherwise the new system is much easier to get good results. A lot of that comes down to the unconstrained pose being what the user wants and the physics just offsetting that. With nodes/springs they often fall down or end up in a straight line.