Wolfenstein: Enemy Territory

Custom Model Depot Yard

Quick tutorial of making player model using default mdx

Using the deafult mdx is a nice idea to save our time to make original animations. The default mdx holds more than 4500 frames. Cau you tolerate to make it all by yourself?

If you intend to use the deafault mdx as your mdm's bones and frames, you must create a biped figure which has the same bone strucure as the default has. The default biped is almost normal except having 5 fingers with 3 links, 1 toe with 1 link.




The default biped figure bone list:
Bip01 Pelvis
Bip01 Spine
Bip01 Spine1
Bip01 Spine2
Bip01 Spine3
Bip01 Neck
Bip01 Head
Bip01 L Clavicle
Bip01 L UpperArm
Bip01 L Forearm
Bip01 L Hand
Bip01 L Finger0
Bip01 L Finger01
Bip01 L Finger02
Bip01 L Finger1
Bip01 L Finger11
Bip01 L Finger12
Bip01 L Finger2
Bip01 L Finger21
Bip01 L Finger22
Bip01 L Finger3
Bip01 L Finger31
Bip01 L Finger32
Bip01 L Finger4
Bip01 L Finger41
Bip01 L Finger42
Bip01 R Clavicle
Bip01 R UpperArm
Bip01 R Forearm
Bip01 R Hand
Bip01 R Finger0
Bip01 R Finger01
Bip01 R Finger02
Bip01 R Finger1
Bip01 R Finger11
Bip01 R Finger12
Bip01 R Finger2
Bip01 R Finger21
Bip01 R Finger22
Bip01 R Finger3
Bip01 R Finger31
Bip01 R Finger32
Bip01 R Finger4
Bip01 R Finger41
Bip01 R Finger42
Bip01 L Thigh
Bip01 L Calf
Bip01 L Foot
Bip01 L Toe0
Bip01 R Thigh
Bip01 R Calf
Bip01 R Foot
Bip01 R Toe0

Total 53 bones

Note that if there is a bone which does not link to any vertex when exporting skl, the sklout plugin will ignore that bone. So to get the same bone structure from the default biped figure, you must assign 1 or more vertices at least to each bone.

1. Make the model with textured.


No special things about this work. Same as the standard low polygon modeling.
One thing you should take care of is that an object can use 1 texture because a mds vertex can only 1 uv coordinate. Otherwords, multi material can not be used. However you can use the shader script to player model for multi mapping or ambient and so on.

2. Create the default biped figure and physique your model.


See above about the default biped.

3. Export mds with one frame that model stands ease.

You can get a good tutorial about 2 and 3 process at http://www.mothermushroom.com/images/miscFiles/mdsExport.html.
Nice work pants :)
If you encounter some problems when exporting, my Trouble Shootings may help.

4. Convert this mds to mdm and mdx.

To do this, run the tool with MODE 3.

5. Replace the bone structure of the default mdx to one of the converted mdx.

To do this, set config to use the converted mdx as reference mdx and the default mdx as source mdx, then run the tool with Mode 5. Now your mdx has an original bone structure and the default mdx's animations. You can get the default mdx in animations/human/base/body.mdx by unpacking pak0.pk3.

6. Build up the folder structure to pack up.

Build tree such as:
[root]
 |
 |-[models]
 |  |-[players]
 |     |-[temperate]
 |        |-[yourmodel]
 |
 |-[characters]
 |  |-[temperate]
 |     |-[allied or axis]
 |
 |-[animations]
    |-[human]
       |-[base]

7. Put your mesh, textures, animation file into tree.

mdm, textures, other accesseries model in models/players/temperate/yourmodel/. Put the adjusted mdx in /animations/human/base/ and rename mdx such as body_yourmodel.mdx.

8. Make a anim file.

Open the text editor and write down like as the followings.
animgroup
{
	animfile "animations/human/base/body_yourmodel.mdx"
	{
		#include "animations/human/base/body.aninc"
	}
	animfile "animations/human/base/mortar.mdx"
	{
		#include "animations/human/base/mortar.aninc"
	}
	animfile "animations/human/base/akimbo.mdx"
	{
		#include "animations/human/base/akimbo.aninc"
	}
	animfile "animations/human/base/prone_pistol.mdx"
	{
		#include "animations/human/base/prone_pistol.aninc"
	}	
	animfile "animations/human/base/prone_rifle.mdx"
	{
		#include "animations/human/base/prone_rifle.aninc"
	}	
	animfile "animations/human/base/prone_dual_pistols.mdx"
	{
		#include "animations/human/base/prone_dual_pistols.aninc"
	}		
	animfile "animations/human/base/prone_mortar.mdx"
	{
		#include "animations/human/base/prone_mortar.aninc"
	}
	animfile "animations/human/base/binocs.mdx"
	{
		#include "animations/human/base/binocs.aninc"
	}
	animfile "animations/human/base/no_juice.mdx"
	{
		#include "animations/human/base/no_juice.aninc"
	}
	animfile "animations/human/base/swim.mdx"
	{
		#include "animations/human/base/swim.aninc"
	}
}
The red descriptions depend on what name you saved the mdx as. Save this text as human_base_yourmodel.anim and put it in /animations/.

9. Make a char file.

Open up the text editor, write down like as the followings.
characterDef
{
	skin			"class"

	mesh			"models/players/temperate/yourmodel/body.mdm"
	animationgroup		"animations/human_base_yourmodel.anim"
	animationscript		"animations/scripts/human_base.script"

	undressedCorpseModel	"models/players/temperate/yourmodel/body.mdm"
	undressedCorpseSkin	"naked.skin"

	hudhead			"models/players/hud/head.md3"
	hudheadanims		"animations/human/heads/base.anim"
	hudheadskin		"models/players/hud/team_class.skin"
}
Where class is soldier, medic, engineer, fieldops or cvops if you will replace the exisiting class model.
mesh refers where is the mdm for this model.
animationgroup refers where is the animation setting file for this model. We have made this file so we should set this path to refer it.
undressedCorpseSkin refers the skin file applied when uniform taken by covert ops.

Save this text as classname.char. classname depends on what class you want use this model for. Place this file at /characters/temperate/allied or axis/.

10. Put the skin files.

The skin files are required when models are wrapped. The skin file format is:
objectname,	path of an image file for this object wrapping
If you have u_body, u_lfthand, u_rthand, l_legs objects in your model and they are using the image files body.tga and legs.tga, the skin file should be the followings:
u_body,		"models/players/temperate/yourmodel/body.tga"
u_lfthand,	"models/players/temperate/yourmodel/body.tga"
u_rthand, 	"models/players/temperate/yourmodel/body.tga"
l_legs,		"models/players/temperate/yourmodel/legs.tga"
You can attach some accesseries such as helmet or backpack with adding lines into the skin file. The followings are quoted from Splash Damage http://www.splashdamage.com/files/docs/playermodels.html.
md3_beltr Attaches to tag tag_bright. 
md3_beltl Attaches to tag tag_bleft. 
md3_belt Attaches to tag tag_ubelt. 
md3_back Attaches to tag tag_back. 
md3_weapon Attaches to tag tag_weapon. 
md3_weapon2 Attaches to tag tag_weapon2. 

md3_hat Attaches to tag_mouth, gets removed when a headshot is given. 
md3_hat2 Attaches to tag tag_mouth. 
md3_hat3 Attaches to tag tag_mouth. 
The skin filename should be modelname_class.skin. e.g. model name is body.mdm and it is for medic, the skin filename should be body_medic.skin. Unlike player models, such as heads or accesseries requires the skin files but its name should be modelname.skin.

11. Finish!


Congraturations, you have made the player model with the default animations. To play with your model, just compress the 3 folders models, animations, characters into 1 zip file and rename its extension to pk3. Place it your etmain folder or mod folder to play with it.


Back to Top