Recommended / Best approach to creating random character faces
Hi all, I am looking for some recommendations about the best way to create a prefab for what could be called “a character face”.
The requirement is to be able to create a finite but large range of “faces”.
I’m thinking that I could start with 3 or 4 basic head shapes and then layer(?) eyes, nose, mouth, hair etc. on top. Finishing with accessories such as hats or glasses. The colour of each of the layers elements could be defined at creation from a limited range of colours giving a large range of possible “faces”.
It would be very useful (critical) to be able to assign an identity to the basic face so that the inclusion of hats, glasses etc. would not generate a unique identity and that the underlying face could be used in a comparison.
The resulting face will be used in a 2d game.
I have experimented with UI Images and 3D shapes but not with sprites as I’m not sure that’s the direction to go.
So, in short what would be the best approach to this task be?
I’m grateful for all input but at this stage I’m really only looking for high level, approach ideas.
Answer by Cherno · Mar 28, 2016 at 03:36 PM
Doesn't sound too difficult. I would keep it simple at first, and use one head shape. Create a few different sprites for eyes, nose and mouth (as well as hair etc.) and keep them organized in arrays or dictionaries for easy referring. All elements have to fit the head sprite, of course. A head configuration would have a unique id or name, either by combining the names or ids of the various elements or by using a custom "face" class that holds these values seperately.
Changing colors could be done by simple tinting the mainColor of a mterial, or use one of the sprite palette solutions vailable on the asset store, GitHub and so elsewhere.
Answer by theANMATOR2b · Mar 28, 2016 at 06:47 PM
Your description sounds like a pamphlet of functionality UMA offers.
Have you considered UMA?
Answer by Des6314 · Mar 30, 2016 at 06:51 AM
Hi Guys,
Thanks for the input!
@theANMATOR2b I was unaware of the UMA solution and having downloaded it and given it a try I was very impressed by its power, but on this occasion I think it's overkill for my needs. I will definitely be coming back to UMA in the future though!
@Cherno Thanks for the suggestion to use Sprites. I was unsure about doing this but as it keeps everything within my app in the UI it will make many things easier!
Your answer
Follow this Question
Related Questions
How to make my enemy move in random direction while facing the player 0 Answers
how to add sprites name in code ? 0 Answers
2D Sprite Order in Layer Multiple Prefab Instances 0 Answers
How can I have Unity display the correct tiles based on their surrounding tiles (ie corners) 2 Answers
Best way to make a skin system for a 2D character ? 0 Answers