Tuesday 25 September 2012

Make Simple Character Model Quickly ... 40 Days Later ...

It was time to start making some basic characters. This shouldn't take long ... and indeed MOST of it didn't ... but then some of it did ...

Magnets!? How do they -

I mean, mesh deformation ... how does it work!?

I had recently played through my Ye Olde FPS - demo of which is still available here at 168mb. I had noticed the quite poor deformation on the shoulder and joint areas of the characters - though admittedly this had been the first time that I had ever looked inside a 3D modeling application and proceeded to model, rig and animate a character ... and it had also been my last. Since then I had created a new bone armature - this time observing some proper Torque structure (bip etc) - and animated to what I considered to be a satisfactory level. My placeholder Ai player model strutted imperiously across the landscape.




She had awesome slippers but appalling vertex deformation ..


I'd rechecked various old bookmarks - many of which no longer existed - and even more that had moved about teh interwebz but could still be found. Particularly I was after the guy who had created Lara Croft in TombRaider Underworld and had posted on GarageGames ages ago. I did find the thread but he'd reorganized his gallery and the pics were missing. Back-tracing to his website I found what I was looking for, simple, clear tutorials on getting meshes to deform nicely.  Also I remembered that I'd previously seen a guy who had worked on Gun had plenty of good general modeling mini-tutorials ... if a rather unfortunate website name poopinmymouth.com.

So, armed with all of this information, I proceeded to knock up my first model. My current project is a turn-based, squad tactics with a steampunk vibe. There are 7 nations/factions and each one consists of a standard unarmoured solider, light armoured - which is the same as unarmoured but with an ethnic/national helmet, stealth armour - same as light armour but camouflaged (yay for setSkinName(%skin); ), and heavy armour which will be some steampowered mini-mech suit - the body will be the same for all nations/factions with the appropriate regime's unarmoured or light armoured head poking out .

So I started out with the unarmoured model of the British Royalists - all factions start with Nation and then Regime/Governance (eg: US Republic, Chinese Dynasty, etc). It's steampunk, they're British, it's got to be a red coat. Throw in flared trousers, big boots, a peaked dress cap and the manly facial hair of whopping sideburns and a big old moustache ... in ginger. And of course goggles ... steampunk has to have goggles ... or a monocle. Not wanting every nations soldiers to have the same type of eyewear I'm going to have to vary it somewhat, so the Royalists have their goggles loose about their necks ... but they still have goggles.

After a fair bit of initial faffing I was pretty pleased and tried the whole thing with my rig and animations and it looked like some sort of terrible mutation had been involved in some sort of scientific disaster ... on a train ... which had crashed off a bridge ... into a Dynamite factory ... More reading up rigging was required and watching copious amounts of video on youTube.

Previously I had assigned vertices to bones via simply grouping them at full strength, which had caused the poor deformation in my first models. Carefully painting the weights seemed like a better idea and slowly but surely garnered better results - as did rebuilding various parts of the mesh incessantly ...

To quote an obese, chain-smoking alcoholic:
Success consists of going from failure to failure without loss of enthusiasm.
 In the end I was either satisfied or beyond caring ... possibly both, and decided it was good enough.


Imperial Strut animation - in the ancient Blender 2.44 which I still use ...

The model is currently only sporting a simple diffuse map with ambient occlusion. Later I shall create the specular and normal maps, as well as add various details to the diffuse, though not too many as I don't see much point in having hugely detailed models or textures when the player is going to spend most of the time zoomed out on the battlefield.

And here it is in video - note, the rifle is currently a whopping bit of 2x4 that I'm using as a placeholder model.



Note: I use an older version of Blender 2.44, and 0.964 DTS exporter. I do use DAE/COLLADA at times, but not for characters. This is mainly down to the animation system changing in the 2.46 version of Blender, and me not wanting to spend aeons learning the new method.


And one final thing. Torque3D game engine is now available under the most permissive of all Open Source licenses MIT.