Search Unity

  1. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

New FBX Exporter in 2017.2

Discussion in 'External Tools Previews' started by ans_unity, Oct 12, 2017.

  1. vkovec

    vkovec

    Unity Developer - FBX Exporter

    Joined:
    Aug 9, 2017
    Posts:
    188
    Hi @Goooooooogle,

    We have not yet looked into changing the ModelExporter methods to public, however it is possible to change your local copy of the package to expose these functions.

    Here are the steps to do so:

    1. Under packages select FBX exporter, then right click in the project view and select "Show in Explorer"

    upload_2019-12-12_11-24-49.png

    2. Move the package from this location into your Unity project's Packages/ folder

    3. Now in Unity you can open up the FbxExporter.cs file and make the necessary functions public.


    Alternatively instead of getting the package from the package manager you can also fork our public repo: https://github.com/Unity-Technologies/com.unity.formats.fbx

    Let me know if this doesn't work or if you have any issues.

    Best,
    Viktoria
     
  2. vkovec

    vkovec

    Unity Developer - FBX Exporter

    Joined:
    Aug 9, 2017
    Posts:
    188
    Hi @FeastSC2 ,

    Very sorry about this. You are right that exporting should not cause any loss of data or change your scene, this is definitely a high priority bug. I'm glad you were able to find a workaround in the meantime.

    Best,
    Viktoria
     
    FeastSC2 likes this.
  3. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    612
    Hi @vkovec, thanks for the suggestions, but have you actually looked at the bug repro project in (Case 1201937)? It breaks with all the above.
     
  4. AlbyDj90

    AlbyDj90

    Joined:
    Feb 7, 2015
    Posts:
    33
    I found the scripts used in the com.autodesk.fbx package...but it's a little too complicated to figure out what all this does without a proper documentation.
    The example for a basic exporter in https://docs.unity3d.com/Packages/com.unity.formats.fbx@2.0/manual/devguide.html does not show a way to convert and export an object from unity...only an empty single file.
     
  5. bhudson

    bhudson

    Joined:
    Nov 21, 2014
    Posts:
    29
    Hi @AlbyDj90 : indeed, the documentation we provide with the package is intended to be the bare minimum to get an experienced Autodesk FBX SDK programmer to start applying their knowledge to Unity/C#. The com.autodesk.fbx package is a preview package, not easily discoverable via the Package Manager UI, on purpose: we can't provide much support for it.

    At the moment the best link to the SDK's latest documentation is here: https://help.autodesk.com/view/FBX/...ome_to_the_fbx_sdk_what_new_fbx_sdk_2020_html

    The learning curve is quite steep unfortunately.
     
  6. bhudson

    bhudson

    Joined:
    Nov 21, 2014
    Posts:
    29
    If you're using the FBX Exporter package, this post doesn't affect you (yet).


    Hi everyone using the FBX SDK C# Bindings directly!

    We've uploaded the Bindings to version 3.0.0-preview.1 which adds support for FBX SDK 2020.0. If you've manually added the Bindings package to your manifest.json you can use the Package Manager UI to update to the latest. Otherwise, you can add the line:
    Code (csharp):
    1.     "com.autodesk.fbx": "3.0.0-preview.1",
    to the top of the "dependencies" in your manifest.json.

    As mentioned above, this is for experimental use and we can't offer much support.

    The package's CHANGELOG.md documents what changed in the bindings themselves.
    • Access to get/set tangents in animation curves and keys.
    • Access to the new DeepConvertScene (which bakes axis convention changes rather than rotating the root).
    • IL2CPP support.

    Visit Autodesk's page to see what has changed in FBX SDK 2020.0 versus FBX SDK 2018.1.1:
    https://help.autodesk.com/view/FBX/...ome_to_the_fbx_sdk_what_new_fbx_sdk_2020_html
    https://help.autodesk.com/view/FBX/...ome_to_the_fbx_sdk_what_new_fbx_sdk_2019_html
     
  7. bhudson

    bhudson

    Joined:
    Nov 21, 2014
    Posts:
    29
    I was finally able to look at this again. It doesn't seem like the FBX SDK itself has native support for UVWZ: the UV LayerElement class only takes an FbxVector2 (and the Unity FBX Exporter can't go beyond what the FBX SDK provides).

    You'd need to represent your WZ data some other way. You could use a second UV set, or use vertex colours. Then you'd also need scripts to reconstruct it on the other side if it needs to be supported there.

    (Edit: oops, @vkovec ninja'd me two weeks ago)
     
    Last edited: Dec 17, 2019
  8. vkovec

    vkovec

    Unity Developer - FBX Exporter

    Joined:
    Aug 9, 2017
    Posts:
    188
    Hi @fherbst,

    I was able to repro the issue. Until we fix this the workaround would be to remap the materials to the correct ones:

    upload_2019-12-18_13-25-9.png

    This worked for me in the project attached to the case. It's not ideal, especially if you have a lot of materials/textures, but would be a temporary workaround.

    Best,
    Viktoria
     
  9. BaskaletGames

    BaskaletGames

    Joined:
    Oct 4, 2016
    Posts:
    1
    I have the same problem!
    did you fix it?
     
  10. toomasio

    toomasio

    Joined:
    Nov 19, 2013
    Posts:
    70
    Apologies if this has been answered already but I noticed in the export description it reads "Quads or Triangles". Where is the option to choose between the two? right now I am only getting Tris being exported to max.

    Also, are there any plans for two-way integration? For example if I edited the object in probuilder and wanted to "update" the linked fbx file so it also updates in max without having to re-export the fbx file again.

    Thanks!
     
  11. vkovec

    vkovec

    Unity Developer - FBX Exporter

    Joined:
    Aug 9, 2017
    Posts:
    188
    Hi @BaskaletGames,

    We have logged and were able to reproduce the issue. Until we make the fix here is a temporary workaround:

    1. open the problematic file: [myprojectpath]/Assets/ExportedAssets/Integrations/Autodesk/maya/scripts/unityCommands.mel
    2. find the line with the issue (which you can see in the Maya console error log. In the most recent release it is line ~403). It should look something like this:

    Code (csharp):
    1.  
    2. file -import -type "FBX" -ignoreVersion -ra true -mergeNamespacesOnClash true -pr -importFrameRate true -importTimeRange "override" $filePathStr;
    3.  
    3. remove "-importFrameRate true"
    4. close Maya
    5. In Unity go to Edit > Project Settings > Fbx Export and reinstall the integration for Maya. Install into the same location, and when prompted whether to use existing files or replace them, make sure to keep the existing files.

    upload_2020-1-14_14-43-22.png

    Best,
    Viktoria
     
  12. vkovec

    vkovec

    Unity Developer - FBX Exporter

    Joined:
    Aug 9, 2017
    Posts:
    188
    Hi @toomasio,

    I see how the documentation can be a little misleading. It isn't an option but something that happens automatically when exporting a mesh. If the mesh is made up of quads in Unity then it will automatically be exported as quads.

    If you are exporting a mesh containing or made up of FBX files, then in order to get quads, you would need to import the geometry with "Keep Quads" checked:

    upload_2020-1-14_14-49-25.png

    Other examples are exporting Probuilder meshes or procedurally generated meshes with quads. These should maintain the quads on export as well. Let me know if this is not the case for you.

    If you are not changing the hierarchy too much (e.g. just editing a mesh), then you should be able to reexport the object and overwrite the linked FBX (which will update the linked prefab), then import this into Max. Currently there aren't any plans for an integration that does not require re-export.

    Best,
    Viktoria
     
  13. Zolden

    Zolden

    Joined:
    May 9, 2014
    Posts:
    123
    I would like to add Fbx Exporter package to my project, but there's a problem: Fbx Exporter is not listed under Package Manager. I'm using 2019.2.17.f1 version of Unity.

    Any tips on why isn't there Fbx Exporter in the list of packages, and how to add it to my project anyway?

    Edit: Oh, found the solution. Should have checked "Show Preview Packages" under "Advanced".
     
  14. vkovec

    vkovec

    Unity Developer - FBX Exporter

    Joined:
    Aug 9, 2017
    Posts:
    188
    Hi everyone! We have released a new version of the FBX exporter package (3.0.0-preview.2), with the following changes:

    Added
    - FBX Recorder to record animations from the Unity Recorder directly to FBX (adds dependency to Unity Recorder).
    - Export animated focal length and lens shift of cameras.

    Changed
    - Updated dependency to com.autodesk.fbx version 3.0.0-preview.1, which means we update to FBX SDK 2020

    Fixed
    - Fixed camera aspect and gate fit exporting as incorrect values.

    Known Issues
    - Using the FBX Recorder to record animated characters is not supported yet, and fails in some cases.
     
  15. Monil

    Monil

    Joined:
    Apr 24, 2012
    Posts:
    67
    Hello everyone,
    I just installed fbx exporter 3.0 preview 2,
    I recorded facial animations using Cinema Suite -> Cinema Face Cap which records the blendshape animation in .anim file, I need to import the blendshape animation into 3ds max, but the exported file includes the morph modifier with mesh data but with empty name and without the weight animation of each blendshape.

    Thanks to anyone who helps me out
     
  16. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    612
    @Monil please report a bug through Unity Bug Reporter and attach that file.
     
  17. Monil

    Monil

    Joined:
    Apr 24, 2012
    Posts:
    67
    Ok, I have report a bug through Unity Bug Reporter case 1214226.
     
  18. vkovec

    vkovec

    Unity Developer - FBX Exporter

    Joined:
    Aug 9, 2017
    Posts:
    188
    Hi @Monil,

    Unfortunately, the FBX exporter does not currently export blendshape animation, only the blendshapes themselves. The mesh data having an empty name however is a bug.

    Best,
    Viktoria
     
  19. vkovec

    vkovec

    Unity Developer - FBX Exporter

    Joined:
    Aug 9, 2017
    Posts:
    188
    Hello! We have released a new version of the FBX exporter package (3.0.1-preview.2), with the following changes:

    Added
    - Added option to export geometry when recording with the FBX recorder (in previous version geometry was always exported).
    - Added settings to transfer animation between two transforms in the recorded hierarchy.

    Fixed
    - It is now possible to record animated characters with the FBX recorder.
     
  20. vkovec

    vkovec

    Unity Developer - FBX Exporter

    Joined:
    Aug 9, 2017
    Posts:
    188
    Hi @friuns3,

    Thank you for your patience. Please try with the latest release of the FBX exporter (3.0.1-preview.2). We have updated to using FBX SDK 2020, which seems to have fixed the issue.

    Let me know if you still see problems.
     
  21. Saoirsette

    Saoirsette

    Joined:
    Feb 11, 2020
    Posts:
    2
    I need help! After I exported my model to fbx, the armature bones in the fbx that were created are way smaller than the model itself. Same problem after the fbx is read in blender.



    These are my export settings

    I just want to export a humanoid model from prefab asset to fbx.

    What am I not doing right and how do I fix this? The bones in the model prefab were fine before export!

    EDIT: I selected 'Export Selected Object(s) as a single fbx.'
     
  22. Monil

    Monil

    Joined:
    Apr 24, 2012
    Posts:
    67
    To Saoirsette, the first thing I would do is update the plugin.
     
  23. Saoirsette

    Saoirsette

    Joined:
    Feb 11, 2020
    Posts:
    2
  24. wetcircuit

    wetcircuit

    Joined:
    Jul 17, 2012
    Posts:
    1,233
    These are 2 different assets with similar names. Yours is by "UnLogick Factory. You should contact the developer for assistance.

    This forum thread is for Unity Technology's FBX Exporter that can be downloaded through the package manager. It is free, and it doesn't have the problems you are posting.
     
  25. unity_9476764

    unity_9476764

    Joined:
    Jun 21, 2019
    Posts:
    1
    Hello. I use Unity 2018.4.15f1.
    Fbx exporter 3.0.0
    When I am triyng to export fbx - this message apears:

    Code (CSharp):
    1. KeyNotFoundException: The given key was not present in the dictionary.
    2. System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) (at <e1319b7195c343e79b385cd3aa43f5dc>:0)
    3. UnityEditor.Formats.Fbx.Exporter.ModelExporter.ExportSkeleton (UnityEngine.SkinnedMeshRenderer skinnedMesh, Autodesk.Fbx.FbxScene fbxScene, System.Collections.Generic.Dictionary`2[UnityEngine.SkinnedMeshRenderer,UnityEngine.Transform[]]& skinnedMeshToBonesMap) (at Library/PackageCache/com.unity.formats.fbx@3.0.0-preview.2/Editor/FbxExporter.cs:1003)
    4. UnityEditor.Formats.Fbx.Exporter.ModelExporter.ExportSkinnedMesh (UnityEngine.GameObject unityGo, Autodesk.Fbx.FbxScene fbxScene, Autodesk.Fbx.FbxNode fbxNode) (at Library/PackageCache/com.unity.formats.fbx@3.0.0-preview.2/Editor/FbxExporter.cs:928)
    5. UnityEditor.Formats.Fbx.Exporter.ModelExporter.ExportMesh (UnityEngine.GameObject gameObject, Autodesk.Fbx.FbxNode fbxNode) (at Library/PackageCache/com.unity.formats.fbx@3.0.0-preview.2/Editor/FbxExporter.cs:4072)
    6. UnityEditor.Formats.Fbx.Exporter.ModelExporter.ExportComponents (Autodesk.Fbx.FbxScene fbxScene, System.Boolean exportAnim) (at Library/PackageCache/com.unity.formats.fbx@3.0.0-preview.2/Editor/FbxExporter.cs:3162)
    7. UnityEditor.Formats.Fbx.Exporter.ModelExporter.ExportAll (System.Collections.Generic.IEnumerable`1[T] unityExportSet, System.Collections.Generic.Dictionary`2[TKey,TValue] exportData) (at Library/PackageCache/com.unity.formats.fbx@3.0.0-preview.2/Editor/FbxExporter.cs:3505)
    8. UnityEditor.Formats.Fbx.Exporter.ModelExporter.ExportObjects (System.String filePath, UnityEngine.Object[] objects, UnityEditor.Formats.Fbx.Exporter.IExportOptions exportOptions, System.Collections.Generic.Dictionary`2[TKey,TValue] exportData) (at Library/PackageCache/com.unity.formats.fbx@3.0.0-preview.2/Editor/FbxExporter.cs:4201)
    9. UnityEditor.Formats.Fbx.Exporter.ExportModelEditorWindow.Export () (at Library/PackageCache/com.unity.formats.fbx@3.0.0-preview.2/Editor/ExportModelEditorWindow.cs:643)
    10. UnityEditor.Formats.Fbx.Exporter.ExportOptionsEditorWindow.OnGUI () (at Library/PackageCache/com.unity.formats.fbx@3.0.0-preview.2/Editor/ExportModelEditorWindow.cs:444)
    11. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <e1319b7195c343e79b385cd3aa43f5dc>:0)
    12. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    13. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <e1319b7195c343e79b385cd3aa43f5dc>:0)
    14. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <e1319b7195c343e79b385cd3aa43f5dc>:0)
    15. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342)
    16. UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336)
    17. UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:310)
    18. UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean customBorder, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:361)
    19. UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:320)
    20. UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:266)
    21. UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:438)
    22. UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:421)
    23. UnityEngine.Experimental.UIElements.IMGUIContainer.HandleEvent (UnityEngine.Experimental.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:401)
    24. UnityEngine.Experimental.UIElements.EventDispatcher.ProcessEvent (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:511)
    25. UnityEngine.Experimental.UIElements.EventDispatcher.Dispatch (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:307)
    26. UnityEngine.Experimental.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.Experimental.UIElements.EventBase e, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:176)
    27. UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:245)
    28. UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68)
    29. UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
    30.  
     
  26. bhudson

    bhudson

    Joined:
    Nov 21, 2014
    Posts:
    29
    unity_9476764, thanks for the bug report. Are you able to share the model you're trying to export?
     
  27. wfowlerD9

    wfowlerD9

    Joined:
    Jun 26, 2019
    Posts:
    24
    I installed the package from the Unity Package Manager, but I'm getting an error message:
    DllNotFoundException: Packages/com.autodesk.fbx/Windows/UnityFbxSdkNative.dll


    Sure enough, this file does not exist anywhere, and Googling has yielded nothing. Did I forget to install something?
     
  28. bhudson

    bhudson

    Joined:
    Nov 21, 2014
    Posts:
    29
    wfowlerD9: I assume this is during a build? It looks like if you add the define
    COM_UNITY_FORMATS_FBX_AS_ASSET
    then it should work, can you try that?

    I've logged to fix the logic in the next release (you can see it in NativeMethods.cs ; clearly something old leaked through).
     
  29. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    236
    I'm getting the same error and it's extremely annoying Unity 2018.4.12, i also get it in 2017 for a different project.

    Code (CSharp):
    1. KeyNotFoundException: The given key was not present in the dictionary.
    2. System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) (at <e1319b7195c343e79b385cd3aa43f5dc>:0)
    3. UnityEditor.Formats.Fbx.Exporter.ModelExporter.ExportSkeleton (UnityEngine.SkinnedMeshRenderer skinnedMesh, Autodesk.Fbx.FbxScene fbxScene, System.Collections.Generic.Dictionary`2[UnityEngine.SkinnedMeshRenderer,UnityEngine.Transform[]]& skinnedMeshToBonesMap) (at Library/PackageCache/com.unity.formats.fbx@3.0.1-preview.2/Editor/FbxExporter.cs:1003)
    4. UnityEditor.Formats.Fbx.Exporter.ModelExporter.ExportSkinnedMesh (UnityEngine.GameObject unityGo, Autodesk.Fbx.FbxScene fbxScene, Autodesk.Fbx.FbxNode fbxNode) (at Library/PackageCache/com.unity.formats.fbx@3.0.1-preview.2/Editor/FbxExporter.cs:928)
    5. UnityEditor.Formats.Fbx.Exporter.ModelExporter.ExportMesh (UnityEngine.GameObject gameObject, Autodesk.Fbx.FbxNode fbxNode) (at Library/PackageCache/com.unity.formats.fbx@3.0.1-preview.2/Editor/FbxExporter.cs:4077)
    6. UnityEditor.Formats.Fbx.Exporter.ModelExporter.ExportComponents (Autodesk.Fbx.FbxScene fbxScene, System.Boolean exportAnim) (at Library/PackageCache/com.unity.formats.fbx@3.0.1-preview.2/Editor/FbxExporter.cs:3150)
    7. UnityEditor.Formats.Fbx.Exporter.ModelExporter.ExportAll (System.Collections.Generic.IEnumerable`1[T] unityExportSet, System.Collections.Generic.Dictionary`2[TKey,TValue] exportData) (at Library/PackageCache/com.unity.formats.fbx@3.0.1-preview.2/Editor/FbxExporter.cs:3479)
    8. UnityEditor.Formats.Fbx.Exporter.ModelExporter.ExportObjects (System.String filePath, UnityEngine.Object[] objects, UnityEditor.Formats.Fbx.Exporter.IExportOptions exportOptions, System.Collections.Generic.Dictionary`2[TKey,TValue] exportData) (at Library/PackageCache/com.unity.formats.fbx@3.0.1-preview.2/Editor/FbxExporter.cs:4206)
    9. UnityEditor.Formats.Fbx.Exporter.ExportModelEditorWindow.Export () (at Library/PackageCache/com.unity.formats.fbx@3.0.1-preview.2/Editor/ExportModelEditorWindow.cs:643)
    10. UnityEditor.Formats.Fbx.Exporter.ExportOptionsEditorWindow.OnGUI () (at Library/PackageCache/com.unity.formats.fbx@3.0.1-preview.2/Editor/ExportModelEditorWindow.cs:444)
    11. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <e1319b7195c343e79b385cd3aa43f5dc>:0)
    12. Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    13. System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <e1319b7195c343e79b385cd3aa43f5dc>:0)
    14. System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <e1319b7195c343e79b385cd3aa43f5dc>:0)
    15. UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:342)
    16. UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:336)
    17. UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:310)
    18. UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect, System.Boolean customBorder, System.Boolean floatingWindow, System.Boolean isBottomTab) (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:361)
    19. UnityEditor.DockArea.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/GUI/DockArea.cs:320)
    20. UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:266)
    21. UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:438)
    22. UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:421)
    23. UnityEngine.Experimental.UIElements.IMGUIContainer.HandleEvent (UnityEngine.Experimental.UIElements.EventBase evt) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:401)
    24. UnityEngine.Experimental.UIElements.EventDispatcher.ProcessEvent (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:511)
    25. UnityEngine.Experimental.UIElements.EventDispatcher.Dispatch (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:307)
    26. UnityEngine.Experimental.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.Experimental.UIElements.EventBase e, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at C:/buildslave/unity/build/Modules/UIElements/Panel.cs:176)
    27. UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:245)
    28. UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68)
    29. UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)
     
  30. PigletPants

    PigletPants

    Joined:
    Sep 19, 2019
    Posts:
    11
    I am getting this same error message also (Unity v2018.4.14f1, FBX exporter v3.03), but it is when I press press the export button from the dialog produced by GameObject -> Export To FBX. I didn't try build before I downgraded to v2.03 but that is working normally as far as I can see.
     
    Hanserw likes this.
  31. cirE0205

    cirE0205

    Joined:
    May 22, 2017
    Posts:
    1
    I don't know, I installed the latest version of FBX exporter, and those errors came out.
    EntryPointNotFoundException: CSharp_AutodeskfFbx_FBXSDK_PROPERTY_ID_NULL_get___
    .....
    So I go back to package manager and select an older version... no more errors...I saw people got same erros.. it might help.

    Unity Version 2019.3.2f1
     
    Hanserw likes this.
  32. Hanserw

    Hanserw

    Joined:
    Feb 3, 2014
    Posts:
    14
    Please allow the ability to disable vertex merge in the FBX exporter dialog.

    By default, vertices in the same position are merged into one (even if they are noncontiguous).

    This makes it impossible to roundtrip leaves and fence meshes and the like.

    Note: We could fix this by creating a double-sided shader, but that comes with more limitations/side-effects than allowing the ability to not merge them would.
     
  33. Hanserw

    Hanserw

    Joined:
    Feb 3, 2014
    Posts:
    14
    I'm on Windows10 64bit Enterprise, and Unity Version 2019.3.2f1.

    Like PigletPants and cirE0205, I too have to use the older v2.03.
    v3.0 and 3.1 give me a missing FBX-related-dll error.
     
  34. vkovec

    vkovec

    Unity Developer - FBX Exporter

    Joined:
    Aug 9, 2017
    Posts:
    188
    Quatum1000 likes this.
  35. vkovec

    vkovec

    Unity Developer - FBX Exporter

    Joined:
    Aug 9, 2017
    Posts:
    188
    Hi @Hanserw,

    Thank you for the feedback, I logged an issue to add the option.
     
    Quatum1000 likes this.
  36. ZhengzhongSun

    ZhengzhongSun

    Joined:
    Oct 12, 2016
    Posts:
    20
    Do you prepare to solve the question about blendshape animation, I have saw many people having the same problems. It will be really helpful for them! Is it really hard to add the function?
     
  37. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    809
    I have also extremely pain with merging vertexes! Really like to to have this option as well!
     
  38. vkovec

    vkovec

    Unity Developer - FBX Exporter

    Joined:
    Aug 9, 2017
    Posts:
    188
    Hello! We have released a new version of the FBX exporter package (3.1.0-preview.1), with the following changes:

    Fixed
    • Blendshapes naming in FBX so that multiple blendshapes all import correctly in Maya. Thank you to @lazlo-bonin for the fix.
    • Don't override transforms when creating FBX Linked Prefab, so that the prefab updates properly when the FBX transforms are modified.
    • Changed FBX Linked Prefab to keep Unity materials instead of using materials exported to FBX file.
      • To revert to using the FBX materials in the Linked Prefab, open the prefab editor and remove the material overrides.
    • Fix issue where Maya imports root bone as null object if it doesn't have any descendants that are also bones.
    • Don't reduce keyframes after recording as it can create unnecessary errors/discrepancies in the exported curve.
    • Updated to latest com.autodesk.fbx (3.0.1-preview.1), to fix DLL not found errors if building for non-standalone platforms (e.g. Android, WebGL).
     
  39. DrabanL

    DrabanL

    Joined:
    Nov 13, 2014
    Posts:
    14
    Hi

    Is it possible to change the default export settings (maya naming, etc) when calling ModelExporter.ExportObject(...,...) ?

    Also, am experiencing few issues while exporting:
    1. Editor logs out warning about "No script asset for ExportSettings. Check that the definition is in a file of the same name." - not sure it is related to the fbx exporter, but it is being logged when i call ModelExporter.ExportObject
    2. Editor logs out a warning about "Identifier uniqueness violation: 'Name:0, Type:AnimationClip'. Multiple Objects with the same name/type are generated by this Importer. There is no guarantee that subsequent imports of this asset will properly re-link to these targets." - but i have checked the object's animations, and there are no more than 1 animation clip with the same name (no duplicates)

    thanks
     
  40. stevensrmiller

    stevensrmiller

    Joined:
    Oct 20, 2017
    Posts:
    220
    Hi everyone,

    Hope I'm using this forum properly. It seems that all questions about the FBX Exporter are being handled here as comments to this one thread, as opposed to each question starting its own topic. (If I'm wrong about that, someone who knows better please correct me.)

    In working with the FBX Exporter, I have created an empty GameObject with two child GameObjects. Each child uses the same mesh. If I select the parent and choose "Export to FBX," it works fine. However, the exported .fbx file now contains two identical meshes whereas I started with only one mesh and my child objects originally each referred to that mesh.

    The documentation says
    I guess I misunderstood this, as I had expected "instances" meant references to the same mesh, just as in my original hierarchy. Instead, it appears to export each references to the same mesh as a stand-alone data structure.

    Is that the intended behavior? Is there a way to make FBX Exporter preserve multiple references to the same mesh?

    Thanks!
     
    Last edited: Apr 23, 2020
  41. vkovec

    vkovec

    Unity Developer - FBX Exporter

    Joined:
    Aug 9, 2017
    Posts:
    188
    Hi @DrabanL,

    It is not possible with the current public API, but we plan to make the functions that allow you to change export settings public in a future release.

    Until then, you can also make it public by modifying the source code locally. Here are the steps:

    1. In the Unity Project view, under "Packages", select the FBX Exporter.
    2. Right click and select "Show in Explorer" to find the downloaded package location.
    3. Copy the com.unity.formats.fbx folder to a new location
    4. In Unity remove the FBX exporter package from the Package Manager
    5. In the Package Manager use the "+" button in the top left corner to add the copied package from disk
    6. In the copied com.unity.formats.fbx package, in Editor/FbxExporter.cs search for ExportObject(s) and
    find the ones that take export settings as an argument and change them from internal to public.

    You may also need to make other classes related to the export settings public as well.

    1. Thank you we will take a look. Which version of Unity and FBX exporter are you using?
    2. Would it be possible to send the file that is giving this warning?

    Best,
    Viktoria
     
  42. vkovec

    vkovec

    Unity Developer - FBX Exporter

    Joined:
    Aug 9, 2017
    Posts:
    188
    Hi @stevensrmiller,

    Thank you for bringing this to our attention. I see how the documentation is misleading here. Currently the exporter considers instances to be prefab or model prefab instances.
    However, I agree with you it would make sense to also work for meshes that are not part of prefabs. I've logged an issue to fix this.

    Best,
    Viktoria
     
    Last edited: May 1, 2020
  43. stevensrmiller

    stevensrmiller

    Joined:
    Oct 20, 2017
    Posts:
    220
    Thanks for pursuing this. I think I'm still confused, though. I just created a prefab that included two instances of another prefab. When I export this, I still get a unique mesh for each of the included prefab instances.
     
  44. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    865
    I'm asking this here because I'm getting desperate.

    I've been struggling with the fact that the model importer creates gameobjects with scale values not equal to 1 if the FBX was not exported with the correct unit measurements.
    I have made a thread about this here and not having the scale values of 1 can have annoying consequences, like here amongst other things.

    This can be fixed by re-creating a new FBX asset with the correct unit measurements. However when you need to change a large amount of fbx files, it's really problematic to do it one by one.

    Is there a way to change an FBX's file scale in Unity?
    or to somehow modify the transforms of the gameobjects so that they are equal to 1?

    Any help is greatly appreciated.
     
  45. vkovec

    vkovec

    Unity Developer - FBX Exporter

    Joined:
    Aug 9, 2017
    Posts:
    188
    Hi @stevensrmiller,

    This sounds like a bug. I just tried it out and it looks like it keeps the instances only if the two prefab instances are not themselves nested in another prefab. I've logged the issue. thanks!
     
  46. stevensrmiller

    stevensrmiller

    Joined:
    Oct 20, 2017
    Posts:
    220
    Thanks for staying on this. It's a very useful tool!
     
    vkovec likes this.
  47. DrabanL

    DrabanL

    Joined:
    Nov 13, 2014
    Posts:
    14
    vkovec likes this.
  48. vkovec

    vkovec

    Unity Developer - FBX Exporter

    Joined:
    Aug 9, 2017
    Posts:
    188
    Thank you for sending the file. I tried importing and exporting it however I am not seeing the warning. Which version of Unity and the FBX exporter are you using?

    Thanks,
    Viktoria
     
  49. MoMonay

    MoMonay

    Joined:
    May 9, 2018
    Posts:
    15
    I have found a workaround that allows me to export my blendshape animations to 3D applications.

    1. Add an exportable object to the scene
    2. Write a short script that changes the exportable object transformation.position.x (or any other transform attribute) every frame to the blendshape weight of the blendshape you want to export. I use this:

    Code (CSharp):
    1. using System;
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEngine;
    5.  
    6. public class Record_LipSync_Animations : MonoBehaviour
    7. {
    8.     public SkinnedMeshRenderer face;
    9.  
    10.  
    11.     void Start()
    12.     {
    13.         // Make the game run as fast as the Recorder clip on the timeline
    14.         Application.targetFrameRate = 60;
    15.     }
    16.  
    17.     private void LateUpdate()
    18.     {
    19.        // divide by -10000 to get values normalized for maya
    20.         float newX = face.GetBlendShapeWeight(0) / -10000;
    21.         gameObject.transform.position =
    22.             new Vector3(newX, gameObject.transform.position.y, gameObject.transform.position.z);
    23.      
    24.     }
    25. }
    3. Create a new timeline for the exportable object and create a record clip and make it long enough, and in the inspector you set Selected recorder to FBX, set Recorded Target to Transforms and set the Gameobject to the exportable object. In playmode you let the blendshape animation play and let the record clip record the exportable object's transforms. The recorder clip records the transforms of your exportable object as an FBX with animations and saves it in the Recordings folder.

    4. In your 3D application import the created fbx and use its translate.x as an input to the blendshape value and bake the simulation or you could just copy and paste its animation curve to your blendshape object.

    You can of course record many blendshape animations this way by using child objects.I use this to very quickly get LipSync animations created in unity into maya.
     
  50. DrabanL

    DrabanL

    Joined:
    Nov 13, 2014
    Posts:
    14
    Hi Viktoria,

    I am using unity version 2020.1.0b11
    fbx exporter version 3.1.0-preview.1 with this options:


    also, fbx exporter code was modified as follows:
    ExportModelSettings.cs -> ExportOptionsSettingsSerializeBase -> private bool animatedSkinnedMesh = true;
     
unityunity