• Editor
  • Clipping Mask + Mix & Match approach

Hi,

I couldn't find what I was looking for in the clipping mask docs, and I have a question before I upgrade to Spine Pro.

My game uses a mix & match approach to create a modular character. Two of my character's slots are the hair and the helmet. I have several different hair & helmet skins, with different attachments. The helmet is on top of the hair in the draw order, but certain hairs are larger than certain helmets height wise.

I was wondering if it's possible:

  1. To apply a unique clipping mask to each helmet skin, so that it hides the players hair underneath the top portion of the helmet.
  2. To only use a clipping mask for certain helmets.

Regards,
Adrian

Related Discussions
...
  • Đã chỉnh sửa

Sure, you could do that by having a clipping attachment for each helmet. Probably your helmet skin has an additional slot and skin placeholder which holds the clipping attachment. A skin that doesn't need it just wouldn't have a clipping attachment in that skin placeholder.

Note that clipping attachments are relatively expensive at runtime. To help reduce the impact, try to minimize:
1) the number of clipping attachments that are active,
2) the number of vertices in the clipping attachment (eg 3 is best, else as few as possible), and
3) the number of triangles clipped, which you can see on the Metrics view. The number of triangles an attachment has is related to the number vertices (triangles == vertices / 2), so you could also say the number of vertices clipped. Region attachments have 4 vertices, 2 triangles.

Thanks Nate!

Regards,
Adrian