7
\$\begingroup\$

I want to export an object as a .fbx at runtime in Unity3D.

I've made a C# script to export a mesh filter or skinned mesh renderer to a .obj file at runtime, but I want the animation and skin support that only .fbx supports.

After some research, using the Autodesk FBX SDK or some other external .dll seems like my best option. How do I call Autodesk's FBX SDK at runtime? Is there another external .dlls I could use for this?

Another option could possibly be to write the mesh information as a text file, then convert to .fbx to export.

\$\endgroup\$
6
  • 4
    \$\begingroup\$ Does it have to be FBX? That's a proprietary, mostly undocumented format that most people can only access via the FBX SDK. Compare to, say, Collada, which is open and well-documented and should work in whatever tool you're loading the generated FBX into. \$\endgroup\$ Jun 27, 2013 at 5:46
  • 4
    \$\begingroup\$ More to the point, why are you exporting at runtime? There might be another solution for what you actually want to do other than the solution you think you need to do. \$\endgroup\$
    – Tetrad
    Jun 27, 2013 at 7:42
  • \$\begingroup\$ Does Collada support skinned mesh renderers and animations? If so something like that may work, I was just told FBX because of the information it can hold and because it works for any 3D platform. And I'm exporting at runtime because that's the entire purpose of this script, essentially the user can adjust the mesh and textures on their character, then press an "Export" button and download the textures and .fbx for the character. This is all done in the web player, I have it working with textures, animations, and .OBJ. But I'd like .FBX because it supports skinned mesh renderers and animations \$\endgroup\$ Jun 27, 2013 at 17:02
  • \$\begingroup\$ However, if I could export to another supported 3D format that would be able to hold skin information and special animation information that would work even better than .FBX. \$\endgroup\$ Jun 27, 2013 at 17:03
  • \$\begingroup\$ @TimothyWilliams Collada supports skinning and animations. \$\endgroup\$ Feb 19, 2014 at 11:46

1 Answer 1

1
\$\begingroup\$

Autodesk has a FBX Converter, which can take .objs and output .fbx. Included is a command line tool, which you could call from your game at runtime. As long as you do not want to have that functionality distributed to every player, that should be enough.

\$\endgroup\$
1
  • \$\begingroup\$ Though the comments above are useful, this does directly answer the question. \$\endgroup\$ Apr 17, 2014 at 16:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .