Sign in to follow this  
betawarz

How to compile and use FBX model files with VS2012?

Recommended Posts

Hi all,

 

I'm using D3D11 and VS2012.

 

I've read that VS2012 can automatically compile FBX files during the build phase, similar to HLSL files. I haven't been able to find any documentation on how to do this, though. What build action do I set for the FBX files?

 

Also, what function or functions should I look up on MSDN / Google that relate to loading the compiled FBX file? A tutorial or stackoverflow link, etc, will work. I just have nothing to go on at the moment, so I don't even know what to Google for. My searches haven't turned up anything.

 

Thanks

Share this post


Link to post
Share on other sites

There's some information here: Using 3-D Assets in Your Game or App

 

Basically, add an .FBX file to your project, then right-click and open its properties page. Then set the content type to "Mesh Content Pipeline", hit apply, and then configure the mesh content pipeline settings as appropriate (although I think its just the filename for mesh content).

 

Anyways, it outputs a .CMO file (Compiled Mesh Object), to load that, see this page, and specifically Chuck Walbourn's reply at the bottom. The DirectXTK library can load .cmo files, as can the DirectX Starter Kit.

 

There's documentation for the DirectXTK method here.

Edited by Ravyne

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this