Search Unity

3DS Max - My models export with wrong pivot?

Discussion in 'Editor & General Support' started by unknows, Jun 11, 2012.

  1. unknows

    unknows

    Joined:
    Sep 5, 2010
    Posts:
    51
    Hi all.

    I'm here to give to you guys my problem... every model i build in 3Ds Max, in unity, the forward position is the bottom of my object. I realy dont know what i'm doing wrong. The front i build the front, the left is the left and the top is top... but after export FBX object, my model simply dont come right. the forward position is the bottom of my object.

    Is there a bug or i'm doing somethink wrong!?

    Best regards,
    unknows.
     
  2. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,779
    in "Axis conversion" in the fbx exporter, have you changed the Up Axis to "Y-Up"?
     
  3. unknows

    unknows

    Joined:
    Sep 5, 2010
    Posts:
    51
    for default the FBX Exporter set the Up Axis to Y-Up.
    i'm thought about rebuild my model using the wrong orientation. Then probably my model export right. I'll build a test one.
     
  4. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,779
    Before doing that, if you haven't already, be sure to reset the pivot and re-export.


    Go to the Hierarchy panel (to the right of the Modify panel), click Affect Pivot Only, then click Align To World, then click Affect Pivot Only again to turn that mode off.
     
  5. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,471
    helps if you have it centered in the the world also.
     
  6. unknows

    unknows

    Joined:
    Sep 5, 2010
    Posts:
    51
    Well, i try to do that. but it continues wrong. i think i'll rotate the pivot to fix it instead of build a new model.

    I dont understand what you mean.
     
  7. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    4,779
    Sorry, always worked for me. Usually it is the bip001 that is messed up, not the model. I have a utility script I run that fixes these issues for me on the scene. Perhaps it would work for you? It resets all the pivots and inverts any inverted normals. Of course, if you decide to try it, please save first! :)

    Code (csharp):
    1.  
    2. fn isNormalFliped pt1 pt2 =
    3.    (
    4.       for i = 1 to pt1.count do
    5.       if (length (pt1[i] - pt2[i])) > 0.0001 then return true
    6.       return false
    7.    )
    8.  
    9. fn doResetXForm obj =
    10. (
    11.    if obj == undefined or ((classOf obj != Editable_Mesh) and (classOf obj != Editable_Poly)) then return ok
    12.     if obj == undefined then return ok
    13.     if obj.mesh == undefined then return ok
    14.     if obj.name == undefined then return ok
    15.        
    16.     s = "updating "+obj.name
    17.    
    18.    local oldNormal = #()
    19.    for i=1 to obj.numFaces do
    20.       oldNormal[i] = getFaceNormal obj i
    21.  
    22.    ResetPivot obj
    23.     if classof obj.baseObject != Editable_mesh then return ok
    24.  
    25.    local newNormal = #()
    26.    for i=1 to obj.numFaces do
    27.       newNormal[i] = getFaceNormal obj i
    28.    if(isNormalFliped oldNormal newNormal) then
    29.       meshOp.flipNormals obj #{1..obj.numFaces}
    30.    update obj
    31. )
    32.  
    33. for ent in geometry do
    34.    doResetXForm ent
    35.  
    36.  
     
  8. unknows

    unknows

    Joined:
    Sep 5, 2010
    Posts:
    51
    Nice script. Thanks for helping me. It has been added to my utilities script package.
    Well... I'll make a test with your script, but rotating the pivot solve my problem.

    Thanks again.
     
  9. D1382

    D1382

    Joined:
    Jun 2, 2012
    Posts:
    6
  10. i3DTutorials

    i3DTutorials

    Joined:
    Aug 26, 2010
    Posts:
    564
    Try dropping a resetxform modifier on it, should fix it.
     
    jenninexus likes this.
  11. neopaul78

    neopaul78

    Joined:
    Jan 15, 2016
    Posts:
    4
    S O L V E - use own Unity pivot system "Hinge Joint", it is not based on exported pivots of Max or etc