[see posts below]
KEYABLE skin switching
- Editado
Hello foriero!
It is already possible to make 360° rigs, you can download two examples with two different approaches here: Spine: Twitch
As well as see the complete rigging process involved, or jump to parts of interest using the chapters.
Image removed due to the lack of support for HTTPS. | Show Anyway
Spine: Tips: 10.8 directions
Image removed due to the lack of support for HTTPS. | Show Anyway
Spine: Tips: 19 cat turn
Skins are better used to change a character's appearance rather than create turnarounds, as then you'd need to have a skin for each direction and also each item.
With 3.8 release we are one step from 360 characters animations. I have preliminary tested it and all is working great. With 3.8 we can make skin specific animations and also skins combined animations. So there is really last thing missing which is keyable skin switching. We've already thought how to do it with current state of matters and we will simply call event and do it in unity but if you guys can make it keyable then WOW.
I moved posts from another thread, but for some reason they show up above foriero post, when they are really supposed to be below it. Sorry for the confusion!
We have an issue for changing skins with keys, and you can see some of the complexity involved:
Skin change keys · #34 · EsotericSoftware/spine-editor
Hi Erikari, we have tried the zip project but seems like broken. Just skimmed over it and also videos and the set up is too complicated. With skins switching and thanks to skins combined animations we can achieve much simpler set up. Can you please confirm that 8 directional project works on your side?
Hello Foriero,
The 8 directional character download that you can get by clicking this link works for me when unzipped, after double-clicking the file twitch-8-direction-chara - complete.spine
.
What looks broken precisely to you?
Many things appear complicated at first when we're not familiar with them yet. The 8-directional character, for example, revolves around storing the various poses inside a turnaround animation to use as the base for other animations.
There are also several great advantages in using this method over skins switching:
- You can have Spine interpolate from a pose to another, with skins, you'd simply switch from one to the other.
- You can copy just the head position, or just the bust, creating a library of poses like in the cat turn, this wouldn't be possible storing directions in skins, unless you want to multiply the amount of skins greatly.
- Once done, you can still use skins to change the outfits of your character, having as many skins as you want, and not needing to repeat the same skin for every possible direction.
I can confirm the project file twitch-8-direction-chara is working correctly.
I think one key advantage about skin switching is that we can set a group of attachment as skin and quickly switch them with just one key. It saves a lot of time and reduce keying complexity.
I just read the challenges on the github.
We need to define (or make configurable) how the attachment visibility changes when the skin changes. Current runtime setSkin behavior only sets attachments from the new skin if the corresponding attachments in the old skin were attached.
I am not sure if I understand the challenge correctly. Do you mean it is missing another unsetSkin() to actively turn parts off?
This feature will be less powerful, but still useful, if it can only show/hide a single skin. It is more complicated to allow it to combine skins like the Skins view, as each key needs a list of skins in the order they should be combined. Ideally at runtime there would not be allocation when setting a combined skin for each key.
This feature will not be useful if can only have a single skin on/off...Please do it right or just don't do this and do something more meaningful.
How do AnimationState tracks work with skin change keys? Does the last applied track overwrite any skins set previously?
I don't quite understand the problem. What options do we have?
How can we handle if the user wants to set some skins manually, but use skin change keys to set or unset some other skins?
I think you don't need to do anything about it. If they set skin manually and their own animation keys overwrite it, thats their own problem. But if I am the one writing the code, I will provide something like lock or priority. So the manually set skin may have protection against animation key overwrite.
setSkin ( skin, lock = false);
setSkin ( skin, priority = 0);
Hi Erikari, your zip link works, that is fine. We see your use case but we are not able to use this special 8 directional. We have much more complex setup than just 8 directions. We have special poses which simply do not fit into simple one skeleton rotation.
So for movie like work with characters the way to go is through skins where each skin has completely different skeleton ( bones )and attachment structure. I have tested if two skins with different bones in each of them can share one animation and found out that yes we can have one animation that controls bones even from inactive skin. Which is great and we are able to animate two skins exactly that way we need them to swap. That sort of freedom is not possible with your setup.
Anyway I really don't see anything even from that link that Nate shared as issues that with the current state of skinning is preventing to have that keying skin feature implemented.
As I said we will do it exactly as we would do it if you have that feature. I create one animation. That animation will control skin A and will try to get its bones rotations and position as close to the other skin B I need to transition to. That other skin B at the same time and controlled by the same animation will try to meet skin A as close as possible with bones rotations and position. When we get into that point we simple swap ( event - in unity I will swap the skin now ) and that new skin continues the animation to its more natural ( setup ) state. This way we are not constrained only to narrow 8 directional use case but we have freedom to do with our characters full movie shooting.
Hope that it makes sense. Please let me know your thoughts.
PS : Just want to add that we already see it working just right now in the middle of that "animation" we will call event with skin name and in Unity we will catch that event and swap for that new skin. Which is like a lot of clicking instead of having one key swap skin frame. :-) You would save us a lot of time with this feature. ;-)
It's a really neat feature, glad you like it! There's a lot of potential with it. By using events and applying skins yourself as needed, you control how the skins are combined and you don't have the problems that keying skin changes needs to solve.
Hi Nate, we have a character that right now has few different skeletons in one spine project. We need to merge them into one skeleton so that we can use that new character with skins technique. I exported all skeletons and trying to import them into one skeleton but regretfuly without success. The result is sort of big mess. So I'm missing one important import feature when importing into existing skeleton which is import it into that skeleton as SKIN. There is no reasonable way to flip old technique with many skeletons for one character into new one with one skeleton and skins with already made characters without this importing feature. May I kindly ask for it? Thank you, Marek.
Hi Nate, one more thing. Character that has like 6 and more unique skins with unique bones gets a very very very very long Draw Order. Would it be possible to have there FOLDERS as well so that we can organise things nicely? Thank you, Marek.
Tried import exported json into newly created skeleton but seems like it is broken. Attachments are not showing. Animations were not imported. Constraints were not imported.
Steps to reproduce.
1) export json files
2) create new skeleton
3) import one of the exported json files into the new skeleton
Please let me know if you need repro case.
One notion though if I import project and then skeleton then that skeleton is imported correctly. So seems like the other path when we importing json into newly created skeleton in that same spine project is somehow broken!!!
Importing into an existing skeleton is currently limited. It is not intended for general merging of skeletons, but to bring new bones, slots, attachments, or skins in from Photoshop or similar. It may be improved in the future, but we don't have plans to do so in the short term.
Constraints and slots in the draw order are ordered and while folders could make reordering groups of them more easily, folders would also interfere with the order. I understand the issue and we may improve it in the future, but again we don't have plans to do so in the short term, sorry.
Ok got it. So I will end up writing my own json merging tool. Simply exporting all current skeletons as json and then with external tool merge them into one json that i will import into spine. And will also include that feature to make those skeletons as skins. Should be pretty straightforward. Do you see any caveat in it?
Ok working on it. Can you please also include Folders for constraints? That would help a lot for one skeleton multi skins character setup. Thank you.