Search Unity

3d Studio MAX FBX Export question

Discussion in 'Asset Importing & Exporting' started by zoonyzone, Apr 15, 2008.

  1. zoonyzone

    zoonyzone

    Joined:
    Feb 21, 2008
    Posts:
    18
    We have been able to successfully export a character we have with a simple walking animation. The problem is that once it is loaded into Unity and we position the character and press play, the character jumps back to the 0,0,0 origin of the original animation.

    I am sure I am doing something wrong, but I dont know what it is. It is a standard biped animation and other than having to scale the character up by 100 times, things export ok.

    Which brings up another question. If in MAX 1 unit = 1 meter and when we export it to FBX and import it into Unity the character is so small that we need to greatly increase the size.

    Is Unity a 1 unit = 1 meter system? I ask this because when using the terrain engine and placing the grass, the character is like a fly in the grass :)

    --EricS (not the other Eric :) )
     
  2. zumwalt

    zumwalt

    Joined:
    Apr 18, 2007
    Posts:
    2,287
    It jumps back because the next frame is not adjusted to the new positioning. I have the same problem and discovered that although I align the imported mesh, untwist it, scale it, etc, when you play an animation it doesn't keep any of the settings since the settings were on the first frame, you have to adjust all frames, I don't know if this is a bug or what.
     
  3. zoonyzone

    zoonyzone

    Joined:
    Feb 21, 2008
    Posts:
    18
    We have the character walking inplace in Max at 0,0,0. I import the FBX into Unity and push play it jumps to 0,0,0 and plays (even if I move the character to 100,100,100 prior to playing).

    lerpz for example, wherever I move him he animates at that position (in place). Ours it jumps to 0,0,0 animates (in place) unitl I push stop and then goes back to where I dropped it in the scene.

    I hope this is a little clearer... :)

    EricS
     
  4. Joe-Robins

    Joe-Robins

    Unity Technologies

    Joined:
    Apr 21, 2008
    Posts:
    430
    I don't know if this will work as I am only new to Unity 3D, but is it possible to attach a dummy object to the Biped root as a parent? that way you should be able to position the character using the dummy and the biped's origin would equal the dummy objects pivot point. Only an idea but.....
     
  5. simonwittber

    simonwittber

    Joined:
    May 13, 2008
    Posts:
    228
    I'm getting this exact same problem. I'm new to working with animated models, and have no idea why this might be happening, or whether it is my fault, as the programmer, or if it is because the modeller's problem.

    I've attached the model, if anyone wants to take a look.
     

    Attached Files:

  6. simonwittber

    simonwittber

    Joined:
    May 13, 2008
    Posts:
    228
  7. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    262
    I ran into this problem as well and I solved it by making sure that the mesh was NOT parented to the root node. This root node is not in the skin and is used for in game positioning.

    So, the bad hierarchy looked like this

    Root
    ->Mesh
    ->Pelvis->Rest of Skeleton
    ->IK Handles

    And it was fixed by making it look like this

    Root
    ->Pelvis->Rest of Skeleton
    ->IK Handles

    And the mesh is just transformed by the skin.

    The odd thing is that I had this setup before the problem arose. Something, however, made the Root node start exporting animation. So it's not JUST the Root->Mesh hierarchy thing, but removing that link did fix it.

    And all this is in Max 2010.

    ******| Edit |******

    Well, I don't think this actually solved it. Once we looked at the hierarchy, it looks like the importer is actually putting the character under the Root node in the hierarchy in Unity... which is a similar fix to manually creating a GameObject

    It still seems like there's a setting messing things up on export. Will reply with any findings...

    *********************
     
  8. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    262
    Actually I talked to a guy that's done a few Unity games and he said that is the standard character hierarchy, with the mesh unlinked. So you end up with, in Unity

    Code (csharp):
    1.  
    2. CharacterName
    3. ->Root
    4.   ->Pelvis
    5.     -><rest of bone hierarchy>
    6. ->Mesh
    7.  
    If anyone else can confirm or deny that, please chime in. :)[/code]
     
  9. profcwalker

    profcwalker

    Joined:
    May 3, 2009
    Posts:
    243
    Hi,

    For Max you will want to be sure the Unit Setup is the following:

    System Unit Setup
    (Customize->Units Setup->System Unit Setup)
    1 Unit = 1.0 Centimeters

    Display Unit Scale
    Metric -> Meters

    I've got two possible thoughts on the animation you were talking about -> Do you have it translating in Max? If so, then that could be why it's going back to 0,0,0. You'll want to move the character in Unity, which means you want to stop the character from translating in max.
    1. Select the biped (or bone)
    2. Go to the Animation Tab
    3. Biped Rollout -> Click the Modes and Display bar
    4. Click the 'In Place Mode' Button
    5. Export your file out again

    The character will still have all of its animations, but will simply stay in the one spot, allowing you to move it in Unity.

    Also, for my characters the hierarchy is set with a GameObject as the parent, the bip01 (root), pelvis, etc. This one is probably the reason though.

    Not sure if I answered your questions exactly, but I am happy to help further if you need. Thanks.
     
  10. hike1

    hike1

    Joined:
    Sep 6, 2009
    Posts:
    401
    I'm not getting any animation at all, I guess you
    mean the big 'play' button at the top. I copied all the
    above settings. The skeleton animates in Quicktime FBX
    viewer, but not the mesh.

    I'm using
    3ds max 9 SP 1 with the fbxmax.dlu of 7.5 MB date 10/2/2008

    He animates in Max just fine.
    Using Windows Vista

    max and fbx
    http://terrymorgan.net/knute_multi.zip
    434K
     
  11. hike1

    hike1

    Joined:
    Sep 6, 2009
    Posts:
    401