0
\$\begingroup\$

I wanted to know if there was a standard and efficient method to load meshes from a file into DirectX11. Currently, I'm loading .obj's by parsing them in and storing their information into a vertex buffer. This appears to be extremely slow especially when I have meshes with many vertices like the Stanford Dragon or other standard objects like the Mitsuba or Buddha.

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

The general approach for games is that models are created and edited in some 'source' format (like WaveFront OBJ, Autodesk FBX, etc.). The models are then "exported" to some format which is optimized for runtime usage, usually something specific to the game engine being used.

DirectX Tool Kit supports loading Models from VBO, CMO, and SDKMESH as example runtime formats. CMO files can be created by VS 2012+ directly from FBX, DAE, or OBJ files. SDKMESH files can be created from FBX files using the Samples Content Exporter. All three can be also be created from OBJ files using the meshconvert command-line tool in DirectXMesh.

See this wiki for more content file formats.

\$\endgroup\$

You must log in to answer this question.

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