Spine 4.2: The physics revolution

We are happy to announce our new Spine 4.2 release! There are a ton of new features, many of which we've been dreaming about since the first release of Spine, more than 10 years ago. Now they are here!

Let's dive into some of the highlights!

Physics

Physics in Spine is revolutionary! Physics will save you so much time. Spine can now move bones automatically by simulating real world physics, making animating much easier!

You no longer need to painstakingly animate secondary motion for hair, clothing, and other items. Anything that moves naturally can use physics to move automatically.

Besides saving time, physics also gives you dynamic movement. Physics reacts fluidly and realistically both across animations and from movement of your character through the game world.

PSD import

Spine can now read PSD files directly to bring in your art. This frees you from Adobe Photoshop, allowing you to use any image editor that can save a PSD file.

As a bonus, it is also about 10x faster than the PhotoshopToSpine script!

Pixels mode

When using Spine for pixel art, the new Pixels mode translates region attachments to match screen pixels. This ensures your attachments are not blurry from being off be a fraction of a pixel.

There is also a new Highlight Pixels hotkey that highlights attachments that don't match screen pixels. This makes it easy to see where attachments may be blurry so you can make corrections.

Constraint management

4.2 brings a number of improvements for projects with many constraints:

  • Duplicating a constraint will ask you if you want to duplicate all the bones. This can save a lot of time, for example when setting up limbs.
  • When multiple constraints are selected you can now change them all at once.
  • Copy a constraint and paste the settings to another constraint, even in a different skeleton.
  • Add or remove individual bones from a constraint.
  • Turn off a constraint via its visibility dot, without changing your mixes.

Weight tools

The new Weld feature matches weights across meshes, effectively welding them together. This allows multiple meshes to deform identically, as if they were a single image.

While great for using separate meshes seamlessly, Weld also saves time since your clothing, facial expressions, clipping attachments, etc can use your existing weights.

Also you can now copy and paste weights to other vertices, even on other meshes.

Looping curves

The curve handles of the first and last keys of looping animations are now synchronized. Sometimes it's the small things that save you a lot of time!

Folders

Draw order folders allow organizing your slots for large skeletons. You can adjust the draw order by dragging a folder rather than individual slots.

Constraints folders make complex skeletons more manageable. Middle click a folder to select all the children.

Root motion

Our spine-unity runtime can perform root motion for you!

Normally you animate a walk cycle in-place, then code at runtime moves it at the right speed through the game world. When the movement is complex, like a shuffling zombie, it's very difficult for code to match the animation.

With root motion, the walk cycle is animated with movement. At runtime we remove the movement from the animation and apply it to the game world position. The resulting movement is a perfect match to the animation.

You can even go one step beyond and use Root Motion Delta Compensation to seamlessly adjust the distance of a jump animation to even a moving destination. Avoid clumsy falls and keep your characters on target with this feature.

New Runtimes

Since our 4.1 release last year, we have added additional runtimes! With spine-godot, we've implemented a runtime for the most popular Open-Source game engine currently available.

For folks who favor a more direct approach, we've created spine-sdl, which can be used with either our spine-c or spine-cpp runtimes.

With spine-flutter, we have started our foray into mobile apps, with more to come!

Our spine-phaser runtime is a complete replacement of the old Phaser Spine Plugin, which will guarantee timely updates from our end, and lessen the burden on the Phaser team.

More recently, we have added spine-haxe to our arsenal. It can be used with Starling on top of OpenFL/Lime. We are planning to also support other frameworks on top of OpenFL, such as HaxeFlixel.

Our final entry in the list of new runtimes is spine-pixi, an official runtime for PixiJS. As with spine-phaser, we want to ensure our users get timely updates and lessen the burden on the PixiJS team.

Both spine-haxe and spine-pixi are production ready and have a plethora of code examples to get you started with. We are currently working on completing the respective documentation, which will be ready in the coming weeks, if you prefer text over code.

Unreal Engine 5.3 support

Starting with Unreal Engine 5.3, Epic has changed the way assets are handled. It is now no longer possible to have two assets with the same name but different types in the same folder.

As such, you now need to ensure that your skeleton files (.skel, .json) and atlas files have a different prefix. E.g. skeleton-data.skel and skeleton.atlas. Alternatively, you can put your skeleton data and atlas files into separate folders.

The spine-ue runtime does not have proper access to assets created in older Unreal Engine versions. As such, we can not provide an automated upgrade path. If you want to migrate projects to Unreal Engine 5.3, you have to manually recreate and rewire your assets.

Unity

We've enriched physics capabilities on the runtime side as well. Any Transform movement is seamlessly integrated with the skeleton's physics constraints. Just move the skeleton around and see physics respond instantly. If the default settings fall short, a small change to the Physics Inheritance settings could do the trick. Don't miss the new Physics Constraints example scene and be sure to give those skeletons a good rattle - shaken, not stirred.

The SkeletonGraphic component has also received some new features. Just set the new Layout Scale Mode to automatically fit the skeleton to its RectTransform bounds. Also, have you ever struggled with SkeletonGraphic displaying incorrectly or finding the correct Inspector and material settings? Those days are over, thanks to the new auto-detect buttons! There is even a Detect Material button to automatically assign the correct material from our newly expanded materials set.

No release would be complete without shader improvements. We now support Tint Black at all Spine URP and Spine/Sprite shaders, and have added URP blend mode shaders to round out this update.

Runtimes changes

All runtimes support all the new editor features! Please refer to the Spine Runtimes changelog for game engine and language specific changes.

With the additions of physics, we needed to change a few APIs:

  • Skeleton.updateWorldTransform() now takes an additional physics parameter. This parameter defines how physics and other non-deterministic updates are applied. In most cases, you want to use Physics.update, which will update physics and apply it them to them to the skeleton.
  • To drive the physics simulation, the physics code needs to know how much time has passed. This information is stored in each Skeleton. If your frame time has advanced, make sure to inform the Skeleton by calling Skeleton.update(deltaTime).
  • We have renamed TransformMode to Inherit. Unless you manually set transform modes, this change should not affect your code base.
  • We have renamed TrackEntry.attachmentThreshold to TrackEntry.mixAttachmentThreshold, and TrackEntry.drawOrderThreshold to TrackEntry.mixDrawOrderThreshold. This also applies to the respective getters and setters, depending on your programming language of choice.

Besides these API changes, you will also have to re-export your skeletons with Spine Editor version 4.2 if you want to use the Spine Runtimes 4.2. See our Spine Versioning Guide for more information.

Up next

We are very happy with Spine 4.2! The new features are easy to use but very powerful. Physics is a game changer, saving you tons of time while also improving your animation with dynamic movement.

After a big release like this, we like to do a smaller release with refinements and quality of life improvements. In 4.3 we will focus on streamlining your workflows. The goal is to save you time by reducing the effort needed to perform common tasks.

Thanks to everyone in our community who reported issues, tested the beta, and gave their suggestions and feedback to help shape our new features. Your input is invaluable!

Happy animating!
–Your Spine Team

Discuss this post on the Spine forum.