• Editor
  • Allow slot exclusion from clipping mask

Currently, Spine’s clipping mask applies to everything between its start and end slot, without the ability to exclude specific slots. This is problematic when an animator wants to have an object (like a character) appear above a clipped background while still keeping the background masked correctly.
The current workaround requires rearranging the Draw Order or splitting animations into separate Spine projects, which can be impractical when working with complex scenes. It would be much more efficient if we could simply mark a slot as “Excluded from Clipping Mask” so it remains visible even if it’s within the clipping range.

Proposed Solution:

  • Add an “Exclude from Clipping” option for slots.
  • Allow specific slots to be ignored by the clipping mask, while still applying it to everything else.
  • This would eliminate the need for workarounds involving layer duplication, multiple skeletons, or animation splitting.

Benefits:

  • More flexibility in organizing Spine projects.
  • Less manual work adjusting Draw Order to avoid unwanted clipping.
  • Cleaner and more efficient animation workflow, especially in layered environments.

Would this be possible in a future update?

Related Discussions
...
Bayek alterou o título para Allow slot exclusion from clipping mask .

First I have to mention that, unless you are exporting images or video, clipping should be used sparingly. Clip as few vertices as possible for performance. Definitely don't use a clipping attachments for your entire skeleton.

If you are exporting images or video, you can specify cropping for the export rather than use clipping to define the export size. If exporting data for a runtime, you could let images be drawn outside the viewable area, without clipping. They would be drawn off screen or can be masked or clipped efficiently at runtime. In either case, it can help when animating to have a rectangle that denotes the viewable area in the Spine editor, but is not exported.

Can you explain the use case more? Isn't the background by definition fully behind the character?

A checkbox to exclude a slot from all clipping attachments may be somewhat simplistic. It handles the use case up until you need to exclude a slot from one but not others.

Would using 2 identical clipping attachments achieve the same goal with more flexibility? Eg, if you have rectangular clipping (again which should be avoided if possible) for the background, you could have a duplicate for the foreground. Your character would be between the two clipping attachments in the draw order.

In my case, I’m working with a set of animations that have different sizes. I use the same background for all the animations, and the size of each animation is adjusted (covered by clipping).
Above the background, there is a symbol that pulses and extends beyond the background during the animation, but the clipping automatically covers it. If I move the symbol out of the clipping in the Draw Order, it gets covered by the background that is being clipped.
The only option would be to split the animation into two separate ones, but I don’t want to do that since I want to export a single JSON and texture atlas.