Model format for small game

  • Model format for small game DeadMG

    I'm writing my own small-time game from scratch, and now I'm looking to start creating models. I've been wondering- what is the best model format to use? Given that I will be writing the model loading code myself and using whatever program generates them. Ideally, I'd look for a format that has fairly wide support between modelling programs, so I can pick the one I like most to actually perform the building, and the format itself would be relatively simple to load, rather than having all of the latest features.

  • Since you've tagged DirectX, you could use .X meshes. You can then export 3D Studio Max models using the Panda Exporter (Found here:

    If you don't want to use the DX meshes for any reason, you could potentially use Lib3DS (Found at: Although it's not very well documented and you might end up pulling your hair out :) There is a tutorial on using it here:

    The advantage here is that you don't need to export your .3DS meshes.

    Of course if you want the format to be used in a wide variety of modelling programs, then you're probably going to need an exporter (Like Panda above). You could also use the .OBJ format which is a human readable file, so it's not too difficult to parse and write some loading code for it. I'm no expert in OBJ files, since the .X format has been suitable for my needs so far.

    Hope that helps.

  • I have used Value's SMD format for a while to good effect (there's an extremely bare bones loader checked in to the SlimDX repository; it's in C# but it should be easily translatable to C++). I picked it because it was straightforward to load and debug (since it's a text-based format), supported textures and skeletal animation, and was natively supported by the XSI Mod Tool.

    I used it as an interchange format which was eventually compiled down to a proprietary binary format.

    Although it seems like Valve has replaced SMD with DMX, which I don't know much about.

    .X is a reasonable choice as well -- although it's being phased out to a degree by the DX SDK, it's still possibly to load the files even in later versions of Direct3D (if you don't mind round-tripping through the 9 D3DX interfaces) and you can find exporters for just about every modeling tool out there.

    .obj is also common, but lacks animation support (if that matters).

    If you don't mind setting up a longer asset pipeline, and cannot find a combination of format + modelling tool + exporter that works for you, you might consider looking in to FBX or Collada. They're both interchange formats -- so you probably don't want to load them directly (Collada, in particular, is painfully verbose), but you may be able to construct an asset transformation pipeline using the tools associated with both formats to allow you to use the model format you want with the modelling tool you like best.

  • If you want to use non-animated models and want to write your own loader, I would recommend OBJ format. I have used it several times and it's simple and easy to load.

c++ directx models
Related questions and answers
  • I'm fairly new to game development, played around with xna before and just learning OpenGL & c now and I'm interested to know which c/c++ based model animation libraries are out there and which you would recommend? I don't have any particular model format in mind yet but probably a format that is supported by a free modelling tool like Blender.

  • I'm creating an FPS game. I'm writing my own game engine. So far all the backend stuff is going great. I'd like to support md2 as the native file format for 3D Objects, but I also want to use skeletal meshes. Does anyone know if the md2 file format supports skeletal meshes? In-case you need to know, I'm going to use blender as my Mesh creation tool and C++ as my programming language... Thanks For got to mention, the engine is based on OpenGL... Alright, for anyone who is reading this, I just found the Doom 3 md5 specifications ( It gives

  • The problem is that I'm trying to use my meshes with Bullet Physics for the collision part of my game. When I attempted doing this method with my GLM(model loading library by nate robins) model, I get a segmentation fault in the debug, so I figured that it doesnt like the coordinate variables of the model. If i use blender to export my model as a collision file, what type of file should I use? I have heard of a .bullet exporter, but i dont know hot to integrate this python script into my Blender 2.5 program.

  • Im writing a game for which, one of the models are loaded from an .obj file. It's a model of a plane, and I want to rotate the propeller. The object file is broken into groups, and the propeller is identified, so that's all good. I'm writing the game in C++ with OpenGl/GLFW The drawing function is: int win_width; int win_height; glfwGetWindowSize(&win_width, &win_height); float win... is a vector of objects and each object has a vector of faces. I'm sure that the vertices and faces are being loaded correctly, since the whole model renders correctly.

  • I'm looking for the most capable C++ model loading API. So far I've found tons of ply, obj, and other such file format loaders. But the libraries I've found tend to load just one model type, and this requires you to learn quite a few api interfaces? Is there One API To Load Them All, One API To Parse Them, One API To Bring Them All, And In the Vertex Buffer, Bind Them?

  • I'm rendering to a depth map in order to use it as a shader resource view, but when I sample the depth map in my shader, the red component has a value of 1 while all other channels have a value of 0. The Texture2D I use to create the DepthStencilView is bound with the D3D11_BIND_DEPTH_STENCIL | D3D11_BIND_SHADER_RESOURCE flags, the DepthStencilView has the DXGI_FORMAT_D32_FLOAT format, and the ShaderResourceView's format is D3D11_SRV_DIMENSION_TEXTURE2D. I'm setting the depth map render target, then i'm drawing my scene, and once that is done, I'm the back buffer render target and depth

  • I'm currently writing a 3D game in C++ with OpenGL and I'm coming to the part where to load 3D models in. Therefore I'm looking for popular file formats and techniques to display static meshs.... For simplicity I'd like to use a format (and technique) that allows both, namely static and animated meshs. So my question is if one format is suitable for that task and which one you'd suggest. And to clarify a bit: I don't need super-smooth animations or brandnew features. Sidenote: Because I'm a blender fan (but not an expert ;-)) it'd be helpful if it can be used with that -- but of course that shouldn't

  • I have created a model in Blender. Now i want to read that 3D model in my c++ program. I figured that a model can be exported to various file formats e.g. .obj, .3ds or COLLADA and then can be read... which I don't want to use in my program. And the remaining tutorials use md2 which is not supported by Blender. So can anyone guide me which file format to use for exporting 3D model and how to load that in my OpenGL program? Also how can I animate that model? Is it possible to add extra effects like tone mapping after it has been loaded in the c++ program using OpenGL? if yes then how? P.S. I am

  • , it is probably fairly difficult to change something like this in the model without having to reanimate it. So this led me to think about a custom model format. I know the basics of what is stored, verts/polygons/etc, but I am wondering if this is something I am right in thinking I probably need to do? If so, are there any good resources on developing a custom model format? Tutorials/samples/anything would...I am using Ogre for my rendering engine, and I planned on just using the .mesh format that is setup by default with Ogre. However, I recently purchased a large number of 3d assets from a company

Data information