Search Unity

Script for importing Adobe Fuse character model into Unity (fixes materials)

Discussion in 'Asset Importing & Exporting' started by saulth, Jul 7, 2017.

  1. richyoung_readify

    richyoung_readify

    Joined:
    Feb 5, 2019
    Posts:
    3
    Hi truebototics,

    I needed to get this running in 2018.3 as well and have updated the script to work. Please find attached. As materials are now embedded in the model, had to make a few adjustments to the way it handles those. It will create two new materials for the eye and eyelashes.
     

    Attached Files:

  2. richyoung_readify

    richyoung_readify

    Joined:
    Feb 5, 2019
    Posts:
    3
    Let me know if you run it and if you have any issues - I haven't tried the updated script with anything extra like gloves, masks etc - so YMMV.

    Huge thanks to @saulth for the original script - it was a lifesaver!
     
    fairtree likes this.
  3. richyoung_readify

    richyoung_readify

    Joined:
    Feb 5, 2019
    Posts:
    3
    Decided to create a version that extracted the materials out so that I could play around with them as required. Thought I'd put it up here as well.
     

    Attached Files:

  4. RedHermit

    RedHermit

    Joined:
    Oct 14, 2017
    Posts:
    1
    Thank you so much to @saulth and @richyoung_readify - I love this script and has worked great up to Unity 2018. I tried it in Unity 2019, and unfortunately it gives an error in all my tests.

    NullReferenceException: Object reference not set to an instance of an object
    MixamoUnityImporter._process_model (System.String character_name, System.String folder, System.String filename) (at Assets/Mixamo/Editor/MixamoUnityImporter.cs:295)
    MixamoUnityImporter.ImportCharacter () (at Assets/Mixamo/Editor/MixamoUnityImporter.cs:108)

    Line 295 is:
    model.transform.Find(mesh.name).GetComponent<SkinnedMeshRenderer>().sharedMaterials = shared_mats;

    Model is defined on 243:
    var model = (GameObject)PrefabUtility.InstantiatePrefab(asset, UnityEngine.SceneManagement.SceneManager.GetActiveScene());

    Honestly I was hoping to fix it and provide a working script for 2019.. unfortunately all my attempts, and Novice C# skills have failed.. If anyone has any thoughts on what may have changed in 2019 that the code isn't happy with, I'd be grateful for your input.
     
  5. milad-y

    milad-y

    Joined:
    Sep 30, 2018
    Posts:
    2
    It didn't work for me. It does not import any texture.
     
  6. unity_3jbc22

    unity_3jbc22

    Joined:
    Apr 17, 2019
    Posts:
    5
    does this support HDRP?
     
  7. s9asthie

    s9asthie

    Joined:
    Nov 15, 2019
    Posts:
    1
    I debugged the script and implemented a bugfix for all of you who received the following exception:

    NullReferenceException: Object reference not set to an instance of an object
    MixamoUnityImporter._process_model (System.String character_name, System.String folder, System.String filename) (at Assets/Mixamo/Editor/MixamoUnityImporter.cs:295)
    MixamoUnityImporter.ImportCharacter () (at Assets/Mixamo/Editor/MixamoUnityImporter.cs:108)

    For me it is working fine now. :) Thanks for your nice script!
     

    Attached Files:

    Last edited: Nov 15, 2019
    drcfrx, sunwangshu and Shizola like this.
  8. sunwangshu

    sunwangshu

    Joined:
    Mar 2, 2017
    Posts:
    21

    This works for me. Thanks a lot for posting the update!

    Also thanks @saulth and @richyoung_readify !
     
  9. sunwangshu

    sunwangshu

    Joined:
    Mar 2, 2017
    Posts:
    21
    Side note for file setttings:

    屏幕截图(20).png

    Where the texture folder should be named the same way as .fbx file.
    And the texture folder is generated by Fuse from "File -> Export -> Export Textures". Not the ones extracted from .fbx file.
     
  10. mekkinen

    mekkinen

    Joined:
    Sep 25, 2018
    Posts:
    1
    Seems like a super useful script! I tried, I think, all versions posted but it didn't do the job with my Unity 2019.2.14f.

    The script runs, but I'm always left out with a Prefab where my Body, Bottoms, Eyes, etc. have a material called "No name" which doesn't have any texture maps in it. In the /[Character_name]/Materials/ folder I only have one material: "No Name". Same goes for the prefab which is inside the folder /[Character_name]/Textures/, where I have BodyMat, BottomsMat, etc. which have no texture maps attached. My textures are copied into the same /Textures folder, but not used in any materials.

    Have any of you run into the same issue? I'm not too familiar with the material system in Unity, so I find debugging the script to be quite difficult.
     
  11. Jay-Loccult

    Jay-Loccult

    Joined:
    Mar 4, 2013
    Posts:
    1
    I've got the same issue as @mekkinen
    Maybe it comes from the "File -> Export -> Export Textures" which is not available in the version of Fuse that I use.
     

    Attached Files:

  12. dukerustfield

    dukerustfield

    Joined:
    Dec 5, 2019
    Posts:
    33
    This is super old. But Fuse CC is going away in a few weeks. Or at least won't be supported. And I suspect they will break the link to Mixamo.

    Make a standard, empty game. Import into there using above. Move everything to HDRP. Get all the textures and materials setup properly. Then use the Edit/Render Pipeline/Upgrade selected materials to HDRP. You'll still have to tweak a bit.
     
    Beef-Tooth likes this.
  13. Beef-Tooth

    Beef-Tooth

    Joined:
    Nov 27, 2012
    Posts:
    23
    Is this still possible now that Adobe axed Fuse to Mixamo? Also no longer a way to export the facial blendshapes from Fuse. Major loss.
     
  14. StephenWebb

    StephenWebb

    Joined:
    Feb 3, 2013
    Posts:
    11
    If Fuse were a bro, it'd be the one that crashes your wedding drunk, and pisses all over the flora arrangements. I hate Fuse with a passion, Adobe what the hell happened to you? I loathe using their waaaaaay over kill poly count characters, but I still do once every blue moon when I don't feel like doing retop and rigging / weight mapping...