Search Unity

Copy From Other Avatar doesn't seem to be working

Discussion in 'Animation' started by Nanako, Dec 23, 2014.

  1. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    Okay, what i have so far. I made my character, and some animations for him, in blender. Exported as fbx, imported to unity, everything works fine.

    Now what i'm trying to do, is to import some additional animations for him. I use the same armature, the same export settings, etc. Create the fbx, and import it;
    For the Avatar of the new import, i select Copy from existing, and select the original character's avatar, pretty sure that's the correct thing to do

    But it's failing horribly. Any animations i import on the second round of importing do not play properly on the original character. He teleports to 0,0,0. Even reimporting animations i already made and imported successfully the first time around. I can repeat this entire process quite reliably. Importing an animated character that works fine, and then importing new animations and copying the avatar, which does not work.

    any idea what might be wrong?
     
  2. medhue

    medhue

    Joined:
    Aug 24, 2014
    Posts:
    176
    If you are animating on the same character, then why would you need to Copy from Existing? It's the same character. You'd only use this if you were trying to convert from a different rig, I think.
     
  3. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    Last edited: Dec 24, 2014
  4. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    Hey Nanako,
    (disclaimer: I'm a Max animator)

    My first introduction to mecanim near the beginning of this year was OH CRAP - this is awesome! I started out by reading ALOT! Within the last year I've successfully set up a number of characters through trial and error. Initially I created a character with about 10 animations and when brought into Unity had similar issues you are having because my animation rig wasn't setup to match Unity's 1 to 1. Fingers all messed up, clavicle missing, 4 spine bones! Doh!

    After trouble shooting for a while and reading A LOT I decided the best approach was to started over - iterating on several rigs until I got one that matched the humanoid structure perfectly. Once I had this I transferred in max the animations I created to the new rig and "touched them up" to work on the new rig properly.

    I'm not saying you need to start over but this was the best approach for me to get a correct functional character pipeline setup.

    Medhue's layering setup he explained in your other post is a solid setup for additional bones that are not recognized in the humanoid structure.

    Second point about animation processes for retargeting and getting additional animations onto your current rig.
    I like to animate all animations in the same Max file - because it allows me to copy parts of one animation without having to import/setup/merge and mess with animation layers. That's just my personal preference.
    And because I know my rig setup once I get into Unity is 1 to 1, I don't have any issues re-importing/re-exporting several times to make sure Unity is interpolating my keys correctly or to test a random cycle 2-3 times.

    BUT -
    In his 2013 Unite talk - appropriately named Successfully Avoiding Disaster in Your Art Pipeline - Elliott Mitchell talks about setting up separate .fbx exports/imports and he has some very valid reasons why he prefers to work this way as opposed to one huge .fbx file. The rest of the talk is good too.



    My advice - on your next project - or this one (your decision) before beginning to animate make sure the rig is easily setup/processed when imported into Unity. If you don't do this you will have the headache of setup/re-targeting which is where you are currently at and are familiar with. OR make all your animations in one file in Blender and hope everything is perfect before going into Unity and doing the setup process - only to find the last key of the walk cycle is off and it needs to be fixed.
    All the extra bones are irrelevant because they aren't recognized in the humanoid structure.
    This iterative process will give you a leg up on successfully avoiding issues in your art pipeline in the future.
     
  5. medhue

    medhue

    Joined:
    Aug 24, 2014
    Posts:
    176
    The first character I made, I did all the animation in 1 long file. OMG, what a headache. Now, what I do is that I create new Actions within Blender, and save them within the blend file. When I export the FBX, and bring that into Unity, it will have all those actions as separate animations, but all within the same FBX. I run into some of the same problems with doing it this way as doing it with 1 long animation. Like, let's imagine I get all the animations right, I'm ready to package it up, and I find 1 glitch in 1 of the animations. Well, then I have to fix that 1, and then export the whole set over, reimport them, and configure them all again. Granted, it's not quite as bad as 1 long animation, but still something to consider. Despite this, I still like to give the 1 FBX, which holds all the animations. It just seems easy to work with. If it's a custom character, then I give 2 FBX files. 1 with just the model and rig, and 1 with the rig and all the animations. Of course, my workflow and is based on making things that I sell and others use. I'd likely not do all of that if I was working on a game and just importing what I needed.
     
  6. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    I've used pretty much the same process as you, though I think I'm going to be switching to a hybrid approach for both personal and contract work in the future. Simply because reducing the amount of repetitive tasks (re-configuring animations when edits are needed) makes the pipe flow better.
    The blender actions sounds interesting - though it seems an additional step which Max does automatically.

    Sorry for the hyjack @Nanako - though we are talking relevant information to your issues.

    Please update the thread to let us know how it's going.

    Back to animating!! :)
     
  7. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    Hello all.

    I am still stuck on this problem, and i feel like i'm wading through quicksand, getting sucked down at every step.

    My plan from the start, was always to get things absolutely perfect in the pipel;ine before i started making content, and so i've not made anything beyond testing animations yet.

    Given the hassles i was having, and the apparent love for it, i decided to throw away my existing skeleton and migrate the model over to the Rigify armature.

    This thread documents my progress in doing that, and the problems i'm running into. Right now i've hit a wall, once again: http://blenderartists.org/forum/sho...broken-shins-and-thighs&p=2787688#post2787688
     
  8. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    This looks like an awesome resource that would be beneficial for you.
    Book

    I personally wouldn't use that rig if I had the option between a custom one that matched Unity's humanoid rig and that one - which doesn't. It has a bunch of extra bones that would throw off the mapping which seems to be the case based on your previous posts.

    If your still at the pipeline setup stage which you stated - why don't you create a base rig that matches unity's mecanim humanoid rig then proceed from there?
     
  9. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    I am skeptical. blender and unity are both constantly evolving, a book is not. For example there's been pretty huge changes to blender's FBX exporting recently, which has a profound impact on unity development
    There's a ton of tutorials for blender especially, that are outdated in newer versions with a rearranged interface, renamed features, and such. But a website can at least be updated, a book cannot.

    I honestly believe that books are mostly obsolete as a medium for information. But for information about this kind of subject particularly, they are not a good idea.

    re: Base rig to match unity. I'm not sure how to do that, and i opted to convert to rigify because it seems like a mature and feature rich tool, i'm particularly interested in motion constraints, but have no experience creating them myself. I've been stalled on animations for weeks already and i really do not want to learn another slew of new concepts in order to make a single step forward, it's starting to feel like trench warfare.

    i'd like to just get rigify working
     
  10. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    OK Nanako - just trying to help out. :)
    But I know from experience books are beneficial regardless of the issue date and software version. I have several books on 3dsMax all the way back to v2.5 (1998) and a lot of information is still relevant as long as you can translate the information for your own purposes and know how to use the software well.
    Back in the day you had to click on the X button to move an object in the x direction y button for y direction and z for z direction. There were three separate buttons for translation! Additionally there are long lost tips & tricks in those older books that are very helpful and unknown but still work in current software versions. I use Max 2012 at home and 2014-2015 at work.

    I hope you figure it out. I think I've given some quality feedback and direction. May want to consider some especially getting to know rigging - very well.
    It's an important step in the process of animation development and I don't think there's an easy out to get around it. (edit) paying mixamo for there rigging process is one work around but I prefer to do my own work.

    But if all else fails and your still struggling - @medhue is a competent Blender animator. I'm sure if you beg nicely he will get you straightened out.

    To create a rig setup similar to the humanoid rig in Unity look at the bone structure in Unity - copy it down on a piece of paper - create bones in Blender with IK or whatever you like to animate with in Blender - I believe blender has a odd naming issue for animation rigs but there is documentation on this forum to overcome that. Once you have the rig setup - quickly skin weight a model to it - it doesn't have to be accurate - weight to only one bone just for iteration purposes - then go through the export/import process.
    When you bring it into Unity you will see right away if the rig needs to be modified or if it works.

    Once you have the rig in a working state that goes into Unity cleanly - then you will be in a proper position to move forward successfully. Go back into blender and skin weight your model properly then you can get those animations working and into Unity without having to worry about struggling through the character setup process.

    There may be work arounds but I prefer to do it correct from the beginning. Less headache and battles to fight later down the line if the beginning stages are clean.

    Good luck!
     
    Nanako likes this.
  11. Mecanim-Dev

    Mecanim-Dev

    Joined:
    Nov 26, 2012
    Posts:
    1,675
    twobob likes this.
  12. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    Wow
    mecanim is far more impressive than i'd thought. i've reached the end, rereading many parts. Thank you greatly for this

    however, i can honestly say that this has not helped my decision at all, but only made the issue even more confusing and uncertain ;-;
     
  13. medhue

    medhue

    Joined:
    Aug 24, 2014
    Posts:
    176
    Hey Nanako,

    I mentioned the rigify rig because I've seen alot about it, and it does have lots of built in features. I've never actually played around with it. I also think I might have misspoken. I have used the MetaRig, which is the rig that rigify is derived from. The metarig is just a basic humanoid skeleton, with nothing too fancy in it. Pretty much exactly what any of us would make and start from ourselves. When I said rigify, I meant the metarig. I never use the rigify rig because I'd rather set up the rig the way I want. The metarig tho, is a rig to start from. I'm sure Rigify is a competent rig with great feature, but, to me it's a bit overboard, especially if all your animations are motion capture. That said, it can be a pain to get the mocaps on your rig, and I think rigify has some features for that.

    My workflow is quite a bit different tho. I don't know if I explained it, but I'll go thru it breifly here. I started out animating in Secondlife some 8 years ago, so I know the SL rig. Machinimatrix makes an addon for Blender called Avastar. This gives me the SL avatar in Blender, with all it's morphing features. Plus, it has a great mocap import system to get the motion on the rig. I've created tens of thousands of animations for that rig. It just so happens that the SL rig converts easily to the Humaniod rig in Unity. The only problem is that is has no finger bones. So, I just added finger bones, and a jaw bone, and now it matches perfectly with the humanoid rig. Avastar is a great addon, and is less than $30. Yeah, it's made for SL, not Unity, but it works.
     
    Last edited: Jan 2, 2015
  14. Nanako

    Nanako

    Joined:
    Sep 24, 2014
    Posts:
    1,047
    Hello medhue <3

    I actually started out in second life, too, so we're kindred spirits in a small way :p But back then i did all my animating in poser 7, with some well documented import and export steps.

    Incidentally i did look into using power for unity animations, and the information i could find seemed to be inconsistent, incomplete, and a huge hassle, so i opted to animate with blender instead, in the hope that the l;arger community would provide more support net

    Personally i learned to do all my animation by studying sports players and using foot IK heavily. I'd opted for rigify in hopes of having similar constraints and ik features like what i'm used to, but it isn't turning out well so far.

    avastar sounds interesting, but perhaps not to my taste anymore
     
  15. medhue

    medhue

    Joined:
    Aug 24, 2014
    Posts:
    176
    Avastar has a good IK system, which you can turn on and off at will, or adjust the influence. The creators really did make a dream addon for SL. Many of their tools also help me with Unity animations. Really, I feel naked not using it now.

    All this said, there are some really good reasons to learn to make your own, especially IK. I somewhat had to learn because I wanted to rig my animals. After doing a few dozen now, I somewhat enjoy setting up their rigs now. Blender has a pretty simple, basic way to create IK for limbs, and the more you play around and understand them, the better you get at making them, and likely will create your own way of doing things.