Search Unity

FBXs geometry rendering in wrong place when re-exporting from Maya

Discussion in 'Animation' started by JamesHans, Oct 17, 2014.

  1. JamesHans

    JamesHans

    Joined:
    Jul 3, 2014
    Posts:
    8
    Hi,

    I have an issue with FBXs updating in Unity4.5.3. I have a prefab that has skinned geometry in it, and all is well. In play mode my geometry animates. However when I make changes to the geometry in Maya and re-export it, it comes back wrong in Unity.

    What I mean is that some geometry appears to be skinned to a different bone, and renders in the wrong place. My FBX that comes into Unity only has about 10 objects in it and they are skinned to a bone rig that animates.

    The strange thing is that if I redraw the FBX manually into the scene all parts render in the correct place! So if I manually drag in the FBX again and re-wire up all the materials and bone rig, animation controller, masks, avatar etc all looks correct.

    My gut feeling is that Unity is creating a mapping the first time it creates the bone to mesh mapping and maps a bone to a tri-strip and if that changes from a new export it will map to the wrong mesh - this is how it seems anyway.

    I export very regularly from Maya whether its to change my animation or change the geometry and the model in Unity goes wrong really often. Has anyone seen this before? I had a good look through the answers section but couldn't see anything quite like this?

    Any help would be really appreciated!

    Thanks

    James
     
  2. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    I think your guess regarding the mesh mapping is correct James. I think it would be similar to you saving out your skinning information from the mesh then editing the mesh, adding edge loops and extrusions etc, then reapplying your saved skinning information. My guess is Maya would also not interpolate the added geometry accurately. Only a guess.

    A question related to your question, why are you modifying the geometry of your model so often? I could see editing the mesh 1-2 times maybe to make sure everything is deforming properly but not that often. Most joints need a minimum of two edge loops to deform, preferably three edge loops to deform nicely. This is the same in Maya, Max, Blender, and all game engines including Unity.

    I wonder if combining the 10 mesh objects into one mesh object would make any difference. I havent seen any difference comparing one exported fbx with several mesh objects skinned together vise combining all the mesh objects into one mesh object and exporting. But it's worth a try.

    Disclosure: I'm a Max guy.
     
  3. JamesHans

    JamesHans

    Joined:
    Jul 3, 2014
    Posts:
    8
    Hi,

    Thanks for your reply. I am continually iterating the look of the model in Maya and continuously re-exporting to FBX. The workflow is iterative and without animation it is not problem. Tweak/Export/Tweak/Export and so forth. The source mesh in Maya has 12 materials and upon export I flatten the source meshes (1000s) into per material geometry to support Unity's one material per piece of geometry.

    In Maya I regularly skin and detach skin programmatically to allow iteration of the mesh. I create completely new skin clusters each time as part of the bind process. Upon export I transfer weights from source meshes to target material/geometry split.

    As I said everything works fine in the workflow it's just the sometimes the model is changing in Unity after tweaking in Maya. Still don't know the fix other than wiring up by hand.

    Thanks

    James