• Editor
  • How to handle a VERY large amount of slot attachments?

I'm working on an indie side-scrolling MMORPG and I'm beginning to worry about scaling a large number of attachments within the spine and curious as to if there's a better way to handle it. Currently I only have a few tiers of equipment (of different types) however considering I have 9 equipment slots that can affect the way the character looks, this has easily turned into nearly 100 different attachments.

Cloth, Leather, Plate (3 * 9) = 27 * 3 (armor tiers for the tech demo that we're preparing) takes us to a total of 81 attachments inside the spine editor.

If we add dozens of tiers of equipment this can scale out of control very quickly to thousands of attachments.

Is this something that spine is equipped to handle, or is there a different way we should be handling our equipment?

I'm using the PRO version of SPINE and I do use PRO features such as IK Constraints and Deformation on the equipment for certain animations, so just overlaying equipment on a joint after-the-fact wouldn't really work for me.

Related Discussions
...

If you want every attachment to be unique then of course there can be no shortcuts and you have to rig each one individually in Spine. The most common use cases get the most attention and most people aren't rigging tens of thousands of attachments in Spine, but some are. Spine is quite efficient and scales well. Last we tested, on a beefy desktop you can get up to around 75k attachments without dipping below 60fps. You can test this yourself by duplicating your attachments, selecting them all, duplicating a few items, selecting everything again, duplicate, etc. The Metrics view shows you how many attachments you have, eg here's 54k attachments at 61fps:

Image removed due to the lack of support for HTTPS. | Show Anyway

Spine's frame rate is limited to 60fps by default. You can set the limit higher in the settings to see how increasing the number of attachments is affecting it. Also in the settings is Show FPS, which shows the FPS in the title bar when an animation is playing.

Note that such a massive project may be hard to maintain for reasons other than Spine's performance. Also such a project's performance is more sensitive to changes in Spine. If you do encounter performance issues, please let us know.

Most projects with a huge number of attachments are willing to take some shortcuts to make it easier to create new content (new attachments). The idea is to rig an attachment that is essentially a template. At runtime, you copy the attachment and change the texture region it uses. This means in Spine you only rig one of each type of attachment, which can save an enormous amount of effort.
Runtime Skins - Spine Runtimes Guide: Creating attachments

At runtime it's unlikely that you can pack all your images into a single atlas page texture. You likely will want to determine what images a skeleton needs based on their in-game equipment, animations that will be played, the game's level, etc. You would distribute loose image files in your app and you'd pack an atlas with only the images needed.