Screenshot:
Click to Enlarge
And I also recorded a video in Fraps, which you can get Here (1.26MB), which shows the animation a lot better.
I'm happy now. There's still some things I need to change and implement.
- I have a funny feeling that model is mirrored about the X axis. I seem to recall it being right handed in game, and in the MD2 viewer I dowloaded. Should be a quick fix anyway.
- MD2 skins tend to be non-power-of-2 textures, which might cause a problem on low end cards, and also won't work with the texture manager because they're a) not a power of 2 and b) larger than 256x256.
- PCX textures don't save as valid PNG files. This might be a D3DX quirk, I don't know. The PNGs look fine in Paint Shop Pro, but they appear as a white image in Firefox and Window's viewer, and a beige image in Internet Explorer.
- I want to get real lighting working. All the normals are there on the model, and it's textured now so dynamic lighting seems like a logical next step.
- Specular lighting would be sexy, so would normal / bump mapping. I need to find a good bump map image to load though, but Google Images should suffice.
- I need to find a good skeletal animation file format to use, since I could do with supporting more model formats. I'm also going to look into creating my own model format with a convertor, which should be extremely fast to load (I.e. it'll have raw VB / IB data in it that I can memcpy(), and a reference to a texture file or set of textures to use for this model along with animation information, etc.
- I *might* support .X files, but I really don't like them. Beginners like to rely on them in their projects, until they realise the performance hit for calling DrawSubset for 4 subsets per mesh and 200 meshes... Still, I can probably coerce them into a reasonable format.
- I still need to pack vertex and index buffers together to reduce stream switches. I also need to profile my code with a few more meshes and UI elements / sprites to find out where the bottlenecks are fairly early on.
- Picking. I want picking. Picking is nice.
- I want to calculate bounding boxes and spheres, and add a virtual function to the Mesh base class to do ray-triangle collision detection.
- I need a proper camera class which will cull objects outside the frustim (Or more specifically, the scene graph will).
- I need to actually do scene graph stuff. At the moment, no sorting of objects is done at all. I need to sort 3D objects by type, so I can render E.g. landscape then meshes, then particles to reduce state changes.
- Particles. Everyone loves particles. They're sexy.
- And maybe BSP loading too, because that would be an awesome way to get a 3D demo up and running quickly.
So as you can see, I have pleanty to get on with. Hopefully a lot of that will be done either next week or during my week off. Although I have a bunch of things listed to do during my week off.
I'll also release an IOTD once I have my MD2 loading code looking good with lighting and specular / bump mapping.
But for now - bed. I'm knackered.
I always recomend Cal3D since it has good blended animation control and open source.
Nice work.