Game Development Community

dev|Pro Game Development Curriculum

Franken-Adam

by Gareth Fouche · 09/20/2007 (3:26 pm) · 8 comments

Right ho, so I mentioned in my previous post that I'd been doing "other things" in the last month besides modelling a building. Well I have. Character modelling to be specific.

Before I go on I should probably mention I have never in my life done any character modelling before this. In fact this was the last big, intimidating hurdle for me. I wasn't sure if I could do it. I've modelled some static props but nothing....fleshy ;)

Right, so how does one start if one has never done any character modelling and has extremely limited time and money?

Simple, we cheat. :D

You've all met Adam :


garagegames.com/products/61/


Adam is a prebuilt model, built by a skilled artist, Spencer Boomhower. He is textured, rigged and animated. He has been fine tuned to have efficient polygon counts so that he runs well on older machines, while still looking as good as possible within those constraints. His animations look fluid and natural.

Speaking of animations, there is another bonus to using Adam. The Torque Motion pack includes a whole bunch of mo-cap animations ready to plug into his skeleton. Swimming animations, climbing animations, even wounded animations. Shweet.

But there is a problem. Adam is slightly...well he is slightly FPS-ish. You could break rocks on that jaw.

So the first goal is to modify adams base mesh, to make him slightly less superhuman looking. Down to a normal RPG "above average" musculature.

That was the easy part.

Ok, before I continue I will discuss the clothing system for Scars. It works kinda like Morrowind. Basically you can swap in and out clothing pieces and see the mesh pieces on your model. You've seen this as players, but how is it actually achieved?

Well, first you cut your model into parts. Arms, head, torso, etc. The you model each variation of each part. Naked, wearing cloth, wearing leater, wearing plate mail, etc. All on the same model, so he is one huge mishmash. Then you build code into your game engine to hide all meshes on the model except the ones you are interested in. (The Mesh Swapping resource)

Right, so thats what I set out to do. Which was great fun, because it involved breaking this well designed model and hoping I could put it back together in something resembling a decent fashion. Oh yes, and I'd need to figure out exactly how to operate the tools I was using. I, eherm, hadn't actually looked at things like Skin modifiers in 3DS max before....

So to start with I needed a base semi-naked model. I almost immediately decided Adams legs had to go. Moving the models vertices around made him a bit thinnner and whatnot, but the legs were designed to be baggy pants. I could shape them into vaguely leg-like shapes but they just looked odd, and wouldn't have bent at the knees properly. So I cut them off and built him some new ones :D.

I also got rid of his vest texture (not shown here), and changed his pants to shorts. I removed the military haircut. At this point I'm just getting the concept going, so horrible programmer art textures are used. Notice the ugly seams and blurriness.

i99.photobucket.com/albums/l300/nakedninja_2006/Progress_1.jpg
Then I broke him into parts. And learnt how to use the Skin modifier in Max. Because after breaking him up I need to redo it, for each body part, so that he would be able to animate. THAT was a learning experience. Especially since the seams where the pieces meet need to have matching vertex weights (how much the skeletons bones effect each vertex) or he "splits" at the seams when he moves.


Alright, now it is no point doing all this modelling work if I can't get the necessary code working to do the mesh swapping. Time to build some quick and dirty clothing parts, get the vertex weightings "good enough" and put it into the engine. Then I can write the code.

Behold :

i99.photobucket.com/albums/l300/nakedninja_2006/screenshot_140-00004.jpg
Ok, so he is doing his idle animation, so at least it's sorta working. You can see the splitting at his elbow that I talked about. However, he is wearing his ugly red "chest armor" I made for him. Time to get to the coding.

First I work out the database scheme. Basically, for a piece of armor, you can define an equipment mesh to show, a texture to use for that mesh, and body parts to hide (so for instance you hide his head when he is wearing a helmet).

Well, the body part hiding works :D

i99.photobucket.com/albums/l300/nakedninja_2006/screenshot_140-00003.jpg
As does the texture swapping :

i99.photobucket.com/albums/l300/nakedninja_2006/screenshot_140-00001.jpg
Ironically, the db stuff isn't difficult, nor is the code to swap the meshes, thanks to the resource. No, it is hooking up the code to the inventory interface, through the drag and drop icons that takes the most time. It's always the seemingly small things.

But I get it done. Behold again, the Ugly Green Hat.

i99.photobucket.com/albums/l300/nakedninja_2006/screenshot_142-00005.jpg

Right, so now that it is working, time to get serious with the art.

But first I cheat again. This time with the texturing. I need textures. I could take photos, tweak them etc to get what I want....or I could see what is out there for sale. Enter mmoworkshop.com and his content packs. Including...a clothing and armor texture pack :D

www.mmoworkshop.com/trac/mom/wiki/Store

One swipe of the credit card later and I'm sitting with a whole bunch of textures. But they are designed for his models which don't look like my models, so they still need a bit of doctoring. Now some people may want to complain "but art direction! You can't just use a bunch of generic textures!". Yes, I can. Look, chainmail is chainmail. I can't generate that as art, and I don't have chainmail on hand to photograph. If I don't like how his textures look I can modify them to look how I want a WHOLE lot easier than making them from scratch. Photoshop rules.

Alrighty, so I begin using those textures, cutting them up and applying them to the model, etc. I also begin working on facial hair. It works just like armor, a swappable mesh which can have different coloured textures applied to it (hair colour).

(As an aside, I tried to use transparency with hair textures, Torque doesn't like it, this is the result :

i99.photobucket.com/albums/l300/nakedninja_2006/screenshot_143-00001-1.jpg
So I gave up on that.)



Aaaand that brings us to today. I'm not done, not by a long shot. There are still plenty more meshes to do and I have to "skin" the clothing to make it animate properly. Some of the textures still have problems or seams. Some vertices will be shifted (some of my friends reckon the ankles are too thin,lol). And these are all first draft. I will probably go back later and add dirt, wear etc, make things less clean looking. I figure it is better to get everything working in a basic form before polishing and tweaking, etc. (And before anyone points it out I know the neck texture is wonky ;))

So here you go, the end product of the most of this and last month, in between all the frikken overtime (that City Watch HQ building model was actually me "taking a break" from working on the characters, I shift focus like that to keep myself from getting bored or burntout on one thing). Its taken a while, but

I'm getting quicker and more efficient as I learn :

i99.photobucket.com/albums/l300/nakedninja_2006/Model_1.jpg

i99.photobucket.com/albums/l300/nakedninja_2006/Model_2.jpg

i99.photobucket.com/albums/l300/nakedninja_2006/Model_3.jpg

i99.photobucket.com/albums/l300/nakedninja_2006/Model_4.jpg


Each head shows 1 beard and 1 hearstyle combo, as well as texture swapping.

i99.photobucket.com/albums/l300/nakedninja_2006/NewHeads_1.jpg
i99.photobucket.com/albums/l300/nakedninja_2006/NewHeads_2.jpg
i99.photobucket.com/albums/l300/nakedninja_2006/NewHeads_3.jpg
i99.photobucket.com/albums/l300/nakedninja_2006/NewHeads_4.jpg
i99.photobucket.com/albums/l300/nakedninja_2006/NewHeads_5.jpg
i99.photobucket.com/albums/l300/nakedninja_2006/NewHeads_6.jpg
i99.photobucket.com/albums/l300/nakedninja_2006/NewHeads_7.jpg
Thats right, finally a game which lets you play as a mulleted redneck!

You have no idea how painful those steel boots were to texture. I hate feet. People should have cubes at the end of their legs.

They will look even better once this site :

www.3d.sk/


stops playing silly buggers and accepts my credit card. Then I can have different facial textures, not just different hairstyles.


And, once I'm finished with this, it's the ladies' turn! Ava, I'm looking at you!

#1
09/20/2007 (10:06 pm)
Nice work, though the one thing that jumps out at me is the seam between his head/neck and the chest. If you can make that go away, he'll look very nice.
#2
09/21/2007 (12:05 am)
These are all WIP, and one of the things that still needs work is the neck. Definately.

Like I said, I'm waiting for my www.3d.sk/ membership to come through, so that I have access to hundreds of photo reference shots I can then turn into leg (and other parts of the body, like face/neck) textures.

Don't worry, it's in the pipeline. :)
#3
09/21/2007 (12:21 am)
Nice plan Gareth. I can definitely feel your pain coming through :)

So let me just see if I register what youre doing. Some of it is mesh swapping/hiding right? (hair for instance, or weapons).

Some of it is texture swapping (base/base+item etc).

Have you thought about texture compositing? (i.e. instead of replace base with base + item, you composite base + item on the fly). I'm pretty sure most earlier MMO's used this scheme to help keep the unique texture counts down (it basically ends up at one unique texture per character, plus N number of textures for N wearable items, but those can be loaded as required).

Anyway, Adam definitely looks more human in those shots, so well done! :)
#4
09/21/2007 (12:34 am)
Thanks Phil.

Actually, almost all of his gear (clothing) is mesh swapping, then with texture variations for that specific meshes texture. Weapons are mounted weapons from the medieval weapon pack.

So the skin texture is never touched. (I may modify this to paint tattoos and scars on later, using other resources, with dynamic compositing as you indicate).

Now, if you look at the mesh with the sleeveless jacket, that jacket is a mesh with it's own texture. Then you see the pic further down, with the same sleeveless jacket mesh but a new texture applied, one with a bit of wool? Same mesh, different texture, underlying human skin texture unaffected. You can see the same with the colour variations with the pants. So there is a skin texture plus 1 for each clothing part. It may prove to be inefficient, but we will see how it goes. I may end up putting all textures with a theme in one large texture (for example the platemail chest armor, pants, gauntlets, etc go into one "platemail" texture).

To keep the rendering down, each piece of clothing can define body parts it hides. So a full helmet will cause the head to be hidden etc.

I thought about doing texture painting on a set mesh ala Minions of Mirth but I don't like how the players silhoutte shape never changes.
#5
09/21/2007 (12:50 am)
Great progress as always Gareth, well done ;)
#6
09/21/2007 (7:30 am)
Yep, this is definitely the way to go. I've been experimenting a bit with similar things lately.

The reason we didn't do this in MoM was because it simply wasn't feasible with the time frame and amount of characters and cloth variations (there's literally hundreds of cloth and armor textures in the game!). The fact that the cloth textures in MoM had to fit several completely different models would too have made it extremely time consuming to use mesh changes. (we spent an awful lot of time just getting the damn helmet models to fit all the characters!)
#7
10/02/2009 (1:31 am)
I realize this is an old blog but hopefully you will reply to this. I'm trying to get some good info on this whole mesh hiding thing works for model setup. I'm still a bit of a noob at 3D modelling.

1) Is the base character all one cohesive model ie: are the arms attached to the torso or are the arms seperate and the geometry just pushed really close together to look like it's attached.

2) When you want a different look like say plate arms, are you hiding the default arms and showing a bulkier mesh that would look like arms with plate on them? Or are you keeping the base arms underneath (I'm assuming then the base character model is one cohesive thing then) and showing the plate mesh over top?

To me it looks like you are using a base cohesive model and then showing meshes over top.

3) How does this affect animating? You talk about skinning the meshes so they animate properly. I'm assuming this is used so the armor moves correctly with the player animations.

Any info or direction would be great, thanks.
#8
10/02/2009 (5:51 am)
Hi Travis. :)

1) Mesh parts are separate, just pushed really close together. Basically, the edges/vertices must match in position and be rigged with identical weights to the skeleton.

2) I hide the default arms and show "armoured arms" mesh. It is the same as with hair, there are multiple meshes per body piece and I use script to hide all the (for example) chest meshes and only show the "plate mail" chest mesh

3) You need to make sure the pieces are weighted similarly. The edges MUST match (same vertices/edges in the same position) and have the same weighting at those edges, so the seams aren't noticeable.

If you have any further questions, just ask :)