- Modifié
WEB Player integration and skins
Hello,
I'am a web developper working for a compagny that want to makes a customizable and clean animable avatar. I found spine software checking a lots a checkboxes for our need but before taking too much effort in learning the software and developping connectors and components we need to leverage a technical problem.
In our usecase we want to be able to customize one character (changing face/clothes/accessories) and playing several animations that need to be quite generic for this character.
We looked into the skin example but it seems to imply that we have to change all the character skin and animate each parts. What we wanna know is.
Can we define one skeletton and "skin" only parts of the skeletton ?
For example having a generic character A wearing a white shirt and glasses. Some time later removing the glasses and putting a blue skirt without having to regenerate an asset attlas ?
Thanks
FitzChill a écritWe looked into the skin example but it seems to imply that we have to change all the character skin and animate each parts.
I'm not sure what you mean. You would create each of your animates, then you can use skins to customize how the skeleton looks, without changing your animations.
FitzChill a écritCan we define one skeletton and "skin" only parts of the skeletton ?
For example having a generic character A wearing a white shirt and glasses. Some time later removing the glasses and putting a blue skirt without having to regenerate an asset attlas ? [/quote]
Yes. You can see it on the skins demo:
Spine: Demos: Skins
A few animations are playing, but the skeleton can be dressed up in many different ways.
See also:
Spine User Guide
Skins - Spine User Guide
Mix and Match example
Thanks for your reply.
What I meant is in the skin demo. All the assets are swapped at a time. What i wanted to know is can we only swap torso or heads and mix skins assets. I do think it's possible thought.
Thanks
Oh, yeah you can set individual attachments. The attachments can come from a skin, from different skins, or from no skin. You can create an attachment programmatically and set that on a slot. You can also set the same attachment on multiple slots or on different skeletons (attachments are stateless).
Have a look at the dress-up example. You can easily swap individual parts in an out. Just remember which skins you want to set on the skeleton, then create a new skin. Creating new skins this way is extremely cheap, fast, and easy to implement. https://github.com/EsotericSoftware/spine-runtimes/blob/4.0/spine-ts/spine-webgl/example/dress-up.html
You can see a live demo here: https://marioslab.io/dump/dress-up/