- Изменено
Multiple Skeletons, Multiple Characters - Sharing Assets
So because of this atypical pixel art style that I am attempting, a single character might have a separate skeleton for each animation (or at least different images for each piece of the character). But it might share some parts as well, like the head and the hat. In fact, the hat image needs to be shared across multiple characters.
If you understand where I'm coming from, what is the best way to handle all this? I could perhaps write a script for exporting from photoshop. But I don't think a single spine project can have multiple skeletons, can it?
Update: I probably should be looking into "Skins" right?
Exactly! Skins are what you want. Specifically, skin bones: Skins - Spine User Guide: Skin bones
That allows you to nicely manage your "sub-skeletons" while sharing other things across animations.
Spine does allow you to have multiple skeletons in a single project, but these skeletons can not interact meaningfully.
I've been at this all day trying to figure out how to have multiple poses with multiple skins. I think I have got it but maybe there is a better way to do this that I'm missing.
Through trial and error with the tagging system, this is the naming scheme of my .PSD
Here I have a pose folder "Idle" and within it are various subfolders with skins. In this particular folder, I used the slot and bone tags to automatically create slots and bones.
Then I have another folder "Strike_End". This folder also has subfolders with the skins, using the same naming scheme. The "slot" tag I use in this folder tells Spine that these layers with the same names will go into the previous slots.
The script output content looks like this:
Now if I import this data to spine I get this:
So here my skins are divided into the pose folders and then subdivided into part folders. So there is a brownpants skin in the pants folder of Idle that is different than the brownpants skin in the pants folder for Strike_End. Switching between skins here means building it from the Pose folder up. As you can see in the image, all my skin selections come from the Idle folder in order to build an Idle Posed character of various parts. It would be nice if I could just select a "brownpants" skin and it would use whichever brown pants I need for the current pose, but I don't see how that can be done.
Now if I want to create separate animations that use different skins. I first need to build the character in the starting pose I want using that skin folder. Then keyframe all the bone translations.
But if I want to switch from an Idle animation to a Strike_End animation within the Spine Editor, I will need to rebuild the skins each time. This is because you can keyframe the bones, but not the skins themselves.
Erika showed me this article on how a skeleton can use different images for parts in order to create different poses. http://esotericsoftware.com/blog/Rigging-new-poses-tutorial What I got out of it is that you can have different images in a slot, and then key them for different poses. This works fine without skins. But this doesn't seem to apply to me if I'm using different skins AND different poses.
You can see in the last images how the right_upperleg skin placeholder has brownpants, brownpants, redpants, redpants. That's because of course there is a brownpants for an idle pose and a brownpants for a strike_end pose. It's easier to work with by looking at the Skins tab where you can only select from the pose you are currently working with.
Here is another example with the Strike_End(Pose). Again each skin must be manually reselected since they cannot be keyed.
But I still feel like there is a better way to do all this. I can't be the first person working with different poses and different skins. So maybe someone else has worked out the best way to do this.