Search Unity

C# bindings for Autodesk FBX SDK

Discussion in 'Windows' started by julienkay, Jul 27, 2020.

  1. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    171
    @vkovec In the repository for the C# Wrapper for the FBX SDK used by the FBX Exporter the readme states "The bindings are a subset of the FBX SDK, and in particular they do not support all that you would need for a general-purpose importer."

    The question is whether it's intended to expose more of the API surface in the future (the docs for the package say "The FBX SDK bindings can be executed during gameplay allowing import and export at runtime. Currently a custom importer/exporter needs to be written in order to do so, as the FBX Exporter is Editor only.")

    The bindings I'm after specifically are:
    FbxMesh.GetPolygonVertexNormal()
    FbxMesh.GetPolygonVertexUV()

    FbxGeometryBase.GetElementNormalCount()
    FbxGeometryBase.GetElementNormal()
    FbxGeometryBase.GetElementUVCount()
    FbxGeometryBase.GetElementUV
    FbxGeometryBase.GetElementMaterial()

    Also, do you accept pull requests for that repository?
     
  2. vkovec

    vkovec

    Unity Developer - FBX Exporter

    Joined:
    Aug 9, 2017
    Posts:
    257
    Hi @Julien_,

    Yes it is on the roadmap to expose more of the API for importing in the future, however there is no schedule for it yet.

    We do accept pull requests to the repository, you are welcome to contribute. However, unit tests are required in order to take in the pull request.

    Best,
    Viktoria
     
  3. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    171
    Cool, thanks for the confirmation. I hope to be able to take a closer look at the repo soon.
     
    vkovec likes this.
  4. kyapp69

    kyapp69

    Joined:
    May 12, 2020
    Posts:
    18
    Hi Julien, have you made any headway yet on it? I too am looking at it for an off editor fbx importer solution.

    Cheers.

    Kevin
     
  5. julienkay

    julienkay

    Joined:
    Nov 12, 2013
    Posts:
    171
    @kyapp69: Just found some time to look into it.

    @vkovec:
    The build process works fine for me so far. The only thing where I'm stuck right now is executing the unit tests.

    In the package.json of the TestProjects/FBXSdk project there's an assembly reference for "com.autodesk.fbx.testing". However, no such directory has been created on my machine. From looking at the CMakeLists.txt it looks like the current build process intends to just copy the tests into 'build\install\com.autodesk.fbx\Tests', which works correctly on my end.

    I can delete the assembly reference "com.autodesk.fbx.testing" from the packake manifest. But then in Unity in the Test Runner, no tests show up, even if I enable playmode tests for all assemblies. Is there something I am missing?
     
    kyapp69 likes this.