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

Need help with importing Maya files in Unity

Discussion in 'Asset Importing & Exporting' started by inervy, Oct 6, 2010.

  1. inervy

    inervy

    Joined:
    Jan 29, 2009
    Posts:
    6
    I was importing my Maya file in Unity, but seems to have some problems.

    The screenshot below shows my work.
    I stretched a cube model in the vertical direction, placed three joints, applied smooth skinning.
    Then in my animation, I transform the joints so it would bend (which looks like a bacon shape)


    However, when I import the file in Unity, the model which was smooth now has sharp edges.
    (Look at the upper edge of the "bacon")

    I tried importing .ma and .mb files, tried exporting into .fbx from Maya but still has the same problem.
    Note that this happens in Unity 2 and 3.

    Can someone help me out?
     

    Attached Files:

  2. Paulius-Liekis

    Paulius-Liekis

    Joined:
    Aug 31, 2009
    Posts:
    672
    It looks like skin is not exactly the same in Unity as in Maya. Does Unity give any warnings? Are you sure all vertices are skinned properly?

    What if you import your fbx back into Maya does it look correct?
     
  3. Gnimmel

    Gnimmel

    Joined:
    Apr 21, 2010
    Posts:
    358
    Not sure if this would cause your problem or not, but you didn't freeze transform on the cube before skinning. It's always a good idea to freeze and delete history before skinning a mesh.

    Another possibility is the number of verts per joint. In the quality settings in unity is "Blend Weights" which is how many joints can deform the same vertex. If yours is set to 2 and in maya all your joints are deforming the same vert (you seem to have 4), somewhere you are going to lose some weights could cause the deformation to look different in Unity.

    Richard
     
  4. inervy

    inervy

    Joined:
    Jan 29, 2009
    Posts:
    6
    @Paulius: I imported the fbx back in Maya, and it shows everything as intended.
    Just in case I had an error in the export options, I also tried adding an .ma or .mb file directly to the project, so Unity would import the model itself - same result.

    @Richard: I did freeze the transform and delete the node histories.
    About the verts per joint, can you show me where I can see/change those options? (Both in Maya and Unity?)
     
  5. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    Skin option in Maya : skin >>Bind Skin >> Smooth skin >> option box

    Could be faster to debug if you attach your fbx to your next message :)

    But from the screen, the polycube history + scale info in the channel attribute are not welcome...
     
  6. Gnimmel

    Gnimmel

    Joined:
    Apr 21, 2010
    Posts:
    358
    To test if this is the joint count, check your Blend Weights setting in unity. I'm not in front of it now, but it's in the quality settings somwhere. It looks like you have 4 joints, so set that to 4 in Unity and see if it helps.
    To check in maya, select one of the bad verts and look at it's skin weights in the component editor. If you have more weights in maya then the blend weights setting in unity, that could be your problem.

    Although now I look at your unity screen shot again, I would have thought the deformation to be a little different if this was your problem. It looks like the first 7 rows of verts are set to 1 joint. It's still worth checking though. If you translated the second joint it would look like this.

    I said you didn't freeze transforms because your screen shot of the channel box shows 0.271 1 0.006

    Richard