Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

A weird animating riddle.

Discussion in 'Animation' started by Gametide, Sep 11, 2018.

  1. Gametide

    Gametide

    Joined:
    Jul 17, 2018
    Posts:
    3
    Hello wonderful Unity community,
    What I'm trying to do is, model some kind of naked cartoonish character, rig him, and animate him.
    There is no problem there, but what I want to achieve is model for example different hats and be able
    to attach them. (Character Customization) Now that's easy and will work becuase we can simply attach
    the hat to the top of the model's head and the hat will just follow and stick with the head as the animations are ran.
    Now the problem is, what if I want to add clothes (e.g t-shirt, pants...) but not as textures, but as separate models. If I apply the naked body's armature to some t-shirt model in blender and then attach it to the animated naked body in Unity, would that work. I'm not sure what to do. Is there a way I can achieve this type of mechanism?
    - Thank you.
     
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,781
    Simply attaching a organic piece of clothing, which will bend with the skin like a shirt or pants will not. To make this work you will need to skin (vertex weight) the clothes to the same rig the skin/body is weighted to.
    The piece of clothing, although skinned to the same animation rig, will still be a separate mesh object, so it can be hidden, or removed via the skin mesh renderer, or disabled by another code method.
    So - in 3D skin weight all clothing pieces to the same animation rig. When imported into Unity either together (but as separate meshes) or completely separate, the vertex weighting will be baked into the clothing, or can be transferred to the clothing pieces. Several ways to accomplish this here - so testing to select an optimal approach will be required.

    3D Max and Maya has a skin wrap (modifier) which transfers vertex weight data from one mesh to another. Vertex weighting is kind of a pain, especially when there is one mesh above another which might result in flesh skin poking through clothing. The skin wrap transfers vertex weight data from one mesh (the flesh body) to another mesh the (clothing pieces), so the bones will effect the clothing similar to the flesh, and minimizes the task of hand weighting vertices of clothing to match the vertex weights of the flesh body.
     
  3. Gametide

    Gametide

    Joined:
    Jul 17, 2018
    Posts:
    3
    Oh... It sounds too complicated. I will stick with textures, thank you.