4
\$\begingroup\$

I want to load a mesh into my game (written in C#, if this matters) but am not sure what mesh format to use. What mesh formats are there, how easy/hard it is to load them into DirectX10 and what's the difference between those formats?

Or is it best to write my own mesh format?

\$\endgroup\$
4
\$\begingroup\$

Consider your own format only if you can articulate demands that are very unique to your scenario, and even then - (good) mesh formats are extensible and would probably suit your needs.

If you're developing in the MS universe there's DirectX's own .X format, which personally I think is very well designed. It supports animation, optional compression, and is highly flexible - you can define and register your own template and use whatever extra data you can't find in the presets. Since it's fully open, there's even some work on using it without DirectX. It's main shortcoming is the somewhat lacking MSDN documentation - but that's more than compensated by online content similar to the links.

Beyond that there's obj and stl which are portable but rather primitive (stl in particular), 3dstudio's 3ds and really, tons more. What the world needs is not another mesh format..

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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