• Editor
  • Different Size Skin Pieces

Related Discussions
...

Another dumb question from a Spine Newbie:
I'm creating characters with several different skins, but they are wildly different. Take for instance this lower jaw, of two different skins. I overlapped them and painted the red dots into the image that was smaller, to test and see if it then moved to the same location of the larger jaw. It did, as I expected.
This is just the jaw though, every single piece of our characters is like this. Our biggest difference comes from the heavily armored character vs the skeletal one. The images are all at completely different sizes. We also are not making all the skin variations at the same time, so I'm creating one skin in photoshop, exporting to Spine, creating the rig and animations, and later on we revisit and add more skins. But, when adding the new skins that are of different sizes, this happens.
How can I get the skins to stay in the locations they need to be, given they are different sizes and being created at different times in photoshop? Can I re-import the JSON file from photoshop, without destroying my animations and rigs? Do I need to do this in a different way than skins? Should I make some kind of 'invisible' box around every piece of the character, that each image will fit into, and then export it as one image, so that they all have the same pivot point? (no idea how to do this)


Additionally: To go along with this issue, we also ran into another to do with these different skins. Some of our skins will have extra pieces that need to be animated. So, I'll need to add more bones, and have the images created for them, attached in the correct location. For this, think about a character that is just a guy in jeans and a jacket, but the other skin has chains wrapped around him, and hanging off the arms or something. Since these chains, and consequently bones, are created after the main rig/skin was, how can I go about adding them precisely where they are in photoshop?

Hello joker0720,

Regarding meshes that change size, we will improve the behavior: Prompt for user decision when mesh images are resized · #205 · EsotericSoftware/spine-editor

You can also see how they currently work here: Meshes - Spine User Guide: Image resize
As you can see from the link, it is possible to readapt the mesh, you can also do so by unchecking deform and adjust the vertices.

joker0720 wrote

How can I get the skins to stay in the locations they need to be, given they are different sizes and being created at different times in photoshop? Can I re-import the JSON file from photoshop, without destroying my animations and rigs?

Yes you can! This thread should help: Setting up to add skins later I also highly recommend the video, as I go into mesh problems as you do, and I'm adding skins with their own bones and particular proportions and gear.

joker0720 wrote

Do I need to do this in a different way than skins?

No, skins are good, keep using them unless the proportions of the skeleton (longer limbs, other things that would mess up the main animations) change.

joker0720 wrote

Should I make some kind of 'invisible' box around every piece of the character, that each image will fit into, and then export it as one image, so that they all have the same pivot point? (no idea how to do this)

It depends, I would avoid this as much as possible, but if you're determined to do the least possible work and you don't care that much about atlas space then you could probably do this, but the best way would be to tailor adjust the mesh/redo the mesh for each piece that isn't a recolor.
If you want to import a new skin and not lose the correct positions, you don't need to care about the pivot, but you can use the method described in the link above.

joker0720 wrote

Additionally: To go along with this issue, we also ran into another to do with these different skins. Some of our skins will have extra pieces that need to be animated. So, I'll need to add more bones, and have the images created for them, attached in the correct location. For this, think about a character that is just a guy in jeans and a jacket, but the other skin has chains wrapped around him, and hanging off the arms or something. Since these chains, and consequently bones, are created after the main rig/skin was, how can I go about adding them precisely where they are in photoshop?

The only addition to the advice of watching the video, is to keep this additional gear from cluttering your space with bones as much as possible, since it's something that goes in a skin, try to reuse already present bones or add new bones as points to control the meshes or you'll be having a hard time using your skeleton.

8 days later

Hi Erikari,
Thank you for responding! I'm having a problem really following along with that section of the video, for the new skins. I've watched it a few times, but I just cannot seem to follow along during that part. The 'importer' part really threw me for a loop, as well.
Is there perhaps a resource that goes over these steps on perhaps a less complicated rig, or otherwise? I try to follow along, but I keep messing something up. I've tried probably half a dozen times so far, haha.


Erikari wrote

...so far the fastest workflow has been this:

  1. export with the photoshop script

Okay, this part I think I got. From the same Photoshop file before, I exported all the skins together.

Erikari wrote

2. import the new json as a second skeleton in your existing project

This part seemed to go smoothly, all the parts are where they should be, on the new skeleton.

Erikari wrote

3. make a copy of an existing skin (especially if that shares some pieces with the new skin)

4. use find and replace to replace the pieces that are the same in both skin from one folder to the other skin folder

This part seems to work sometimes, and not others. For the life of me I cannot figure out why. Given that you were having issues with this part, in your demo video, I think that is why I have some confusion on this bit.

Erikari wrote

5. delete the not common/different mesh parts

Honestly, I didn't understand most of what was happening in this section, even after watching a few times.

Erikari wrote

6. drag the different parts from the new skeleton to the old one

What parts? There was a lot of importing of new skeletons, deleting them, importing again, doing the skins again, and in that process, I also got lost.

Erikari wrote

7. parent the images to the bones

[/quote]
I haven't succeeded far enough to even know if I'll do this part wrong or not.


Figured out one issue. Turns out that Find/Replace is case sensitive, even if you don't have that box selected.


Even after doing the 'trick' to replace images of different sizes (every single piece of my rig), they still all end up in the same location they would have, if I just did the Find/Replace alone, without ever bringing in a new skeleton and doing all that (meaning they aren't in the same location, as they are in the PSD file).


After more digging, it seems Spine also has a bug with bringing in a second skeleton, sometimes. Doing the same thing on multiple occasions, it appears that sometimes the images come with the skeleton, sometimes they do not. Refreshing the images path, brings the images in.


I've developed another way to do this, and got it to work.


Since I was able to repeat the bugs a few times in a row (and even noticed it in your video, once I figure out what it was), I also posted bugs.

joker0720 wrote

Figured out one issue. Turns out that Find/Replace is case sensitive, even if you don't have that box selected.

I tried to repro this, but it was working for me both on beta and stable. I would have never noticed since I have a habit of writing these names always in lowercase and kebabcase lol. What version are you using? Maybe Nate ninja solved it.

joker0720 wrote

Erikari wrote:
5. delete the not common/different mesh parts

Honestly, I didn't understand most of what was happening in this section, even after watching a few times.

Basically all the parts that you don't need in the new skin or that got broken get deleted.

joker0720 wrote

What parts? There was a lot of importing of new skeletons, deleting them, importing again, doing the skins again, and in that process, I also got lost.

Sorry about that! Indeed it was live and I made mistakes, but what you need to do is: you have both skeletons active, both have the same skin name, in the imported skeleton you select only the new pieces that are not in common with the old skin and that are not present in it, then you drag them in the skeleton where you want them to be.

joker0720 wrote

Even after doing the 'trick' to replace images of different sizes (every single piece of my rig), they still all end up in the same location they would have, if I just did the Find/Replace alone, without ever bringing in a new skeleton and doing all that

I can only assume they had the same pivot for this, or you're not talking about replacing images with different sizes, but same sizes, otherwise if you drag them from one skeleton to the other, they have to retain their position from the old skeleton.

joker0720 wrote

After more digging, it seems Spine also has a bug with bringing in a second skeleton, sometimes. Doing the same thing on multiple occasions, it appears that sometimes the images come with the skeleton, sometimes they do not. Refreshing the images path, brings the images in.

Many bugs were recently fixed in beta regarding this, so I hope you won't find them anymore!

joker0720 wrote

I've developed another way to do this, and got it to work.

glad you got it to work! and thanks for taking the time for the bugs, I'll have a look at them tomorrow!

a month later

I still have the problem that the skin I'm copying to the rig (by doing the 'transfer bone' and such), still moves the image, sometimes. I do not know why that is happening. Any ideas?


Erikari wrote
joker0720 wrote

Figured out one issue. Turns out that Find/Replace is case sensitive, even if you don't have that box selected.

I tried to repro this, but it was working for me both on beta and stable. I would have never noticed since I have a habit of writing these names always in lowercase and kebabcase lol. What version are you using? Maybe Nate ninja solved it.

3.6.53 Pro, launcher 3.7.20

Erikari wrote
joker0720 wrote

Even after doing the 'trick' to replace images of different sizes (every single piece of my rig), they still all end up in the same location they would have, if I just did the Find/Replace alone, without ever bringing in a new skeleton and doing all that

I can only assume they had the same pivot for this, or you're not talking about replacing images with different sizes, but same sizes, otherwise if you drag them from one skeleton to the other, they have to retain their position from the old skeleton.

This is still happening to me. They are definitely different sizes. Here is my steps:

  1. Make copy of skin on main rig. Rename it to the new skin.
  2. Import new .json file into scene as a new skeleton.
  3. Create 'transfer bone' and move all the slots from root to this new bone
  4. Move 'transfer bone' to the main rig, under 'root'
  5. Copy images over top of the images that are already there in the main rig, from the new skeleton. (ie leg_right to leg_right)
    Sometimes when I do this, the image doesn't move, sometimes it does (right now, it is moving). I have no idea why.

I MAY have just figured it out... if I copy OVER the old image, it moves to where that image is. But, if I move it to the skinholder, it will then be where it is supposed to be... very odd way that works. But it appears to be where my issue arose from.

5 days later

Aye, sorry that was confusing. It's common to want the same attachment transform when replacing a skin placeholder's attachment, so we made dropping an attachment on another copy the transform. Without that you'd need select the old one, copy, replace the attachment, paste. Drop on the skin placeholder to replace the attachment without copying the transform.