Loading Meshes\Models in DirectX 11 using VS2012 and Win8 SDK

Started by
2 comments, last by BenS1 11 years, 3 months ago

Firstly, Happy New Year all smile.png

So, now that the DirectX SDK is now part of the Windows SDK and the Windows SDK doesn't include the Effects Framework, is there any support at all for loading models\meshes when using the latest version?

It seems strange that Visual studio 2012 can now load and display model files directly in the IDE, yet DirectX itself doesn't seem to offer any support for using the files.

I know that you can still get the Effects Framework to work with the latest version of the SDK, but I'd rather not use a deprecated library (Plus I wasn't really a fan of the Effects Framework anyway, but that's irrelevant). So, do I just have to dig out the file specifications for the model formats I want to support and right my own code to load them, or are there existing libraries out there that I could use?

Thanks in advance

Ben

Advertisement

The DirectX 11 SDK doesn't provide functions or anything to load 3D Models. So what you should do is write a loader for a interchangeable format like FBX using the FBX SDK or you can use ASSIMP library to load various formats but you still have to handle the loaded data yourself (storing it in buffers, etc).

Regarding the Effects Framework, I'm also not a big fan, so I wrote my own shader/effect framework, and in my opinion you should do the same... it'll pay off after it's done, because you can write it so it integrates perfectly with your engine which should result in a performance improvement.

Thanks TiagoCosta,

I'll take a look at ASSIMP, although having taken a quick look it seems like its a little heavyweight for my needs and isn't designed for performance. I guess that's because the 3D file formats are quite complex.

Ultimately all I really want is a simple way of getting a list of verticies (Containing Position and Texture UV info) and indices for each mesh. Once I have them then creating the Index and Vertex buffers in DirectX is simple.

I think I'll have a play with ASSIMP, and if it really is too heavyweight to integrate into my game then I can at least use it to create a utility that loads an FBX (Or whatever) file, extracts the vertex and index info and then writes it out into a much simpler binary format that my game can then read.

Thanks again, I think I have a way forward now.

Thanks

Ben

I've just taken a look through AssImp and it seems pretty good. I think it could be exactly what I need, thanks.

The only thing missing is that it doesn't seem to support FBX files, but I can probably do without them.

Thanks again

Ben

This topic is closed to new replies.

Advertisement