Untitled Document

CREATING QUAKE III PLAYER MODELS IN MAYA

by Ben Lambert

I will shortly be moving this page after 6 years here, I understand it has been a popular link. Please let me know via e-mail if you would like to be sent a hard copy. It will re-appear online on my new website. I still am greatly involved in 3D and Maya do it would be great to know if people have found this useful

ben_lambert@tiscali.co.uk

This tutorial requires Maya 3.0 and the Maya>md3 export plugin, which can be found at www.quakerally.com. It assumes a basic knowledge of both Maya 3.0, (terms such as joints, blend shapes, mesh building, binding and texturing) and also Q3 (Quake 3) player modeling (terms such as tags, l_legs, u_torso, h_head, animation.cfg etc.).

The route described below is VERY similar to that of the other software packages used to export player models eg Milkshape and 3DS MAX, the only fiddly parts are in the exporting options. Forgive any errors when it comes to describing how player files work, I'm still a relative newbie compared to some of the great model builders out there! The mesh used in this tutorial is a horribly simple one that was made from a cube.

 

MODELING

1. Build the model however you like in Maya. Of course, make sure its a nice Polygonal mesh, keeping in mind the poly count and how it will move. Also, make it in a nice T-stance pose. For the purposes of what you need for a simple player model, make it in three seperate meshes, legs, body and head.

 

 

2. Rename the legs to l_legs, body and arms u_torso and head to h_head and make the tags (all this bit is standard stuff, really), position the tags as you desire.

3. Texture it up. I use the standard approach of 1-2 skins as .TGA's in Maya. Maya has some great texturing tools, so use them. I opt for planar mapping and then tidying up in the UV texture editor. Also, take a look at Maya 4.0's Texture painting tools, you can get some great results, and then export back to Maya 3.0.

4.Triangulate the meshes, delete the history if you want.

 

ANIMATION SETUP

1. Add the joints and IK, or any deformers you can think of you want to use, but make sure they are deformers. the vertcies will not bake if the objects are just rotated and translated, it needs to be stuff like joints / blend shapes/ clusters and stuff. You can make this part as simple or as detailed as you like, from a FK skeleton, to soft bodied expression-driven IK rigs. Look on Highend3d for some great character rigging tutorials.

 

2. Bind the mesh up smooth/rigid if you're using joints and get it ready to animate. At frame 0, make a nice T-stance for your character and key ALL the deformers acting on the mesh, this is useful if you need to tweak the bind pose. I find it a good idea to make a Layer called 'setup' in Maya, and assign all your nodes that can be animated to it. Then, just select 'select all in layer' and key everything.

3.MAKE SURE YOU BIND THE TAGS TOO! Bind tag_head to the head joint and tag_torso to body joint etc....

4.Once you are happy with the weghting/action of your character, you can start animating

ANIMATION

1. SET MAYA TO BE AT 30FPS IN THE SETTINGS....V.IMPORTANT

2.Write down all the anims you want to do on paper, obeying the Q3 anim.config you want to produce. It never hurts to pre-empt all your moves and how long they are.

 

3. The fun bit......Animate your moves!!! You can set flat keys on parts where the upper body doesn't move to make it cleaner to see what you'll need to export.

 

SAVE YOUR SCENE AS A BACKUP NOW

4. Once you are happy, do the following

a)Select the u_torso mesh

b) In Maya, go to edit>keys>bake simulation>[] Change the settings to 'selected','all keyable channels', 'driven channels' off, 'control points' on, 'shapes' off, time range to the FULL timeline you are animating (V.IMPORTANT), sample by 1, and all the other options on

c)Hit bake

 

Repeat the process for all the other meshes (including the tags!)

5.Next, delete ALL the deformers in the scene, you should have the animations working, as vertex keyframes (select a vertex and go to the graph editor to check for keys)So all that exists will be the meshes and tags, correctly named.

 

EXPORTING

1. Now, the cool part

2. Save this scene as all_parts.ma in case all heel breaks loose.

3. Delete everything but the head and all the tags, and save it as head_baked.ma (or whatever you like)

 

4. Do the same as above for the u_torso and l_legs, remember, keep all the tags in each scene, you should now have 3 seperate scenes, one for each body part (3 files...one called head_baked.ma, legs_baked.ma torso_baked.ma, each of these has just the mesh in question, and all the tags)

5. Open the head_baked.ma scene

6. Go to the MD3 export options......set the following

Stripofy >off

Model Type >Player

Release > off

Verbose > off

Scale > 1

Write config > No

Gender > whatever you like

Footsteps > whatever

Headoffset > 0,0,0

 

Remove any animations, by using 'Remove all'

 

7.Hit export, save it as 'head' (there will be three files, called head_head.md3, head_lower.md3, and head_upper.md3.)

8. Now, the fiddly bit, just repeat the above for the torso and legs scenes, but when it comes to the animations, you need to add the animations in that they will perform in the export options. Select 'Reset to default' so that in the export options box the list pops back in and then alter the anims by double clicking on them and changing them to what you animated to in your timeline! (remember when you save the md3, save torso as 'torso' and legs as 'legs')

 

 

Most importantly of all, for the TORSO in the options box, remove all the lines from walkcr onwards (including walkcr) so that the last animation in the white box listed is stand2, this means the lower body animations aren't exported to the upper md3 file. Likewise, for the L_LEGS, remove just the section from attack1 (inclusive ) up until stand2 (inclusive), so that the upper body animations aren't exported to the legs.md3 file

Finally, while altering these animation lines to fit what you have animated in Maya, I find it very useful to do the deaths as follows. You may need to alter some Maya keys, but it helps timing.

eg

death1 0 30

dead1 30 1

death2 31 30

dead2 61 1

death3 62 30

dead3 92 1

gesture 93 37

etc Sorry if I confuse here.....not to fit to my key values, but so that you have a totally seperate keyframe for the 'dead' state, and not just use the final animation of 'death'. (In essence, You will have 2 frames the same)

I do this as the default animation.cfg that is in the export options is a bit weird in that it uses the final frame of death1 for the dead1 state, for instance, whcih is a bit of a mess-up when it gets into Q3, the timing will be off in the config.

You may have to input the same config file a few times manually in the options box, but it makes everything much cleaner in the end!

9. Finally, re-open you full_body scene, with all the bakes anims in. Choose the same options as before in the md3 export box, but this time turn ON the write animtion.cfg file box option. Now export all these as 'temp'. This is just so that the animation config can be written by the exporter. You can even write it yourself in a text editor and save it, as long as it fits to what you exported for the legs and torso from Maya

AND, FINALLY

1. If all has worked OK, open your directory where its all saved to. You will see about 12 files (all .md3 format) Delete the following

head_upper.md3

head_lower.md3

torso_head.md3

torso_lower.md3

legs_head.md3

legs_upper.md3

and all the files preceeded with 'temp'

Now rename the following

head_head.md3 to head.md3

legs_lower.md3 to lower.md3

torso_upper.md3 to upper.md3

And do a similar deleting thing with the default_skin files. Open them up, too and set the correct paths for the textures.

eg

Check that the config matches what you animated in Maya (especially the end frame)

10. Now put all the md3's, the config file and the default skin files into a folder, and whack it into Quake 3, read on if you need to know how to do this.

 

I usually create a folder on the root of one of my drives, the structure being (in C:/ in this case)

C:/models/players/your_model_name/all_the files_here

Now you can just go to the players directory above and zip the files into the baseq3/pak0.pk3 file with the ' save full path ' tab on, or simply copy your_model_name folder into the unzipped baseq3/models/players folder if you are running in 'pure' mode (where it doesn't use the pk3 file to run)

Good luck!

If you don't see anything at all, it may be the character size, or it could be the skin files.

The only way I have found of bringing Quake 3 meshes in is by importing their md3's into Milkshape, then exporting them as .obj files. then , you can import the obj's into Maya. It works fine, but the md3's are always on frame 1 of the death scenes, so the characters are never in a nice, t_stance pose. Nevertheless, you can use these files to get your own characters the right size by comparing them. I use a Sarge model in Maya as an obj to get the correct floor level and height of my character.After you have baked all your motion, you can simply select your meshes and scale them , the vertex animation will update!

 

Please send any comments or questions to me, I'm still learning about this and any ways people could suggest making this process faster would be greatly appreciated. I'm aiming to submit Hillbilly soon, he will be my first Quake3 player model, all done in Maya 3.0 and 4.0, so keep your eyes peeled.

Ben

peoplesfactory.co.uk

Some pics of work in action