Skin Swapping and Sprite Swapping Questions

Discuss issues pertaining to the Creature Animation Editor here.
Post Reply
junwi
Posts: 2
Joined: Mon Aug 14, 2017 2:00 am

Skin Swapping and Sprite Swapping Questions

Post by junwi » Mon Aug 14, 2017 2:32 am

Hello! New to Creature and I have a few questions:

For the skin swapping: What if I have many items / hair / costumes and I want to do randomized skin swap? For example I want to have a base female body and in Unity I want to randomly generate different combinations of faces, hair, skin colors, clothes, and accessories in order to create many random NPCs? Can I do that in Creature without creating hundreds of skin swap combinations myself? Also can I change the color of the individual pieces like the hair in Unity without having different colors of hair be separate pieces?

And I want to combine frame by frame animation as well. Some character animations (for example a spinning attack) I want to animate completely frame by frame and some I want to combine frame-by-frame with the bone animation (so maybe just the arm or hand is frame-by-frame while the rest of the body is bone animation). I've seen the sprite swapping tutorial about the flame but can I replace whole body parts with an animation? Can I have the animating body parts also be animated with the same bones and with mesh animation?

Also I want to do this with the randomized NPCs. I'll have to frame-by-frame a lot of different assets but I'm okay with that. I want the random assets in the skin swap to also do frame-by-frame but when I do sprite swapping, I want to make sure Creature selects the right asset. For example if I want to do frame-by-frame animation of a random female NPC flipping her hair (in a away that I cannot achieve with bone animation) I want the right hair animation to show and the right color hair.

chong
Posts: 1178
Joined: Thu Feb 19, 2015 2:21 am

Re: Skin Swapping and Sprite Swapping Questions

Post by chong » Mon Aug 14, 2017 5:19 am

Hello,
In CreatureRenderer.cs:
https://github.com/kestrelm/Creature_Un ... enderer.cs

There is a function called "AddSkinSwap". It allows you to add in your own custom skin swaps. This should be useful if you want to randomize your skin swapping sets. Take a look at using that function to construct your own SkinSwaps. You can directly alter the skin_swap table as well. Again take a look at how the function is implemented.

Right now, there is no API to directly change the colour of a region yet. This however shouldn't be too difficult to add in the code if you need this functionality.

In CreatureModule.cs:
https://github.com/kestrelm/Creature_Un ... eModule.cs

There is a function called UpdateRegionColours(). Right now it only updates the alpha component of the region ( for fading in and out )
I can add in the ability to also change region colours via a function call if you want. Does that sound like what you need?

Yes you can replace entire body parts with frame by frame, the flame example is a body part by itself. You should download the Ice Demon Sample from the website to take a look. If you are doing general Sprite Swapping, the recommendation is to sculpt out a rectangular mesh block ( like the one in the Ice Demon Sample. The flames meshes are rectangular ). This allows you to accommodate different types of shapes to swap into.

Cheers

Post Reply