• Editor
  • Best way to swap / re-import PSD

Hi, I'm looking for advice on the best way to re-import a PSD file into Spine when the animation already has meshes, weights, bones, etc. I've had some changes in my character's size, and when I re-import the PSD, the resized images end up misplaced, distorted, or stretched. I'm worried about having to remake the entire animation each time I update a character.

I came across this post (https://esotericsoftware.com/forum/d/14610-image-resize--swap-issue), but since I'm using Spine for a game, I'm concerned about exporting each part with the entire canvas size. Also, since I'm using the PSD importer, I'd prefer to avoid manual exports.

As a new user, if there's a well-known workaround for re-importing PSD files for animations already in progress, I'd really appreciate your help.

Related Discussions
...
  • Изменено

To re-import a PSD file into Spine without disrupting your existing animation, you can follow these steps:

  1. Maintain Consistent Image Sizes: Ensure that the new images in your PSD have the same dimensions as the original images. This prevents distortion and stretching when the images are replaced. If the sizes must change, you may need to adjust the mesh settings manually.

  2. Use the PhotoshopToSpine Script or Import PSD*: This helps in exporting your PSD layers to Spine while maintaining the structure. You can find the script and instructions here.

  3. Import Data into Existing Skeleton: Spine allows you to import PSD data directly into an existing skeleton. This feature can populate new skins and replace the positions of already placed attachments. However, note that if you replace images that were meshes, they will revert to region attachments. More details can be found in the Spine User Guide.

  4. Use Layer Masks: If you anticipate needing to replace images frequently, use layer masks in Photoshop to define cropping boundaries. This ensures that the images maintain consistent sizes and positions when imported into Spine. You can find more information on using layer masks here.

  5. Adjust Draw Order and Slots: After importing the new PSD data, you may need to adjust the draw order and slots. You can filter the tree on slots and use shortcuts like + and - to change the draw order of the selected slot. More shortcuts can be found in the Spine Cheat Sheet.

  6. Texture Packer Settings: Enable the "Strip whitespace X/Y" option in the Texture Packer settings to remove excess whitespace from images, which helps in maintaining the texture size.

By following these steps, you can re-import your PSD files into Spine with minimal disruption to your existing animations.

You can use import PSD or import data into an existing project and unchecked to replace attachments. That will recreate the images from the PSD and it will add any missing attachments, but it won't touch existing attachments (just the image file may change).

If you change the size of a mesh, you'll get a resize prompt when that mesh is first displayed:
https://esotericsoftware.com/spine-meshes#Image-resize

  • Choosing Yes is helpful when you added whitespace. If you added the same whitespace on all sides, there's nothing else to do. Otherwise you may need to select and move all vertices at once in edit mesh mode.
  • Choosing No will stretch the mesh over the new image size. You'll probably need to move the vertices to make sense for the new image size.

If you animated bones, you can likely modify existing meshes or create new meshes and all the same animations will still work. You generally want to avoid using deform keys in your animations.

Got it, thank you. I actually tried both options: Keep..? / Stretch..?, but one of my character's arms got shortened and all the positions were slightly misaligned. Is there a way to 'reset' the position information without losing the mesh/weight data?

The reset functions will also reset the weights. You can use edit mesh mode to adjust the vertices though.

Got it. Thanks for clarifying.