Home Technical Talk

Clothes for a character - Best way to animate for unity?

Offline / Send Message
Pinned
Hello! I am thinking of playing around with unity a bit after learning how to animate in Maya. An idea i had was to just try and make a character that had 3 different types of shirt, pants and shoes that they could choose from. 

The modeling part is simple enough, the problem i cant solve in my head (and cant really find a straight answer to so far online) is how do i actually make the clothes follow the body?

Should i animate each piece with the same skeleton in maya, or is there a way to make the clothes follow the body in unity?
Perhaps nCloth? 

Animating each piece seems like it would be a rather large task once you add just a few pieces of clothing, especially if you have many animations and/or add new ones in the future.

Any help or insight into this topic would be greatly appreciated. 

Replies

  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    "the problem then is if i decide to add another animation to the character, i then have to animate each piece of clothing as well."

    No, you are misunderstanding what "you've seen people say".

    Your human character is a model, with deformations driven by bones moved by an animation.
    The shirt (or any other clothing bit) is also a model, with deformations driven by the same bones as the body, themselves moved by the same animation as the body.

    The animation is the same, you only create it once. It's the relationship between the models and the bones (skin weighting) that you have to carefully do/redo for each model. And this alone is largely automated once you've done it on the body anyways, as you can transfer it to any other model in one click.

    Also be mindful that your assumption about mixing and matching the human with the clothes, while correct at a high/abstract level, will 100% cause visual errors in practice (human fleshy bits clipping through the clothes). This is why most/all character customization systems rely on human characters split at various sections (shoulders, neck, elbows, wrists, waist ...) or some other equivalent system so that parts/regions under the clothes can be hidden or removed rather than covered. This is a very deep rabbit hole to get down to - nothing impossible of course, but brace yourself for some struggle as this is far from trivial.
  • Fozze
    Options
    Offline / Send Message
    Oh yea, that actually makes sense. Thank you!
  • Alex_J
    Options
    Offline / Send Message
    Alex_J grand marshal polycounter
    http://wiki.polycount.com/wiki/SkankerzeroModularCharacterSystem


    this helped me do something similar ^^^

    Keep in mind like pior said, it's a lot of work. Took me about three months to make nine characters with swappable outfit and hats only.

    Also keep in mind, almost impossible to get rid of all clipping. You can find it in the best AAA games so don't waste too many hours weight painting. Test in engine and play the thing like a gamer -- see if it's actually noticeable.
  • Mark Dygert
    Options
    Offline / Send Message
    When doing modular characters I usually skin up a base mesh first and then all of the clothing copies its weights from that base mesh as a starting point and then you refine and tweak any bits that didn't copy so well or are too divergent from the base mesh to accurately be copied.

    Also keep in mind that there isn't one way to do modular characters that works for every game so each method will be a bit different depending on the game and it's requirements. You'll also get a lot of different ideas and techniques from a lot of different people, some of it might be conflicting ideas because of how they had to address visual and technical issues.

    How you build the modular pieces and stitch them together all depend on the game design, the hardware it's running on, the engine it's using, how many characters you have on screen, how important those characters are, how those characters will transition through levels of detail, the visual style.

    How complex the modular system needs to be is another huge factor.
    Is the body cut up into 4, 8, 12, 24 pieces?
    Does it use layering at all? Can a player put on pants, then a skirt and then a trench coat?
    Is it 3 suits of armor or a fashion game with millions of tiny details people can customize?
    How do materials and shaders factor into things? What do they need to support? How does that affect how things need to be unwrapped?

    As you start to answer those questions (and MANY more) you can start to wrap your head around how you're going to build the system, organize it and then you can start to flesh it out. 
Sign In or Register to comment.