Search Unity

New FBX Exporter in 2017.2

Discussion in 'Editor Workflows' started by ans_unity, Oct 12, 2017.

  1. VoxelOne

    VoxelOne

    Joined:
    Jul 22, 2019
    Posts:
    1
    Greetings, All: Hoping this is a super easy fix...

    I am having trouble getting the FBX Export integration to work with any version of the FBX Export (2.0.x)

    With 2.0.2, When I click the "Install Unity Integration" button after selecting either 3ds Max 2019 or 202 I am not prompted for an install directory per the documentation and ultimately the install fails with a message that says "Failed to configure 3DS Max, Please check logs (exitcode--1)." Not really sure what logs to check.

    If I attempt to install the integration files with an older version of FBX Exporter (v2.0.1) I DO get the install directory prompt but the install still fails with the same error as above.

    I've tried Uninstalling and re-installing several times to no avail. I'm using Unity 2019.1.5f1.

    Any insight as to why this might be happening?
     
  2. shedworksdigital

    shedworksdigital

    Joined:
    Nov 7, 2016
    Posts:
    40
    Hi Viktoria,

    I have updated to the latest version of the fbx exporter but it doesn't seem to resolve this issue. Is there an ETA on this fix?

    I am also having the same problem as above when I update where the Unity to Maya integration is not included in the package and it seems to be broken..
     
  3. 41395

    41395

    Joined:
    Jun 16, 2013
    Posts:
    13
    I am having the same issue with 2019.1.11f1
     
  4. buc

    buc

    Joined:
    Apr 22, 2015
    Posts:
    53
    I can't install it anymore. Tested 2019.1.4f1 and 9f1, but it doesn't get listed in the package manager (preview packages and all packages selected). It takes pretty long until the packages are loaded, but no FBX exorter gets shown.
    Have I missed any changes? I've also checked the menu-items (in case it's build into the editor) one by one.
     
  5. asa989

    asa989

    Joined:
    Dec 18, 2015
    Posts:
    29
    Hi Guys,

    I would like to export some objects at Runtime (built version). I found this example from documentation and I changed scene name to mine. So, if i play the scene in editor, it will make an empty FBX file!!! and i dont have my objects. so i tried to build the project and then see what will happen but i get this error and it wont build "The type or namespace name 'Autodesk' could not be found". I do have "using Autodesk" and "using Autodesk.FBX" in my code.

    Does anyone know where the problem is? also what if, i just want to export some objects in runtime and not the whole scene?!

    using Unity 2019.1.5F
    FBX_Exporter 2.0.2
     
    Last edited: Jul 30, 2019
  6. markvi

    markvi

    Unity Technologies

    Joined:
    Oct 31, 2016
    Posts:
    54
    Hi, have you enabed "Show preview packages" under the Advanced drop-down?
     
  7. nigakniga321

    nigakniga321

    Joined:
    Aug 15, 2019
    Posts:
    1
    Does not work on Unity 2019.2.0f1. I am getting an error
    "Unable to resolve reference 'UnityEditor.Timeline'. Is the assembly missing or incompatible with the current platform?
    Reference validation can be disabled in the Plugin Inspector."
    Timeline package is enabled and present in a scene.
     
  8. markvi

    markvi

    Unity Technologies

    Joined:
    Oct 31, 2016
    Posts:
    54
    I'm not able to reproduce this error. Have you tried from a new project? Here's what I see in Package Manager, hope this is helpful:
    Screen Shot 2019-08-19 at 12.30.01 PM.png
     
  9. markvi

    markvi

    Unity Technologies

    Joined:
    Oct 31, 2016
    Posts:
    54
    IEdge likes this.
  10. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    264
    1. Great!
    2. How are issues for those repositories handled? Some Unity repos use Github Issues, others explicitly state that only issues through the Unity Bug Reporter are looked at and that they should be tagged with a specific tag.
    3. Please consider either linking to the currently known issues or porting currently known issues over to Github Issues (depends on answer to 2)
    4. Are you accepting pull requests to those? That's also something other Unity repos state in their description (some do accept them, some don't).
     
    Last edited: Aug 20, 2019
  11. markvi

    markvi

    Unity Technologies

    Joined:
    Oct 31, 2016
    Posts:
    54
    Great questions:
    1. Yay!
    2. Please use the Unity Bug Reporter with a minimal repro project. That will ensure the issue is properly tracked and assigned.
    3. At some future point, it's possible we will sync Github issues with our internal bug tracker. Things are happening internally that will permit that integration, but I can't attach a date to that (because I don't know).
    4. Yes, absolutely! I'll update the project descriptions. We're close to having CI working as well and tied to Github PRs, so you'll even know if your PR passes the unit tests. Keep in mind that it's holiday season at the moment, so please be patient.
     
    fherbst likes this.
  12. snoche

    snoche

    Joined:
    Feb 22, 2010
    Posts:
    60
    After installing the package for "FBX exports" ( "com.unity.formats.fbx": "2.0.2-preview.1") we can not longer make build for macOS, is this a known bug or there is something I am missing here?
     
  13. alexis_morin

    alexis_morin

    Joined:
    Jan 13, 2017
    Posts:
    4
    Hey!

    I tried to reproduce your issue and build on MacOS (on 2019.3) but I unfortunately couldn't! Do you think you could share some of this info so that we can reproduce the bug and eventually fix it:

    1. What version of Unity were you using?
    2. What happens when you build the game and it fails? Do you get an error message in the console?
    3. Does uninstalling the package fix it?
    4. What's your Scripting Backend, and is it IL2CPP? We recently fixed an error that happened when trying to build with IL2CPP with the package installed so it shouldn't be it but it'd be good to make sure.

    Thank you for reporting the issue - I look forward to hearing more about it!
     
  14. TAEKKWON

    TAEKKWON

    Joined:
    Dec 6, 2013
    Posts:
    2
    Unity Record was used to record the BlendShapes animation of the Skinned Mesh Renderer (iPhone X Facial Mocap). When using FBX Export for Game Objects containing the animation, the Animated key of BlendShapes in the Skinned Mesh Renderer is missing and exported to FBX.

    Is there any way to export to FBX including the BlendShapes key?
     
  15. bhudson

    bhudson

    Joined:
    Nov 21, 2014
    Posts:
    18
    Somehow the integrations didn't get published at all with 2.0.x; we're debugging why and we'll put up a new package as soon as we can fix that.


    As a temporary workaround, if you have a full development environment, you can build from the open-source repository here: https://github.com/Unity-Technologies/com.unity.formats.fbx

    That creates the integrations zip files, which you can manually add to the package cache.
     
  16. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    724
    I have updated the "duplicate prefab/gameobjects" from hierarchy to 2019.2.2f1. The parent null error occur because of try catch doesn't work any longer for propertyInfo.SetValue(component, propertyInfo.GetValue(componentToGetFrom)) in 2019.2.2f1;

    This small script duplicates a prefab/gameobject is located in the scene with exactly identical property/inspector settings. Same like press CTRL+D (Duplicate) in the hierarchy. Until today there is no single API command that does in Unity.

    Use:
    var newGo = ValueTools.DuplicateGameObject(GameObjectToDuplicate);

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Reflection;
    3. using System;
    4. using UnityEngine.SceneManagement;
    5. #if UNITY_EDITOR
    6. using UnityEditor;
    7. #endif
    8.  
    9. namespace ComponentUtility {
    10.    public static class ValueTools {
    11.  
    12.        /// <summary>
    13.        /// Duplicate GameObject excepting scene Prefabs
    14.        /// </summary>
    15.        /// <param name="gobject"></param>
    16.        /// <returns></returns>
    17.        public static GameObject DuplicateGameObject(GameObject gobject) {
    18.  
    19.            // Get original Position and Rotation
    20.            var pos = gobject.transform.position;
    21.            var rot = gobject.transform.rotation;
    22.  
    23.            // Get the current Scene. Selection can be different from the active Scene
    24.            var sceneCurrent = SceneManager.GetActiveScene();
    25.  
    26.            SceneManager.SetActiveScene(gobject.scene);
    27.            GameObject goCopy = null;
    28.  
    29. #if UNITY_EDITOR
    30.  
    31.            // ? GameObject is a Prefab ?
    32.            if (PrefabUtility.GetPrefabAssetType(gobject) == PrefabAssetType.Regular) {
    33.  
    34.                // Get the original path of the Prefab in the AssetDatabase
    35.                var path = PrefabUtility.GetPrefabAssetPathOfNearestInstanceRoot(gobject);
    36.  
    37.                // Create an Object out of the AssetDatabase given path
    38.                var obj = AssetDatabase.LoadAssetAtPath(path, typeof(GameObject));
    39.  
    40.                // Instantiate to the Scene where the otiginal GameObject was located
    41.                goCopy = PrefabUtility.InstantiatePrefab(obj) as GameObject;
    42.  
    43.                // The instantiated GameObject has default values are based on the original AssetDatabase Prefab
    44.                // Use Reflection to get all the data from the scene Prefab to match
    45.                // Parent GameObject
    46.                var goAllComponents = gobject.GetComponents(typeof(Component));
    47.                var goCopyAllComponents = goCopy.GetComponents(typeof(Component));
    48.  
    49.                for (int idx = 0; idx < goAllComponents.Length; idx++) {
    50.                    if (typeof(MeshFilter) == goAllComponents[idx].GetType()) { }
    51.                    // Do nothing, otherwhise we leak Unity
    52.                    else {
    53.                        //.GetComponentValues comes from the namespace ComponentUtility.ValueTools
    54.                        // goCopyAllComponents[idx] = goCopyAllComponents[idx].GetComponentValues(goAllComponents[idx]);
    55.                        goCopyAllComponents[idx].GetComponentValues(goAllComponents[idx]);
    56.                        if (goCopyAllComponents[idx] == default) {
    57.                            Debug.LogError(".GetComponentValues(Component) does not matched!");
    58.                        }
    59.                    }
    60.                }
    61.  
    62.                // Child GameObjects
    63.                Transform[] goChilds = new Transform[gobject.transform.childCount];
    64.                Transform[] GoCopyChilds = new Transform[goCopy.transform.childCount];
    65.  
    66.                for (int idx = 0; idx < goChilds.Length; idx++) {
    67.  
    68.                    goChilds[idx] = gobject.transform.GetChild(idx);
    69.                    GoCopyChilds[idx] = goCopy.transform.GetChild(idx);
    70.  
    71.                    goAllComponents = goChilds[idx].GetComponents(typeof(Component));
    72.                    goCopyAllComponents = GoCopyChilds[idx].GetComponents(typeof(Component));
    73.  
    74.                    for (int cidx = 0; cidx < goAllComponents.Length; cidx++) {
    75.                        if (typeof(MeshFilter) == goCopyAllComponents[cidx].GetType()) { }
    76.                        // Do nothing, otherwhise we leak Unity
    77.                        else {
    78.                            goCopyAllComponents[cidx].GetComponentValues(goAllComponents[cidx]);
    79.                            if (goCopyAllComponents[cidx] == default) {
    80.                                Debug.LogError(".GetComponentValues(Component) does not match!");
    81.                            }
    82.                        }
    83.                    }
    84.                }
    85.            } else goCopy = GameObject.Instantiate(gobject);
    86. #else
    87.                 goCopy = GameObject.Instantiate(gobject);
    88. #endif
    89.  
    90.            if (gobject.transform.parent != null)
    91.                goCopy.transform.parent = gobject.transform.parent;
    92.  
    93.            goCopy.transform.localPosition = pos;
    94.            goCopy.transform.localRotation = rot;
    95.  
    96.            goCopy.name = gobject.name;
    97.            goCopy.SetActive(true);
    98.  
    99.            SceneManager.SetActiveScene(sceneCurrent);
    100. #if UNITY_EDITOR
    101.            Selection.activeGameObject = goCopy;
    102. #endif
    103.            return goCopy;
    104.        }
    105.  
    106.        /// <summary>
    107.        /// Get all values of a Component by Reflection
    108.        /// </summary>
    109.        /// <typeparam name="T"></typeparam>
    110.        /// <param name="component"></param>
    111.        /// <param name="componentToGetFrom"></param>
    112.        /// <returns></returns>
    113.        public static T GetComponentValues<T>(this Component component, T componentToGetFrom) where T : Component {
    114.            Type type = component.GetType();
    115.            if (type != componentToGetFrom.GetType())
    116.                return default;
    117.  
    118.            BindingFlags flags = BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Default | BindingFlags.DeclaredOnly;
    119.            PropertyInfo[] propertyInfos = type.GetProperties(flags);
    120.            foreach (var propertyInfo in propertyInfos)
    121.                if (propertyInfo.CanWrite)
    122.                    // Updated: 2019,08,25
    123.                    // During any reason try catch doesn't work on objects placed in the root since 2019.2.2f1
    124.                    // Error : Cannot set the parent of the GameObject 'A' while its new parent 'B' is being destroyed.
    125.                    // This Error is not correct because the parent is not destroyed at this time.
    126.                    if (propertyInfo.Name.Trim() == "parent" || propertyInfo.Name.Trim() == "parentInternal") {
    127.                        // Debug.Log("propertyInfo.Name. " + propertyInfo.Name + "  Parent? " + componentToGetFrom.gameObject.transform.parent);
    128.                    } else
    129.                        propertyInfo.SetValue(component, propertyInfo.GetValue(componentToGetFrom));
    130.  
    131.            FieldInfo[] fieldinfos = type.GetFields(flags);
    132.            foreach (var fieldinfo in fieldinfos)
    133.                fieldinfo.SetValue(component, fieldinfo.GetValue(componentToGetFrom));
    134.  
    135.            return component as T;
    136.        }
    137.    }
    138. }
     
    Last edited: Aug 25, 2019
  17. snoche

    snoche

    Joined:
    Feb 22, 2010
    Posts:
    60
    I tried to reproduce your issue and build on MacOS (on 2019.3) but I unfortunately couldn't! Do you think you could share some of this info so that we can reproduce the bug and eventually fix it:

    1. What version of Unity were you using?
    2019.1

    2. What happens when you build the game and it fails? Do you get an error message in the console?
    ERROR ITMS-90285: "Invalid Code Signing Entitlements. Your aplication bundle's signature contain code signing entitlements that are not suported on macOS. Specifically, key 'LSMinimumSystemVersion' ... UnityFbxSdkNative' is not supported."

    3. Does uninstalling the package fix it?
    Yes

    4. What's your Scripting Backend, and is it IL2CPP? We recently fixed an error that happened when trying to build with IL2CPP with the package installed so it shouldn't be it but it'd be good to make sure.
    Yes, IL2CPP

    Also it was using IOS 13, maybe this could be the problem?
     
    Last edited: Aug 30, 2019
  18. Reboorn

    Reboorn

    Joined:
    Jun 21, 2017
    Posts:
    1
    Hi , I met the same problem counld you tell me how to solve it ? thanks a lot
     
  19. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    158
    How can we get this implemented guys?

    I've been chatting with the Autodesk 3ds Max Project Managers/Owners and according to them when exporting an fbx from max, things like the physical materials are also embedded into the FBX. So the information is already in the FBX. The issue is reading that info INTO Unity. Can we get the importer updated to also read the info for physical materials from FBX files please? Currently only Standard Materials and Stingray Materials are supported into Unity. So from a Max point of view, that means standard materials and directx Material with Stingray loader.

    What is needed from Unity side to read the available data in the FBX, for physical materials?
     
  20. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    158
    I could never get this to work even from day one, any version, no matter.

    I keep having to manually install the scripts into Max to get it to work
     
  21. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    261
    Hello, we have a very nasty problem with FBX exporter. Basically, it seems like ZW values from the UV channels get stripped on export. We use those for some baked info for our shaders. How can we fix this, if at all?
     
  22. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    264
    You'll probably have to build from source if you need a fix fast.
    From a quick look at the source, you'll have to change a couple places from Vector2 to Vector4 (in FbxExporter.cs). They really are truncating the UVs. Would be great if you can report a proper bug.

    upload_2019-9-2_16-52-46.png
     

    Attached Files:

  23. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    261
    Already tried it. Passing FbxVector4 instead of FbxVector2 makes the UV values bleed into each other and offset, making the UV data broken.
     
  24. hot-knife-digital

    hot-knife-digital

    Joined:
    Oct 22, 2013
    Posts:
    10
    Hi. Just tried to install the Maxscript import / exporters via project/fbx export settings and they aren’t present in 3dsMax 2020 update 2.

    Version 2.0.2 of the fbx exporter I believe.
     
  25. pcreation

    pcreation

    Joined:
    Sep 1, 2012
    Posts:
    2
    Getting errors with FBX Exporter

    FBX Exporter - version 1.3.0f1

    Unity - version 2019.2.5f1

    Errors:

    · Error: Could not load signature of FbxExporters.Editor.ModelExporter:GetAnimationExportDataFromAnimationTrack due to: Could not load file or assembly 'UnityEngine.Timeline, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. assembly:UnityEngine.Timeline, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null type:<unknown type> member:(null) signature:<none>

    · Unloading broken assembly Assets/FbxExporters/Editor/UnityFbxExporterEditor.dll, this assembly can cause crashes in the runtime

    Have checked:

    · Under [Packages] Unity Timeline looks to be installed.

    · However can’t seem to find the ‘com.autodesk.fbx’ under the Package Manager and have searched everywhere for installs/packages without any luck.

    The tool is essential for our project, any help would be much appreciated.

    Cheers