Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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.

share|improve this question
4  
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. –  Sean Middleditch Jun 27 '13 at 5:46
4  
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. –  Tetrad Jun 27 '13 at 7:42
    
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 –  Timothy Williams Jun 27 '13 at 17:02
    
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. –  Timothy Williams Jun 27 '13 at 17:03
    
@TimothyWilliams Collada supports skinning and animations. –  SurvivalMachine Feb 19 at 11:46

1 Answer 1

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.

share|improve this answer
    
Though the comments above are useful, this does directly answer the question. –  Seth Battin Apr 17 at 16:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.