Search Unity

Unity and Maya dissonance

Discussion in 'Animation' started by Gord10, Jul 13, 2017.

  1. Gord10

    Gord10

    Joined:
    Mar 27, 2013
    Posts:
    142
    I am working with a team of animators for my game. The problem is, the animation they made seems perfect in Maya, but the result in Unity is undesired. Her leg is seen above her cloth in Unity, while it looks perfect in Maya.

    The problem gets closer to getting solved when I set Bone Weights to 4 in Unity. I thought the animators could see the exact problem when they used the same bone weight in Maya, but they couldn't.
     

    Attached Files:

    • maya.jpg
      maya.jpg
      File size:
      112.4 KB
      Views:
      865
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Is the cloth driven by bones or physics?
    If physics - is the cloth physics generated in Unity or Maya?
    If bones - the area of cloth is not being effected by the thigh bone as much as the leg mesh. Vertex weighting for the cloth should match the vertex weighting strength for the thigh.
     
  3. Gord10

    Gord10

    Joined:
    Mar 27, 2013
    Posts:
    142
    "It's just bones and theres a separate bone for the cloth and for the thigh", she says.
     
  4. NoiseFloorDev

    NoiseFloorDev

    Joined:
    May 13, 2017
    Posts:
    104
    Figure out if it's a joint positioning problem or a skinning problem. Your joints might be in a different place for some reason, or your skinning might not be coming through correctly, and the first thing to do is to figure out which one it is.

    Make sure no geometry is weighted to more than 4 joints, since that's Unity's max. If you weight to more than that, Unity will ignore some of them and it won't look the same. Maya has an option to enforce a limit ("Maintain Max Influences"), but I don't recommend using it (or at least don't leave it on) since it's buggy and can make various skinning operations corrupt the weights.
     
  5. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Then just adjust the animation a bit if editing the weights doesnt help. The cloth is "faking" being pushed forward bu the leg. Moving it a smidge more forward will result in the same look - just correct.
    ;)
    Also - if this is humanoid set up with an avatar mask for the cloth - it could be a host of other reasons it looks off.
    Or if the coat is a separate animated mesh parented to the character, maybe the keyframes are not in sync because one does not have end keyframes placed in 3D app.
    Really just guessing at this point.
     
  6. Gord10

    Gord10

    Joined:
    Mar 27, 2013
    Posts:
    142
    I guess you didn't get the main problem. There will be like 40 animations and they will have minor problems as long as the animator can't see the results in Unity. We have already tried moving the cloth, but now the feathered part on her belt looks incorrect. It will take like 4-5 revisions to make a perfect animation if we can't solve this dissonance. And there will be about 40 animations.

    The cloth and body are on the same mesh, by the way.
     
  7. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    OK - then this is definitely due to either vertex weighting in Maya, an import setting or some humanoid rig malfunction. Is the character set as humanoid rig in Unity?
    Does changing to generic solve the issue?

    Can you confirm the artist set the skin weighting to max 4 bones per vertex influence? If the weighting of the vertices in Maya was performed - and then subsequently the artist changed the weight influence to only 4 bones - that might not be transferring into Unity correctly. (guess)

    If humanoid - did you attempt to import the model and rig without animation, and import separately the rig and animation without model, set the avatar correctly and apply the animation? Wouldn't expect this to show different results - but never know.

    In the import settings under model is mesh compression off? Optimize mesh off?
    Under rig is optimize game objects unchecked?
    Under animation is bake animation on? What is the anim compression setting?

    This seems like the most likely problem.
     
  8. NoiseFloorDev

    NoiseFloorDev

    Joined:
    May 13, 2017
    Posts:
    104
    Again: step 1 is to determine whether you have a joint positioning problem or a skinning problem. Check if the joints are in the place they should be. There are plenty of things that can cause joints to not go quite where you want them to (the default animation compression options are extremely poor; root transforms might not match up), and there are another plenty of things that can make the skinning not replicate (too many influences; use of DQ or DQ-weighted skinning which Unity doesn't support), and the first thing to figure out is which category of problem you're dealing with. You could even have both problems, which makes figuring this out that much more important.
     
    theANMATOR2b likes this.
  9. Gord10

    Gord10

    Joined:
    Mar 27, 2013
    Posts:
    142
    I sent the animator your replies.

    About your questions;
    * It's generic animation type.
    * Optimize game objects is unchecked
    * I disable animation compression
    * Optimize Mesh is unchecked
     
    theANMATOR2b likes this.
  10. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    A couple other things you might mention - if the vertex weights are being set by envelope (volume/cluster) weighting, instead of other methods like paint weights or hand weighting, (I think) fbx attempts to convert the envelope weighting, to actual weight numbers upon export. This is something I have not seen in a long time, but remember long ago being a problem that caused discrepancies from 3D app to in game.

    What are the export settings in the fbx dialogue?
    Is the animation being baked upon export?
    Are dummies/null objects being converted to bones?
     
  11. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    theANMATOR2b likes this.
  12. WGR

    WGR

    Joined:
    Sep 11, 2013
    Posts:
    21
    Hi, if you want I can take a look at your rig and animation and find the issue for you.

    I have a little bit of free time this weekend, let me know if you want my help.

    I was in charge of all the modeling, texturing, rigging, animations and particle systems for this project:

    https://www.kickstarter.com/projects/620660310/in-the-line-of-fire

    Regards.