Search Unity

Maya to Unity, broken normals on part of skinned mesh.

Discussion in 'General Graphics' started by fildax, Mar 15, 2019.

  1. fildax

    fildax

    Joined:
    Apr 7, 2017
    Posts:
    37
    Hi,
    I have this strange issue with normals and cant get it to work correctly.
    I have model created in maya. I import it to mixamo for some quick base skinning.
    When I then import that mixamo model straight to unity everything is fine.
    But when I import that mixamo model back to maya ( which I need to add bones/fix skin influences) and then export it from maya to unity, I have completely broken normals on hands of my model. I tried locking normals, deleting history, deleting nondeform, and it just make no sense.

    This is how my model looks on first export:


    in maya its okay ( even in vertex normal debug ) in unity its wrong.

    BUT if I unlock normals, and harden all edges it looks like this:



    in maya, all edges are hard and its just wrong, in unity everything is as it should be when I export smooth normals.

    my export settings:

    my unity import settings:


    Also, seems like if I import the model without skin, everything is fine.
    anyone else expirienced this? Using 2017 LTS
     

    Attached Files:

  2. fildax

    fildax

    Joined:
    Apr 7, 2017
    Posts:
    37
    Also, when I take that FBX which looks fine in unity from second image and import it back to maya and export it back to unity, its broken again. It basically takes me back to image 1.
     
  3. teutonicus

    teutonicus

    Joined:
    Jul 4, 2012
    Posts:
    70
    Pretty sure it's due to a known Maya fbx import bug. Certain versions of Maya won't import normals of skinned geo from fbx. I had hacky multi-step workarounds for it forever but recently found a hidden fbx import option you can enable via MEL:

    FBXProperty "Import|IncludeGrp|Geometry|OverrideNormalsLock" -v 1

    See if switching that on helps :)
     
    BrandyStarbrite and fildax like this.
  4. fildax

    fildax

    Joined:
    Apr 7, 2017
    Posts:
    37
    Thanks for tip!

    At the end, I solved it by exporting problematic object to obj and importing back to maya before sending to mixamo.

    Would you mind to explain how exactly to use that command? I should use it before importing FBX from mixamo, right? What exactly it does? Would be nice to have solution for future.
    Sorry if its dumb question, I am still quite new to Maya as I switched from 3ds max recently.
     
  5. teutonicus

    teutonicus

    Joined:
    Jul 4, 2012
    Posts:
    70
    Copy and paste line into MEL script editor (Windows->General->Script Editor) and run there, you can also use the quick command line that should be in the default Maya layout IIRC:
    upload_2019-3-19_8-18-43.png
    Paste into text box to the right of "MEL" and press Enter to execute.
     
    00christian00 likes this.