ihaveanissue

Hello folks! I'm a software developer and unfortunately I know very little about animation. I am trying to put together a 2D game and my girlfriend is helping me with the art but she has no experience with animation too, so I need to work on that part of things as well. So here's my question:

In the game I'll need a lot of NPCs which will be created during runtime.We don't have all the time in the world so I thought our best option is to generate these characters somewhat procedurally using skins, slots in Spine and a bit of scripting inside Unity.

There should be a base body model inheriting all the skins, equipments, animations so that I can generate random characters and store them as unique NPCs in the game for later use.

Let's say a character will have fields such as:

. skin-color
. rear-leg
. front-leg
. hip

If I were to a generate a character, their skin color would be either black or white let's say. Then the script will randomly pick some pants from my array of pants for the character and simply put it on, I mean replace the base-body legs and put the pants. The problematic part is that if that clothing has some transparent parts on it (so we can see characters skin color), then I would have to create the same pants for all the different skin colors in the game.

So I thought maybe I should put the pants on top of base body and make pants-mesh follow the leg-mesh/hip-mesh wherever it goes. If I understood correctly, I need separate body parts like rear-leg, front-leg, hip and then I have to create pants skins for each part again, I mean cut the pants to pieces and name them after related body parts.

>for skin colors:
[slot] rear-leg
- rear-leg-skinwhite
- rear-leg-skinblack

and this is the part I don't know what to do:
[skin] rear-leg
- cotton-pants

[skin] hip
- cotton-pants

This is the system I am trying to build and I just can't figure out how to name my layers in Photoshop, how to name them in Spine, how to handle this equipment/skin system so I can build on top of it in the future, like creating new cloths etc.

Sorry if the post is too long guys but this is a lot of things for a newcomer. Looking forward to see some kind of help, thanks in advance!
ihaveanissue
  • 記事: 1

Nate

You can create a skin for each item (eg pants). You can then combine many skins into one to outfit your character. Check out the mix-and-match example project:
Mix and Match example
アバター
Nate

Nate
  • 記事: 11351

Misaki

Hello! Have you read this page? :
http://esotericsoftware.com/spine-runtime-skins#Runtime-Skins
You can see the details to use Skins at runtimes there.
アバター
Misaki

Misaki
  • 記事: 182

Harald

Please also be sure to check out the example scene Spine Examples/Other Examples/Mix and Match Skins that comes with the spine-unity unitypackage.
You might also want to have a look at the respective spine-unity documentation section here:
spine-unity Runtime Documentation: Combining Skins
アバター
Harald

Harri
  • 記事: 3353


Return to Editor