Search Unity

Unity Fbx Exporter - Export Meshes, Skinned Meshes, Terrains and Textures

Discussion in 'Assets and Asset Store' started by UnLogick, Oct 2, 2016.

  1. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Adding support for this is trivial. I'll make a setting for it.
     
    Sheynes likes this.
  2. kobara-kazuki

    kobara-kazuki

    Joined:
    Apr 15, 2016
    Posts:
    8
    Looking forward to it! Best regards.
     
  3. vmc7

    vmc7

    Joined:
    May 5, 2018
    Posts:
    4
    The OS is windows.
    I installed it in a new project, so I think it's clean, but...
    The error is here.

    Assets\Plugins\UnLogickFactory\FbxExporter\Scripts\TextureExporter.cs(213,70): error CS1061: 'Shader' does not contain a definition for 'GetDependency' and no accessible extension method 'GetDependency' accepting a first argument of type 'Shader' could be found (are you missing a using directive or an assembly reference?)
     
  4. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Oh really? That log message sounds like a bug. What version of Unity are you on?

    I'll have to add support for that version of Unity. You can get it working by replacing TextureExporter.cs line 220 with
    Code (CSharp):
    1. Shader shader = terrain.materialTemplate.shader;
    But this hotfix will break terrain texture exporting for terrains with more than 4 textures!
     
  5. vmc7

    vmc7

    Joined:
    May 5, 2018
    Posts:
    4
    The version is 2018.4.20f1.
    Line 220? There was only { there was
     
  6. Sheynes

    Sheynes

    Joined:
    Mar 27, 2017
    Posts:
    66
    Hello !
    I am working on a character creator, (it's showcased here, in case
    ) and I wanted to allow people to export their models as an fbx.
    So I purchased your package ! So far the script showcased in the example scene seem to work, if I do not put any HDRP material on the exported object or any subobjects. If the material is an HDRP material and I try to export with textures it tells me :
    'ArgumentException: RenderTextureDesc width must be greater than zero.
    Parameter name: desc.width'
    I'd like the texture exporting to work, but it's not the main problem i'm facing at the moment.

    In fact, no matter the scene, and even in an empty scene, whenever and however I try to export my own model, by code, or with the dedicaced window, it does crash my unity editor. I took a little video to showcase the problem.

    https://i.gyazo.com/ae33c5c250f624b405208b20ec3e5857.mp4

    I also joined the crash files as a zip in case it could help us to find the problem. But basically the error is :
    UnityFbxExporter_x86_64_v15.dll caused an Access Violation (0xc0000005)
    in module UnityFbxExporter_x86_64_v15.dll at 0033:4fbdedc0.

    I am using unity LTS 2019.4.8f1 along with windows 10. May you have an hint ?
     

    Attached Files:

  7. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Wow that video looks awesome, well done!

    About your crash. never seen anything like it. Can you please pm that zip file, or even better a repro project, it can be the entire thing for your convenience or preferable a trimmed down version, working with reproducible results makes everything so much easier.
     
  8. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Apologies, dunno how I could get that mixed up. The line that needs to be replaced looks like this.
    Code (CSharp):
    1. Shader shader = layer > 0 ? terrain.materialTemplate.shader.GetDependency("AddPassShader") : terrain.materialTemplate.shader;
    I just checked the unity documentation and it seems that line of code should have given me an error when I uploaded the project to the asset store... Dunno how that happened, but I will fix this immediately, unfortunately the fix will not be quite as flexible when it comes to terrain replacement shaders.

    EDIT: I figured out how this happened, Unity 2018.3 and 2018.4 uses the new terrain layers but doesn't have this api... I uploaded with 2018.1 which uses the old terrain code and such compiled just fine. I'll release a new version asap.
     
    Last edited: Dec 1, 2020
  9. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Unity Fbx Exporter 1.6.0 is live on the asset store.
    Asset Store: Unity Fbx Exporter

    Changes
    • Added BlendShapeExportOptions.WriteDeformations
    • Fixed the Look in Unity Dark theme
    • Removed Warnings in newer versions of Unity
    • Fixed a broken script for 2018.3 and 2018.4
    Enjoy!
     
    kazuki1123 and wetcircuit like this.
  10. Artini

    Artini

    Joined:
    Jan 29, 2016
    Posts:
    181
    Does not export meshes at all - even example assets from Unity fail.
    Unity 2019.4.15f1. Windows 10 Pro, 64 bit
    Please help.
    WorkshopSet01a.png
    WorkshopSet02a.jpg
     
  11. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    The error says "Mesh not readable." Select the mesh importer and click the readable toggle in the inspector. Unity can optimizes the mesh for runtime and reduce memory usage by not making it readable.
     
  12. vmc7

    vmc7

    Joined:
    May 5, 2018
    Posts:
    4
    We have seen it in action.
    Thank you!
     
    UnLogick likes this.
  13. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Found a serious crash bug, huge thanks to @manurocker95

    It seems skinned meshes not marked isReadable results in a hard native crash!

    Please insert this hotfix to FbxExporter.cs at line 872.
    Code (CSharp):
    1. if (!mesh.isReadable)
    2. {
    3.     Debug.LogErrorFormat(mesh, "Fbx Exporter, Mesh not marked isReadable, skipping mesh {0}", mesh);
    4.     return false;
    5. }
    6.  
    This will log each mesh as not readable, and if you click the log line the mesh asset will be pinged, making it easier for you to fix.
     
  14. yinch

    yinch

    Joined:
    Jun 18, 2016
    Posts:
    6
    Hi,

    Doing a standalone build for Windows 10 64-bit using Unity 2019.4.10f1.
    Using the just the vanilla Example scene, when running the standalone exe, the export process "Player.log" reports this:
    Code (CSharp):
    1. Fbx Custom Property Exporter Example - Exporting own GameObject with custom properties
    2. (Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)
    3.  
    4. ArgumentNullException: Value cannot be null.
    5. Parameter name: shader
    6.   at (wrapper managed-to-native) UnityEngine.Material.CreateWithShader(UnityEngine.Material,UnityEngine.Shader)
    7.   at UnityEngine.Material..ctor (UnityEngine.Shader shader) [0x00008] in <548b4fa0e7e04f27a1b7580930bfb7dc>:0
    8.   at UnLogickFactory.TextureExporter.Awake () [0x00023] in <ffb7da9e7b32413ab772826767b783c9>:0
    9. UnityEngine.Object:Internal_CloneSingle(Object)
    10. UnityEngine.Object:Instantiate(GameObject)
    11. UnLogickFactory.TextureExporter:CreateTextureExporter()
    12. UnLogickFactory.FbxExporter:Export(String, FbxExportSettings, Transform[])
    13. UnLogickFactory.FbxCustomPropertyExporterExample:Export()
    14. UnLogickFactory.FbxCustomPropertyExporterExample:Start()
    15. (Filename: <548b4fa0e7e04f27a1b7580930bfb7dc> Line: 0)
    The exporting works fine when run in Editor
     
    Last edited: Dec 3, 2020
  15. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    You need to force add the fbx exporter shaders to your build settings. On mobile now, will elaborate later.
     
  16. GiuseppeFerraro

    GiuseppeFerraro

    Joined:
    Dec 6, 2020
    Posts:
    2
    Hi, I am going to buy Unity Fbx Exporter. I would like to have some clarification: is it possible to export a single model runtime? that is, deploy and export directly from the executable. Is it possible to choose the destination folder and the model format (.fbx for example)? I should be using it with WebJL - could it cause problems? thanks a lot
     
  17. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    If you're making a Windows Standalone (both 32 bits and 64 bits) build you can export at runtime.

    However WebGL is a cross platform build target so it's NOT supported!
     
    GiuseppeFerraro likes this.
  18. Betzalel

    Betzalel

    Joined:
    Dec 3, 2017
    Posts:
    22
    Hello ! I am not getting a window to export in my UI. in a new project using latest version of 2019. is there something i have to enable/disable/ package manager dependencies? Please help.
     
  19. GiuseppeFerraro

    GiuseppeFerraro

    Joined:
    Dec 6, 2020
    Posts:
    2
    thank you so much
     
  20. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    No dependencies, but Windows only.
    Do you see the menu item "Window|Unity Fbx Exporter"?
    Do you see the editor window?
    Any console errors?
    What other packages are in the project, everything is in a namespace so there shouldn't be any conflicts. If you have a nearly empty project where it fails please send that to me for testing.
     
  21. joyrideapps

    joyrideapps

    Joined:
    Jul 12, 2018
    Posts:
    1
    Hi there. Can you please explain where I can locate the mesh importer? I`m quite new to Unity, and I`m gettint the same "Mesh not readable"-error, so I guess I have the same issue as mentioned previously in this thread. I just can`t find anywhere where it says mesh importer..
     
  22. bigd33103

    bigd33103

    Joined:
    Jul 22, 2019
    Posts:
    4
    Using FBX exporter in 2018.4.20f1 and i am selecting a model thats just a basic armature and mesh with textures ( its a character ) when i export it i get an error of ((
    OnRenderImage() possibly didn't write anything to the destination texture!
    UnityEngine.Camera:Render()
    UnLogickFactory.TextureExporter:performTextureExport(Int32, Int32) (at Assets/Plugins/UnLogickFactory/FbxExporter/Scripts/TextureExporter.cs:349)
    UnLogickFactory.TextureExporter:processMaterial(Material, Renderer, FbxTextureExportScheme, String) (at Assets/Plugins/UnLogickFactory/FbxExporter/Scripts/TextureExporter.cs:172)
    UnLogickFactory.FbxExporter:ExportSkinnedMeshOrCloth(SkinnedMeshRenderer, Transform, TextureExporter, String, Dictionary`2, Dictionary`2, FbxExportSettings, FbxExportCollection) (at Assets/Plugins/UnLogickFactory/FbxExporter/Scripts/FbxExporter.cs:467)
    UnLogickFactory.FbxExporter:Export(String, FbxExportSettings, Transform[]) (at Assets/Plugins/UnLogickFactory/FbxExporter/Scripts/FbxExporter.cs:155)
    UnLogickFactory.FbxExporterWindow:OnGUI() (at Assets/Plugins/UnLogickFactory/FbxExporter/Scripts/Editor/FbxExporterWindow.cs:275)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
    ))
    and then it only exports the textures from the model and nothing else.
     

    Attached Files:

  23. kazuki1123

    kazuki1123

    Joined:
    Apr 26, 2018
    Posts:
    1
    Hello.
    Is it possible to export FBX with constraint information for this asset in the same way that I export FBX with constraint in Maya?
     
  24. FuegoHD

    FuegoHD

    Joined:
    Jun 26, 2020
    Posts:
    2
    Windows only? Still not available for Mac?
     
  25. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    No and there is no active plans to add support for constraints.
     
  26. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    No I'm afraid not, I actually bought a mac with intent on getting this working and then it broke. :( If anyone knows how to fix a mac book that doesn't even blink when you attempt to charge it please let me know.
     
  27. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    I'm aware of this problem, next release should contain a fix.
     
    bigd33103 likes this.
  28. darryldmps

    darryldmps

    Joined:
    Mar 11, 2015
    Posts:
    6
    Hi, when I standalone build and run the runtime fbx exporter example scene (no fbx file is generated), what it supposed to happen? I checked the build folders.
    I made the DLL changes recommenced for Standlanone (it's windows, I've only ticked standalone and x86_64, the rest unchecked) .
    It seems to only work in editor play mode.
    Using unity 2020.1.17f1
    Thanks.
     
  29. kobara-kazuki

    kobara-kazuki

    Joined:
    Apr 15, 2016
    Posts:
    8
    Currently, the version of the output FBX data seems to be 2015, but I would like to specify the FBX version and output the model, is that possible?
     
  30. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    The Fbx Exporter was created with the 2015 sdk, you do have a selection of formats to choose from but obviously not anyone newer than 2015.
     
  31. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Not the first time this broke, I wonder why this keeps changing. The quick solution is simply to move the UnityFbxExporter_x86_64_v16.dll next to the binary, this is one of the locations I'm looking for it. I will update the search logic.
     
  32. darryldmps

    darryldmps

    Joined:
    Mar 11, 2015
    Posts:
    6
    Hi, I have the fbx exporter working at runtime. I'm exporting UMA avatars. The exporter works as expected with any undressed base mesh (in so much that it correctly exports the model, rig and weighting). However when wardrobe items (clothing) are attached to the avatar upon exported the weighting breaks and the model deforms incorrectly. I have troubleshot with the standard included UMA included assets and demo scene but this problem persists.

    You provided an example of an UMA exported avatar, I notice this is just the base mesh, had you succeeded in having the exporter working with clothing items attach to the avatar?
     
  33. gtk2k

    gtk2k

    Joined:
    Aug 13, 2014
    Posts:
    288
    I was hoping that I could export a model with multiple materials with textures, but I can't.
     

    Attached Files:

  34. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    That should work, please pm me that prefab for testing.
     
  35. UnLogick

    UnLogick

    Joined:
    Jun 11, 2011
    Posts:
    1,745
    Apologies for the late reply, I was not aware of this problem, can you please pm me the uma recipe along with any custom slots/overlays that breaks.
     
  36. jcontr42

    jcontr42

    Joined:
    Jul 9, 2020
    Posts:
    2
    Hello there,

    I apologize for the email, but I would like to request a refund on the purchase made from the Unity store for the "Fbx Exporter for Unity". I didn't realize it was only for Windows and I ended up purchasing it out of desperation to get a project done quickly. I apologize but appreciate your help!
     
  37. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,374
    The default Unity FBX exporter has many issues, so I am looking for an alternative. Does your fbx exporter have fix the issues below? The target is 3ds Max 2021 with PBR materials in 3ds Max, URP materials with the metal workflow in Unity.

    -Normal map strength should be set to 1.

    -Normal map should have the box "Flip green Y" ticked.

    -Normal maps should have Gamma set to Override 1.

    -Reflection color should be set to white.

    -For transparent materials, the transparency has to be set according to the alpha value in the color section (if no texture used), the color and reflection color has to be set according to the color section (if no texture used), and the roughness has to be set according to the smoothness slider (inverted) if no texture is used.

    -The Metallic texture Red channel should be wired to the Metalness map. The Alpha channel should be wired via an invert node to the Roughness map. Also, for the texture, Gamma has to be set to Override 1.

    -The Ambient Occlusion map should be wired into the Base Weight Map slot.

    Is this currently possible, and if not, are you willing to fix it?
     
  38. SoyHot

    SoyHot

    Joined:
    Dec 7, 2020
    Posts:
    3
    Hi!
    Does this tool also output "Text Mesh Pro" multibyte characters correctly?
     
  39. SoyHot

    SoyHot

    Joined:
    Dec 7, 2020
    Posts:
    3
    Hello!

    I couldn't wait for a reply and purchased the license.
    Exporting Text Mesh Pro multibyte characters does not display correctly. What should I do?

    source image ..s.PNG
    s.PNG
    exported image e.PNG

    I uploaded the exported file.
     

    Attached Files:

  40. stevez_unity

    stevez_unity

    Joined:
    May 31, 2019
    Posts:
    1
    Hello,

    I encounter similar problems shown in the previous post. When I try to export some avatars, the final textures and avatars are all black.

    Also, exporting some avatars like CandyRockStar Unitychan or some Genshin characters will cause Unity to crash, I don't know if I mistake any setting.

    In addition, when exporting a model without a normal map will automatically generate a normal map texture and pop up a window to inform me to fix the problem manually. (and all other textures are black)

    Except the demo scenes and objects without a material, I didn't manage to export any model as I suppose. I think I must miss something important
     
  41. Polynotes

    Polynotes

    Joined:
    Jan 17, 2019
    Posts:
    2
    I have problems with the example in unity 2019.4.28f1. I can't generate an FBX in a standalone runtime. Standalone is checked for UnityFbxExporter_x86_64_v16.dll and in the log result I have problems with TextureExporter.prefab.

    Code (CSharp):
    1. NullReferenceException: UnLogickFactory - FbxExporter, cannot find Texture Exporter prefab!
    2. At runtime it must be in 'Resources/UnLogickFactory/FbxExporter/' and named 'TextureExporter.prefab'
    3. In the editor you can also put it at 'Assets/Plugins/UnLogickFactory/FbxExporter/Prefabs/TextureExporter.prefab'
    Somebody can help me ?
     

    Attached Files:

  42. Cheeeese

    Cheeeese

    Joined:
    Oct 5, 2012
    Posts:
    12
    How do we force add the fbx exporter shaders to the build? my standalone does not work but it works in Editor. I'm using Unity 2020.3.26 Can anyone please post what is needed to successfully build a standalone exe? Thanks.
     
    Last edited: Jan 22, 2022
  43. Cheeeese

    Cheeeese

    Joined:
    Oct 5, 2012
    Posts:
    12
    Have you ever found a fix for this? I'm running into the same error on Unity 2020.3.26 standalone
     
  44. Seerslab_App

    Seerslab_App

    Joined:
    Nov 15, 2018
    Posts:
    2
    After exporting FBX, it comes out as a dummy file from the max file. How can I see the mesh state as it is in Unity? 캡처000.JPG 캡처111.JPG
     
  45. atifteck

    atifteck

    Joined:
    Sep 27, 2021
    Posts:
    3
    Hello,

    I want to export an FBX from a unity scene with text added on to it. I tried unity TextMeshPro and 3D Text but they don't get exported. Is there any way I can get the text to export with the FBX as well?
     
  46. mdzedzej

    mdzedzej

    Joined:
    Nov 4, 2015
    Posts:
    1
    Crashes my unity trying to export anything.
     
  47. adam_bajgar

    adam_bajgar

    Joined:
    Nov 22, 2020
    Posts:
    3
    Hey! My model does not have any of the materials which have a base map. How can I fix this? thanks.
     

    Attached Files:

  48. All_American

    All_American

    Joined:
    Oct 14, 2011
    Posts:
    1,528
    Does the FBX’s exported using this work in Lumion?
     
  49. QHuman

    QHuman

    Joined:
    Mar 14, 2017
    Posts:
    2
    hi
    i just bought FBX exporter

    i open the example scene
    i drag a rigged character parent under the transform for export
    i Play and unity crash
    secondly i use windows, FBX exporter window to try: export selected to single FBX. press eexport adn it crash too.

    the character is quite simple: a human mesh as skinmeshrenderer binded to a skeleton hierarchy, no animation.


    please help thats the sole purchase of purchasing this asset
    attached is the FBX character

    thanks
     

    Attached Files:

  50. QHuman

    QHuman

    Joined:
    Mar 14, 2017
    Posts:
    2
    i just found the way to work and not crash: the FBX character should have read/write enabled! and it works