Related Discussions
...

Linked meshes in Spine are primarily used to reuse a mesh with different images, often across different skins. This allows you to maintain a single set of deform keys and mesh structure, which can be shared among multiple images. Here’s a detailed explanation of how linked meshes work and how you can use them:

  1. Creating a Linked Mesh:

    • To create a linked mesh, select the original mesh in the tree properties and click New... then Linked Mesh.
    • The linked mesh will share its vertices, edges, texture coordinates, and weights with the source mesh. Any changes made to the source mesh will automatically apply to the linked mesh.
  2. Using Linked Meshes with Skins:

    • Linked meshes are particularly useful when working with skins. You can place linked meshes under different skin placeholders within the same slot. This allows you to switch between different images while using the same mesh structure and animations.
    • To use a different image for the linked mesh, you can rename it or set a new image path.
  3. Inherit Timelines:

    • If Inherit timelines is checked, any deform keys for the source mesh will also affect the linked mesh. If it is not checked, you can set deform keys for the linked mesh separately from the source mesh.
  4. Slot Constraints:

    • Linked meshes must be under the same slot as the source mesh. Slots can only show one attachment at a time, which means you cannot have multiple linked meshes visible simultaneously within the same slot.
  5. Practical Example:

    • Suppose you have a flag mesh animated with deform keys. You want to use different flag images with the same animation. You create linked meshes for each flag image and place them under the same slot. When you switch skins, the appropriate flag image will be displayed using the same mesh and animation.

Here is a visual representation from the documentation:

Linked Mesh Vertices

To connect a linked mesh to a skin or other regions:

  • Ensure the linked mesh is placed under the same slot as the source mesh.
  • Assign the linked mesh to a skin placeholder if you are using skins.
  • Change the image path or name for the linked mesh to point to the desired image.

For more detailed steps and examples, you can refer to the Meshes - Spine User Guide: Linked meshes.

acai

Are they only used for skins?

No, you can use it without using skins. For example, let's say you have a lot of mouth mesh attachments for facial expression variations, and you want to give them weights for the head bone and the head-control bone, which control the direction of the face, to add a 2.5D effect. In this case, it would be time-consuming to re-set the weights for each mouth attachment, so it would be easier to set one of the mesh attachments as the target mesh and link the other mouth differences to it.

As Misaki (and Spinebot) said! Also note you usually want your linked mesh images the same size as the source mesh image, otherwise it will be stretched and is probably not what you want.

Thank you both for your quick replies. Just to clarify, once I create a linked mesh, should I assign an image of the same size by typing the image name from the Image Path?

    acai Yes, the procedure is correct if you want to use a different image, but it may be more common to change the attachment name than to change the image path. When changing the attachment name, if the Clear image path box is checked, it will refer to the image with the same name.

    I forgot to add this, but linked meshes can also be used to add color variations of the exact same image, such as hair or eyes. Therefore, when creating linked meshes, it is not always necessary to change the image path.