I've been making some slow improvements and changes to the player model, trying to give it a bit more character and make it a bit less clunky so I can start to look at more interesting animations.
He now has a more interesting, cat-like head which just emerged from some messing about in my model editor. Made it in isolation with no real plan for it, then decided to chop off his old head and import this one instead. I've also scaled down the hands and boots which were far too clunky on the previous model.
It's a bit of a fiddly process making modifications to a model that is already rigged and animated, but nothing the editor can't handle. Once I'd scaled down one hand, I removed the other hand, then mirrored the new hand across the X axis with the reference set to the origin, which placed the copy in the right place, then just had to go it and to Ctrl-N, Ctrl-W on each joining vertex to weld the vertices together. Similar for the boot. Then it was a case of running animations and checking what vertices needed weights assigning.
Having the facility to improve models gradually even after the rigging and animations are done is very important since it is much easier to work on an existing model that start a new one. I spent about two days on a new model this week which I ended up scrapping because it didn't work out well. I still maintain that writing Charm was a great idea rather than learning another model editor, since it has vastly increased my understanding of the modelling process.
I've started adding some support to Charm, the model editor, for setting colours on the faces, in lieu of a more sophisticated texture mapping system, but not quite ready to roll on that yet. I really do need to get into texture mapping functionality in Charm at some point though. Have a few ideas about how to handle it but noting set in stone yet.
I'm hoping now the model is a bit more agile I can start to look at some foot placement IK in the near future. Plan is to try to implement some three bone IK for the legs based on ray casts to the floor, and try to get the feet bones to clamp to the floor angle but not sure how well this is going to work out. Never done any IK before so a whole new area with all its own pitfalls and problems to discover, I'm sure, but after getting the rag doll stuff working, my confidence is at an unusual high.
Think I also need to start thinking about a proper third-person follow camera for the game. Some mechanics are hard to figure out until I have the camera in place, but this isn't a simple thing to get working well in a wide variety of level geometries so will probably need a lot of work.
[EDIT] Spent this morning finishing off the face painting stuff in Charm. Within the editor, you can define a palette for your model which is saved as part of the model file, then select faces and a colour and use the Paint button to set those faces to the palette index, so would be easy to change the palette colours to make alternative versions of a model for example.
Had to play around with the options a little, so that you can choose between no painting, palette painting or painting the influences of the current joint weights. The latter is a useful way to check your rigging, and was just a boolean yes or no before.
When the model is exported to the format I use in the game, the colours are read from the palette and baked directly into the vertices. Loading in game is just a binary read into memory reserved as a vertex buffer so just had to make a couple of small changes to the vertex declaration and the relevant shader and all was working.
Really not good enough to live with forever, but adds a bit of character and means I can put off texture mapping for a little bit longer, since that is going to involve some major work on Charm to add a whole new layer of functionality, projecting parts of the model onto a 2D texture view and supporting moving the vertices around with respect to this view. Need to look into the model unwrapping facilities that the D3DX library provides as well as a manual option.
If I can map between the model and a set of unwrapped texture coordinates, I may even be able to support live 3D painting on the model somehow. But a manual system for setting up texture coordinates will be required either way so will probably start on that before I try to get too clever.
[EDIT 2] Just a tiny change...
Thanks, as always, for stopping by.