Search Unity

Can blender generated character animations be used in blend trees/masks?

Discussion in 'Animation' started by Intervention, Nov 11, 2014.

  1. Intervention

    Intervention

    Joined:
    Nov 9, 2014
    Posts:
    8
    Hello all, my first post here. Yell at me if I break a rule/ask something in the improper format and I will correct my post.

    I have a human character model I've created in blender and rigged using the blender rigify plugin (and is therefore not mechanim-compatible). I've got my animations (run, walk, jump, aim up, aim down) working in blender.

    Ideally I'd like to import this character into Unity and attach the character's walk, run and aim animations to a blend so that my character can be running and aiming up at the same time in response to a collection of variables (is he moving forward, is the player aiming upwards, etc). The character I've created, being rigged using rigify, is not a proper 'Humanoid' rig as far as Unity is concerned.

    Does my character need to be a proper Unity Humanoid character in order to be used in a blend tree (my animations are created in blender, not using mechanim)? I think not, since blend trees as I understand them are generic and not specific to humanoid animations.

    Can I apply masks in my blend tree (for example, to show my character running, but his arms are holding a weapon - two separate animations that work on different bones on my character)?

    And my final question, I want to have my character look in the general direction he is aiming. I have separate 1 frame 'aim up', 'aim forward', 'aim down' animations that I'd like to blend between based on a floating point variable set from a script that handles the angle at which the player is looking. Can I do this without my character being a proper mechanim/humanoid character?

    Thanks for anyone's time reading this and providing me with any hints. I have googled around for a while on this, and have found numerous articles on how to make a blender character mechanim-compatable, but that seems like a chore and I'm willing to do all of my animating with blender.
     
  2. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    Blend tree are not specific to humanoid rig, you can use a blend tree with any kind of motion, you can even mix humanoid and generic motion if you want.

    If you go with a generic rig, everything will work as long as all your animation are made with the same rig.

    You cannot apply a mask on a blend tree, you can apply a mask when you import your animation clip or on a layer for the final blending. In this case you would need two layer, the base layer will affect everything. and the second layer would affect only your upper body.

    Yes it can be done with a generic rig too.
     
  3. Intervention

    Intervention

    Joined:
    Nov 9, 2014
    Posts:
    8
    Awesome. Thanks for your reply!