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

Best Practice for Maya to Unity - Rig and Animation Setup

Discussion in 'Animation' started by Lunatari, May 24, 2018.

  1. Lunatari

    Lunatari

    Joined:
    May 24, 2018
    Posts:
    3
    Hi there

    This will be my first post on this Forum so I do apologize in advance if this is not the right place or if there is already a topic discussing this.

    I'll present the situation I'm faced with and would appreciate any input into what would be the best way to proceed with this.

    Short background I'm not profecient in Unity I mainly work in Maya and Substance Painter, I'm the Rigger at the Company I work for.

    Situation:
    We have been brought on to help another company who will be using Unity to make their game assets for them, we mainly do VFX, Full 3D Productions and Commercial work so our background is fairly non existent with regards to game engines. I myself am clued up on what is necessary of a gaming rig, single bone chain hierarchy, no fancy deformers, should just be Skinning and Blendshapes that I need to work with. We will in no way be involved in the Game Engine Part of this project just pure asset creation, characters, animation, props

    So my Question:
    If there are 5 characters that need to be done and they all share the same anatomy and body structure, Am I right in understanding that I can create one skeleton setup that is universal for all 5 characters, then just export 5 rest poses (T-pose) of those characters skinned to the skeletons. So basically handing over 5 T-pose skinned characters with no animation in FBX format.

    Then for animation you'd only export the skeletons for actions like Idle, walk, run and so forth and those exports would then be able to drive the any of the 5 Characters if you brought the skeletons into Unity and hooked them up to the Anim system that Unity uses. So essentially handing over a FBX file for each action like walk, idle etc. only as the skeletons and no mesh skinned to them.

    Ps. If it was you who were receiving these assets, does that sound right what you'd be getting to work with?
     
    Last edited: May 24, 2018
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Yes - you are on the correct track. The rigs will need to conform to the humanoid rig in mecanim. Each character (as long as they conform) will be able to receive any animations created on those rigs - or any other animation that conforms to that humanoid structure (like mocap animation files).
    Each character will have an avatar definition, but will share definitions when retargeting animations onto them. The avatar definition will be shared from the character onto the animation file so the animation plays correctly on the character rig.
    Look up humanoid rig structure and avatar definition in the documentation and the Unity blog for further knowledge.
     
  3. Lunatari

    Lunatari

    Joined:
    May 24, 2018
    Posts:
    3
    Thank you very much for that I appreciate the help.
     
  4. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    A word of advice since you mentioned blendshapes.
    There is no way to export blendshape animation without mesh, I think not just in Unity even withing autodesk products.
    So if these blendshape have to be animated the animation should stay with each character.
    The alternative is to do drive the blendshape animation with some extra bones and include these in the animation.
    They will have to write some script that read these bones position and use it to drive the blendshape in Unity.
     
    KobiJelly and theANMATOR2b like this.
  5. Lunatari

    Lunatari

    Joined:
    May 24, 2018
    Posts:
    3
    Awesome thanx for that, I'll keep that in mind, ill write that down, I was thinking of creating the blendshapes on those base 5 T-pose characters, with the varied emotions that they will request.

    So the idea being they mentioned if we did that then they would just call up events in the game that trigger the blenshapes on the original characters. So as far as I understand it we wont be doing any emotion driven animation on the face for any of the loops we will be making ,those will just be events that the other company will code. So hopefully that will suffice

    Really appreciate the helpfulness of you guys so far. Helps a lot. Saves me overtime I would have put in to now learn Unity to make sure we hand over correct assets.
     
    00christian00 likes this.
  6. AbradolfLinkler

    AbradolfLinkler

    Joined:
    Feb 26, 2017
    Posts:
    26
    STEPS TO REPRODUCE PROPER EXPORT OF MAYA RIG TO UNITY:

    IN MAYA:

    0.0 SET MAYA UNITS TO METEERS
    0.1 PUT RIG + MESH IN THE ROOT (MAIN, ZERO) LEVEL IN OUTLINE - DON'T GROUP THEM INTO A NEW GROUP!!!!
    0. make YOUR mesh in T POSE
    1. set pivot point to feet of mesh
    2. freeze transformation on mesh
    3. erase history of mesh
    4. IF YOU'RE. USING QUICK RIG: quick IK rig config - step by step: 2 spine units skeleton, skinning - 4 mesh influences
    5. animate your characteer with control effectors
    6.IN ORDER TO EXPORT: SELECT > ALL BY TYPE > JOINTS
    7.KEY > BAKE SIMULATION
    8. select ONLY MESH AND JOINTS FOR EXPORT - IMPORTANT!!! DON'T PARENT INTO GROUP, DON'T SELECT GUIDES, CONTROLS, ANY OTHER OBJECTS
    8.1 FILE:SEND TO UNITY
    9. FBX EXPORT SETTTINGS:
    GEOMETRY: SMOOTHING GROUPS - YES
    SMOOTH MESH - YES
    (EVERYTHING ELSE IN THIS GROUP - NO!!!)
    ANIMATION - YES
    EXTRA OPTIONS USE SCENE NAME - YES
    REMOVE SINGLE KEY - NO
    QUATERNION INTERP MODE: RETAIN QUATERNION INTERPOLATION
    BAKE ANIMATION - NO IF YOU BAKED YOUR SIMULATION BEFORE
    DEFORMED MODELS, SKINS, BLEND SHAPES - YES
    CURVE FILTERS - YES
    GEOMETRY CACHE FILES - YES
    SHAPE ATTRIBUTES - NO
    CONSTRAINTS, SKELETON DEFINITIONS - YES
    EMBED MEDIA - YES
    INCLUDE CHILDREN - YES
    INPUT CCONNECTIONS - NO
    UNNITS SCALE FACTOR 1.0, AUTOMATIC - NO! (IF YOU PREVIOUSLY SET MAYA UNITS TO METERS IN PREFERENCES)
    BINARY FBX 2020

    IN UNITY:
    SELECT PREFAB BEFORE!!!! PUTTING IT IN HIERARCHY AND CHOOSE IMPORT SETTINGS:
    RIG - HUMANOID, CREATE FROM THIS MODEL, STANDARD 4 BONES
    ANIMATION:
    IMPORT ANIMATION - YES
    IMPORT MESSAGES - GENERATE RETARGETING - YES

    MODEL:
    SCALE FACTOR - 1
    CONVER UNITS - NO - IF YOU PREVIOUSLY SET YOUR MAYA PREFS TO METERS UPON EXPORTING
    BAKE AXIS CONVERSION - NO
    IMPORT BLENDSHAPES - YES
    SORT HIERARCHY BY NAME - YES (???)
    PRESERVE HIERARCHY - NO!
    MESH COMPRESION - OFF
    READ/WRITE ENABLED - NO
    OPTIMIZE MESH - EVERYTHING

    TROUBLESHOOT YOUR ANIMATION?
    - CHECK THE ANIMATION IF THE ROOT MOTION IS BAKED INTO POSE ??

    ALTERNATIVE TO MAYA QUICKRIG:
    UPLOAD A NEW FBX MESH WITHOUT THE RIG - TO MIXAMO FOR FREE FLAWLESS RIGGING!!!!!!
     
    KobiJelly likes this.