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

Mecanim Muscles: What are they and how to use them?

Discussion in 'Animation' started by Rosie-Posie, Jan 21, 2015.

  1. Rosie-Posie

    Rosie-Posie

    Joined:
    Nov 20, 2013
    Posts:
    54
    Hello,

    so I've been making Avatar definitions in Mecanim ever since it came out but just recently got to explore it a bit more. I read all I could find on the web about the Muscle tab in the configuration panel but can't seam to be able to figure it out.

    I imagine its sole purpose is to limit and correct re-targeted movement, but what exactly am I suppose to set up with those sliders? I tried moving them up then saving, but it always resets when I go back into the the configuration and I don't see any modification to my re-targeted motion when testing in the view port.

    Dose anybody have any documentation that would clarify what it is for and how to use it? Its crazy how little I can find on the web or in Unity's official doc.

    Thanks a bunch in advance!
     
    hopeful likes this.
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Did you miss the apply button @Rosie Posie? That one always gets me at least once a day! :)

    Yeah I agree the muscles are a vague (different) concept than what we've grown accustomed to.

    From docs
    You can either adjust individual bones in the body (lower part of the view) or manipulate the character using predefined deformations which operate on several bones at once (upper part of the view).


    -------------------------- Apply button ^^

    And the best definition I have found from scouring the information available on the subject from this blog post.
    Additional information on that blog post. It's worth the read if you haven't already.

    A Muscle is a normalized value [-1,1] that moves a bone for one axis between range [min,max]. Note that the Muscle normalized value can go below or over [-1,1] to overshoot the range. The range is not a hard limit, instead it defines the normal motion span for a Muscle. A specific Humanoid Rig can augment or reduce the range of a Muscle Referential to augment or reduce its motion span.
    The Muscle Space is the set of all Muscle normalized values for the Humanoid Rig. It is a Normalized Humanoid pose. A range of zero (min= max) for a bone axis means that there is no Muscle for it.


    For example, the Elbow does not have a muscle for its Y axis, as it only stretches in and out (Z-Axis) and roll in and out (X-Axis). In the end, the Muscle Space is composed of at most 47 Muscle values that completely describe a Humanoid body pose.
     
  3. Rosie-Posie

    Rosie-Posie

    Joined:
    Nov 20, 2013
    Posts:
    54
    Hello TheAnmator2b, so as I turned out, i'm not pressing the apply button, since it seams to be grayed out! I just alway pressed on done since i never had any other option! What could be causing this? am I suppose to do anything more then just move the sliders around? its as if its not recording any modifications.

    Thank you for your response!
     
  4. Jself

    Jself

    Joined:
    May 29, 2014
    Posts:
    56
    The system is kind of pointless imo.

    It's adding range of motion restrictions so that you don't have a elbow bending the opposite direction. But that is something you would avoid when animating in the first place. And have set up in Max or Maya when animating.

    I can see it being very helpful if you using mocap data from the asset store and is not a perfect capture. Having asset store purchased data inconsistencies where elbows and knees are bending backwards on the users characters.

    Or that is my assessment of what the system is.
     
  5. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,676
    Probably muscle definitions help with ragdolls ...?
     
  6. Jself

    Jself

    Joined:
    May 29, 2014
    Posts:
    56
    Yes. That is one thing I didn't think of initially. But would make sense for using it.

    Still though. Cryengine would allow you to bake these rotational constraints within Max before export, avoiding you to have to set it up in the engine. This would avoid the problem of people wanting cows to ragdoll, since they won't be using the Humanoid animation type.

    Unless I am unaware of a system that will allow us to set up rotational constraint on Generic animation types.
     
    theANMATOR2b likes this.
  7. Rosie-Posie

    Rosie-Posie

    Joined:
    Nov 20, 2013
    Posts:
    54
    but the thing is, what is setting the constraints exactly? Might be a noob questions, but is simply moving the sliders around setting the constraints? Do I have to set a key some how? When ever I am in that screen, I can't seam to find anything that indicates the movements have been set.
     
    Last edited: Jan 29, 2015
  8. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,676
    It's been a long time since I've looked at this, but in the above picture of the window those sliders that are visible help you see what your current constraints are. You click on each of the Per-Muscle Settings (where the little arrows are) and that gives you another slider (not visible in the picture) which shows a range of degrees. When you change that set of degrees, then you can use the slider on the left to preview what that range looks like on the model.

    When you've changed the restrictions to what you like, you click apply or done.

    I'm not sure if that's what you're asking about, but that ought to create a limit on the movement of that joint.
     
    Rosie-Posie, Jself and theANMATOR2b like this.
  9. Rosie-Posie

    Rosie-Posie

    Joined:
    Nov 20, 2013
    Posts:
    54
    Ha ha!!

    Thank you Hopeful! there you go! that's what I was looking for all along, I never thought to expand those sections, I thought those where bullet points. Silly me! well now that makes a whole lot of sense and is way more useful!
     
    hopeful and theANMATOR2b like this.
  10. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    The whole point of the muscle range is to change how the rertargeting map the source animation on your avatar.

    Let say you have a very muscled character with huge arm, and when you retarget your motion you have some mesh penetration between the arm and the torso that you don't like. You can reduce your muscle range for the arm to avoid the mesh penetration, at same time you character movement will look bulkier since the range is reduced.
     
    florianBrn, hopeful and elbows like this.
  11. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
     
  12. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    It's not always possible to edit the source mocap if you don't have access to it. For user buying asset on the asset store like a full retargetable controller the only way to fix arms penetration in this case is by editing the muscle range.
     
  13. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Ah - good point.