Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Customize 2D character

Discussion in '2D' started by Anni2D, Aug 15, 2014.

  1. Anni2D

    Anni2D

    Joined:
    Jul 21, 2014
    Posts:
    2
    I need hint regarding customization of 2d character. User should be able to choose different dress, face expressions for character.
    I saw http://www.gamasutra.com/blogs/Yuri...ing_Customizable_2D_Characters_in_Unity3D.php link but not much helpful. Things have not explained properly there.

    I have separate images for character's face and body i.e. there are 12 faces and 11 bodies overall. If user chooses one head, it should be combined with any body.

    First idea that came into my mind was to create *skeleton* for character i.e. create fixed points for face and body. I could replace any of them. For this, I have to keep face and body separate (two gameobjects) . But in this scenario, I faced issues in running animation - it was not giving a real look.

    Second idea is to combine both face and body i.e. face and body chosen by user will be presented as single image (single gameobject) to user. It gives perfect look + animation, but headache is increased here. Since images have to be created for every face + body combination. So I have to manage prefabs for each combination. There will be pre-made images having head and body already combined as user chose.

    Last one is vague algorithm in my mind, for I am not sure myself since this is my first game in unity.

    What approach does unity game developers usually take for this type of scenario? Please help me with suggestions. I hope I am clear. Thank you.
     
  2. Melang

    Melang

    Joined:
    Mar 30, 2014
    Posts:
    166
    I'm curious why method #1 is not working for you. If you make a character body (for example) the main GameObject, and the head - its child, the head will follow the body and movement should be ok. If the head has animation it can also be synchronized.

    Combining two images in one automatically is quite possible in Unity, but combining their animation is probably not an easy task. So I would try to get the method #1 working.
     
    Last edited: Aug 18, 2014
  3. Anni2D

    Anni2D

    Joined:
    Jul 21, 2014
    Posts:
    2
    @Melang thanks for your reply. I will try again to make #1 work.
     
  4. c2j

    c2j

    Joined:
    Jul 27, 2013
    Posts:
    11
    Hi,

    The #1 method can only work if the character have only basic movements, in this case, sprites can animate each others correctly. But in other case, where there is complexe animation, you right Anni2D, you have to create skeleton, i recommand Spine for Unity ;)

    Good luck.
     
  5. BinaryX

    BinaryX

    Joined:
    Aug 4, 2014
    Posts:
    55
    Or you can use Puppet 2D for skeleton animations. We used it and it works great. it's not an external software, but a plugin integrated into Unity. I find it much easier to use than other softwares that do the same thing.

    For sprite animations, a good tool i found is Spriter. There you can make a sprite animation for each body part, then just change the sprite (instead of a basic head, use a head with a helmet) and the animation will be the same, then export it. The problem is, if you have many items, this method can generate quite a lot of sprites you have to load the memory with.