You are on page 1of 68

Jonas Alletun Jensen

You may not copy this book in whole or in parts


without approval from the author.
Thank you.

2/68
Jonas Alletun Jensen

Introduction..........................................................................................................................................5
About the author...................................................................................................................................6
Chapter 1: Basic Photoshop functions .................................................................................................9
Layers.........................................................................................................................................10
Channels.....................................................................................................................................11
Toolbox ..........................................................................................................................................11
Marquee and Lasso tool .............................................................................................................11
Brush tool...................................................................................................................................12
Erase Tool ..................................................................................................................................13
Apply Image...................................................................................................................................13
Adjustments and adjustment layers................................................................................................13
Hue/Saturation ...........................................................................................................................13
Levels .........................................................................................................................................14
Why you shouldnt use filters. .......................................................................................................15
Finishing remarks on the basics of Photoshop...............................................................................15
Chapter 2: Advanced Photoshop functions........................................................................................16
Custom brushes ..........................................................................................................................16
Curves ........................................................................................................................................18
Chapter 3: Setting up the environment ..............................................................................................20
Unpacking ......................................................................................................................................20
Chapter 4: Text, Database and Texture files......................................................................................21
Files needed for making units in m2tw..........................................................................................21
EDU ...........................................................................................................................................21
ModelDB File ............................................................................................................................22
The .texture format & the .dds format ...........................................................................................25
Normal-maps..................................................................................................................................25
Chapter 5: Introduction to milkshape3D and investigating the .mesh/.ms3d files ............................27
Model tab .......................................................................................................................................28
Groups tab ......................................................................................................................................29
Auto Smooth Trick: ...................................................................................................................30
Materials tab...................................................................................................................................30
Joints Tab .......................................................................................................................................31
Useful Milkshape functions: Refresh Textures and Snap together.........................................32
Importing unit models from m2tw into milkshape ........................................................................33
Investigating a m2tw model...........................................................................................................33
Chapter 6: Basic modelling using Milkshape ....................................................................................35
Chapter 6a: How to model a new helmet.......................................................................................36
Chapter 7: Using 3dsmax instead of Milkshape ................................................................................40
About the plugin ............................................................................................................................40
How to install the plugin................................................................................................................41
Workflow with 3dsmax..................................................................................................................41
Chapter 8: UV-mapping, Texture Coordinate Editor and LithUnwrap 1.3 .......................................42
Texture Coordinate Editor .............................................................................................................42
LithUnwrap ....................................................................................................................................42
3dsmax and Unwrapping ...............................................................................................................45

3/68
Jonas Alletun Jensen

Chapter 9: Project Overview..............................................................................................................47


Modelling .......................................................................................................................................47
UV-Mapping ..................................................................................................................................50
Texturing and UV-mapping ...........................................................................................................52
Texturing the main armour ........................................................................................................53
Texturing the Skirt/legs..............................................................................................................55
Texturing the head .....................................................................................................................55
Finished product.............................................................................................................................56
Getting the paladin into the game ..................................................................................................56
Sprite creation ................................................................................................................................57
Finishing remarks...........................................................................................................................58
Chapter 10: Trouble Shooting / FAQ.................................................................................................60
What is vanilla?! I know youre not talking about vanilla, vanilla!...........................................60
Milkshape crashes when I try to hit Draw vertices with bone colors. Why? .............................60
My new unit has the jesus syndrome, what can I do about it? ...................................................60
How do I get units from Rome into Medieval2? ...........................................................................61
Why does my unit look like this? (Lots of blue circles) ................................................................61
How do I assign a face to multiple bones?.....................................................................................61
How do I get a unit from m2tw into milkshape? ...........................................................................61
My weapons are floating in mid-air! Why? ...................................................................................61
How do I add officers to a unit?.....................................................................................................61
How do I make my created unit available for recruitment through a build in the imperial
campaign? ......................................................................................................................................61
How do I mount an unmounted unit?.............................................................................................62
How do I get each faction to have unique generals and captains?.................................................63
Can I use 3dsmax instead of milkshape to edit units and animations? ..........................................65
Ive changed the skeleton, followed KEs guide, but the model looks weird in the game! Why? 65
My newly edited unit has a line down through it's face .............................................................65
My Unit is invisible! Why? And how do I fix it? ..........................................................................65
My unit "glows" / Very shiny white ..............................................................................................65
How do I edit animations? .............................................................................................................66
Help my unit looks like this (missing parts & jesus syndrome) ....................................................66
Can I change the strategy map models?.........................................................................................66
Can I use milkshape to change the strategy map models?.............................................................66
Eyecandy tutorial ...............................................................................................................................67
Strat map models................................................................................................................................67
References..........................................................................................................................................68
Special Thanks: ..................................................................................................................................68

4/68
Jonas Alletun Jensen

Introduction
In this book I will cover all the aspects and stages I go through in the creation of a completely new
unit, from the text and database work, to modelling and texturing. I will be focusing mostly on the
graphical side. Firstly well go through some basic information that will lay a good foundation for
the later chapters. Then well cover the text and database work needed for setting up the units. Then
well go through basic and advanced Photoshop functions so you can familiarize yourself with this
very powerful program. Well also cover how to use vanilla textures and how to create your own.
After that well go through the basics of the Milkshape interface and how to import an existing CA
(Creative Assembly) mesh, using GrumpyOldMans converter. Well also look on the basics of
modelling and UV-mapping. After all the basics have been laid down, and a strong foundation has
been made, Ill guide you through the entire process of creating a new unit. Ill show you how to
apply all the knowledge you acquired above into practice. Lastly Ill include a troubleshooting
guide that covers the solutions to all the most common questions asked in the TWC workshop. I
have also decided to include links to my earlier tutorials, which cover faction symbols, menus,
interfaces and strategy map models (using 3ds max).

As I mentioned earlier, this book will mainly focus on the graphical aspect of modding. I bet you
have seen many great units and works of art and would like to do similar work for your mod. Well
this book will only get you started along the right path. To become a great artist you must have
dedication and be willing to invest time to develop your skills. No one explain this better than
Andrew Loomis:
Impatience has probably been a bigger stumbling block in the way of real ability than anything
else. Doing anything well, Im sure, means hurdling obstacles of one kind or another most of the
way to the goal. Skill is the ability to overcome obstacles, the first of which is usually lack of
knowledge about the thing we wish to do. It is the same in anything we attempt. Skill is a result of
trying again and again applying our ability and proving our knowledge as we gain it. Let us get used
to throwing away the unsuccessful effort and doing the job over. Let us consider obstacles as
something to be expected in any endeavour; then they wont seem quite so insurmountable or so
defeating.

The drawing Guru Bob Kato states that another thing to remember when starting out doing art is to
Simply stop caring. It doesnt matter if one of your units or artworks doesnt work out exactly the

5/68
Jonas Alletun Jensen

way you wanted it to. Even if it might seem like a complete failure to you and a huge waste of time,
then just remember that you learned something during the creation process. Seen in that light, your
biggest failure could be your greatest success, since the goal of this book, and doing art for mods in
general, is not to create the perfect piece of art, but to develop your skills and to become the best
artist that you can be (I thinks thats an Elwell quote).

About the author


This book is brought to you by Jonas Alletun Jensen, member of the Wrath of the Norsemen and
Warhammer Total War team. Having roughly 3 years of graphics experience, but no formal art
education, all knowledge presented in this book have been acquired through experimentation,
practice and trial and error. Heres a small number of screenshots of units that the author has made
for various mods. All the knowledge required to create similar units is available in the coming
chapters.

6/68
Jonas Alletun Jensen

The above units are created by Alletun for


the mod Warhammer Total War

The above units are created by Alletun for the mod Wrath of the Norsemen

7/68
Jonas Alletun Jensen

8/68
Jonas Alletun Jensen

Chapter 1: Basic Photoshop functions


In this chapter Ill briefly go over the basic interface and functions of Photoshop. Throughout the
book, I will assume that the reader has at least this basic understanding of the program.

This is the basic interface of


Photoshop CS2. You might
notice that it looks a little
different from yours. Thats
because I have moved around
on the panels so only the
panels that I use most often is
on the board. Those panels
include the navigation panel,
the layers panel and the history
panel. I also use the brush
panel a lot, but it takes up too
much room, so Ive placed that Figure 1.1: The basic Photoshop interface
in the panel holder in the top right corner.

The two most important panels are the history and layers panel. Another important panel is the
brushtool panel and the channels panel; I will explain them in a short while.

Figure 1.2: History and Layers

9/68
Jonas Alletun Jensen

Layers
Layers are simply a number of images stacked on top of each other. It is one of the most powerful
features in Photoshop, and you should make good use of it. There are basically 3 different types of
layers, where we will be using two of them. These layers are:
Normal layers: the normal layers is where you usually put down your pixels.
Text layers: these layers are used to write text on and are automatically created when you
use the text tool. Should it be needed you can turn a text layer into a normal layer by
rasterizing it (LayerRasterizeLayer).
Adjustment layers: these layers are useful for manipulating the existing pixels on your
normal layers.

On figure 1.3 you can see the layers panel with one
normal layer, two text layers and one adjustment layer.
You can create a new normal layer by clicking on the
button in the lower right corner (blue circle), and you
can create a new adjustment layer by clicking on the
black-and-white symbol (green circle) and selecting the
layer you would like. In the upper left corner of the
layers panel you will see the Blending Modes (red
circle). These are different kinds of modes that you can
place your layer in, and they affect the way your layer
reacts with other layers. The most commonly used are Figure 1.3: Layers Panel
Overlay and Soft light, but I suggest that you play around with them and see how they work out
for yourself. Opacity (yellow circle) controls how visible a layer is.

Before we go on, I would like to make a comment on adjustment layers. When placing an
adjustment layer in the layers stack, it will affect all layers that lie underneath it. But what do you
do if you only what to manipulate one layer and leave the others? To do that go to
ImageAdjustments in the upper left corner of Photoshop and you can pick adjustments that will
only affect your selected layer or pixels. To learn more about adjustments and adjustment layers see
later in this chapter.

10/68
Jonas Alletun Jensen

Channels
Later in the modding process you will encounter Channels. Most
images in Photoshop are made up of 3 channels: R, G, B, which
stands for Red, Green and Blue. Photoshop uses channels to store
colour information about an image or to store selections. A special,
custom made, channel called an alpha-channel is going to be used to
specify what is going to be visible in game. Basically, if the alpha
channel is black, it will not show, and if it is white, it will. More on
that later.

Figure 1.4: Channels

Toolbox
On figure 1.5 you can see the Photoshop toolbox. I will go through the most used functions, but I
would encourage you to play around with them yourself.

Marquee and Lasso tool


In the top left corner (red circle) of the toolbox you can see the Marquee tool and
the Lasso tool. With these you can select parts of a layer. I will address each of
these tools in turn. With the marquee tool you can drag out a rectangle, circle or
a single row of pixels. When you have dragged out your selection, the pixels of
the highlighted layer within the area will be selected. The Lasso tool work pretty
much the same way as the marquee tool, but it give you a much greater level of
customizability. By holding down your left mouse button and dragging, you drag
out the outline of your selection. For this to be successful, your dragged selection
should stop close to where you started. If you want to select everything on a
layer except a small part, you can select that small part with the lasso or marquee
tool and invert the select (Ctrl + I).

Figure 1.5: Toolbox

11/68
Jonas Alletun Jensen

Brush tool
The brush tool is the tool in the toolbox that were
going to use the most. Photoshop has a number of
default brushes that comes with the program, but
you can also create your own (see chapter 2). In
the brushpanel youll see a list of the available
brushes. By sliding along the master diameter bar,
you can change the size of the brush (green circle,
figure 1.6). Another way to change the size of the
brush is to click to small arrow right of the brush
symbol in the upper left corner of photoshop
(remember to have the brush tool selected). In the
menu that pops up, you can change the size and
the hardness of the brush. With hardness is
meant how fussy the edge of the brush is. With a
hardness of 100% the edge of the brush is clear
and crisp, while at 0% the edge is very fuzzy
Figure 1.6: Brush list and brush diameter
(perfect for doing soft shadows). To the right of the pop-up menu youll find the opacity of the
brush. By sliding along the bar you can change the strength of the brush (figure 1.7).

Figure 1.7: Brush diameter, hardness and opacity

12/68
Jonas Alletun Jensen

Erase Tool
The erase tool (red box, figure 1.8) works pretty much the same way as the brush
tool, except that instead of painting stuff in, it removes it. You can change the size,
hardness and opacity just like with the brushtool. Figure 1.8:
Erase Tool

Apply Image
Another very useful function that I use a lot is the apply image
function. You use it by first making a new layer, and then you select
a part of your image with either the marquee tool or the lasso tool.
After that you go to image->apply image, and press ok in the
pop-up box. What this does is that it takes a snap-shot of the image
within the selecting and pasts it onto the layer. The tool is very Figure 1.9:Apply Image
handy when for instance you want to duplicate the texture for a hat. This hat is made up of 3 layers,
and instead of duplicating each layer, I can just apply the hat directly onto a layer.

Adjustments and adjustment layers


Earlier we briefly touched the subject adjustment layers (which had the ability to adjust all layers
beneath it in the layers stack) and adjusting individual layer. Two very important adjustments that
you can make are Hue/Saturation and Levels.

Hue/Saturation
To apply the Hue/Saturation
adjustment to a layer, go to Image
Adjustments Hue/Saturation (see
figure 1.10)

This function can be used for many


things (such as colouring), but the
main feature is its ability manipulate

Figure 1.10: Hue / Saturation


13/68
Jonas Alletun Jensen

saturation (Red A) and brightness (Blue B), see figure 1.11. If you slide right along the saturation
bar, the colours of your image or selection will become more vivid. If you slide left the colours
become more desaturated and dull. This feature is especially useful when your blending two images
together, or if you wish to change the mood of your image. Sliding along the Lightness bar alters
the overall brightness.

Figure 1.11: Hue / Saturation

Levels

The Lightness feature in Hue /


saturation alters the amount of light in
the entire image, but if you only want
to make the darker parts darker and the
lighter parts lighter, Levels is the
adjustment tool to use. You get to it
much like hue/saturation: Images
Adjustments Levels. The levels
menu will then pop up and on it youll
see a histogram. This histogram shows
you the amount of black and white Figure 1.12: Levels
values in your image. Every pixel in an image has a colour made up of a combination of the primary
colours red, green and blue (RGB). Each of these colours can have a brightness value ranging from
0 to 255. The brighter a pixel is the further to the right it comes. As you can see on figure 1.12 the
image Im performing levels on has most of its pixels in the darker end of the spectrum. To make

14/68
Jonas Alletun Jensen

the image darker we slide the black point to the right. To make it brighter we slide the white point
to the left. If we slide both the black and the white point, the image will get a higher contrast.

Why you shouldnt use filters.


Ok, so here comes a rant. Dont use filters! It doesnt take much skill to press a button and voila!
Youve got a super 1337 image! *NOT* Even for the rather untrained eye its easy to spot a filter.
Filters should only be used to assist you in achieving your end goal, nothing more. In figure 1.13
you can see which filters are useful, and which stinks (they are marked out with red). Play around
with them; its the best way to learn what they do.

Figure 1.13: Die Filters!

Finishing remarks on the basics of Photoshop


This has only scratched the surface of the functionality in Photoshop. For further reading go to:
www.good-tutorials.com
www.pixel2life.com

In the following chapter we will go more in-depth on the most useful tools.

15/68
Jonas Alletun Jensen

Chapter 2: Advanced Photoshop functions


Custom brushes
Earlier we briefly covered the basics of the brush tool, but we
barely even scratched the surface. Lets take a closer look at the
brush panel again (figure 2.1). Youll of course see a list of
brushes, but to the left theres a panel with different options that
you can apply to your brushes. These options will alter the way
your brush works in different ways. The seven upper most
options are the main options. These have the biggest impact. The
bottom five options are the secondary options, and they have
only a minor impact on your brush. Ill go through the different
options in turn. Figure 2.1: Brush Panel

On figure 2.2 I have taken a 36 pixel chalk brush and gone


into the Brush Tip Shape settings. The main feature here is
the spacing setting which determines the distance between
each brush. The default spacing is 5%. On figure 2.3 you can
see how to brush looks like on 100% spacing. The spacing
feature is very useful in combination with the texture
setting, which I will explain in a short while.

Figure 2.2: Brush Tip Shape Figure 2.3: Spacing


The Shape Dynamics setting (figure 2.4) are mostly interesting if youre in possession of a
graphical tablet. A tablet is a special pen that functions much like a combination between a pencil
and a mouse. If you set the control of the Size Jitter to Pen Pressure then the harder you press
with your tablet, the thicker the line will be. You can also apply pen pressure to the angle and the
roundness of the brush, but mostly the size is all we need. If you dont have a tablet, then the shape
dynamics dont really matter much, since then the adjustments happen on a random basis (of
course, if randomness is what your after).

16/68
Jonas Alletun Jensen

The scattering feature scatters each brush randomly as


you can see in the preview on figure 2.5. By moving the
scatter bar up and down, you can adjust how much the
brush is scattered around. The count indicates how many
individual brushes there is.

Figure 2.5: Scattering

Under Other Dynamics is another useful feature for the


tablet users. When the opacity jitter is set to pen
Figure 2.4: Shape Dynamics
pressure, your brush gets more strength the harder you press, just like with a real brush. If you
dont have a tablet and you put this feature on, the opacity will change on a random basis.

Combining the above settings with the


texture setting you can create so called
texture brushes. These are brushes that you
can use to apply texture with. They are
important if you wish to achieve
photorealism in your images. On figure 2.7
you can see a texture brush I have created
using the 36 chalkbrush as a base. First off I Figure 2.6: Textures
start setting the spacing to 15%, with a count on 1, to create some space between the brushes. After
that I went into Shape Dynamics and set the size, angle and roundness jitter on roughly 20~40 %
each. This will ensure that there is some randomness in the brush, thus giving a more natural feel.
Then I went into other dynamics and set the Opacity jitter to 15% pen pressure. Lastly I apply the
texture settings. This is the icing on the cake. With it you can add a bit of extra texture to your
brush. Depending on the base brush the textures are more or less visible. By pressing the small
down-ward arrow besides the square window you can pick a texture. A texture is just a normal
photo, it can be your private holiday photos or a close-up of a rock (the latter being the best of
course). The scale changes how big your texture is when it is applied to the brush. In figure 2.7 you

17/68
Jonas Alletun Jensen

can see the preview of what the brush is going to look like. Ive shown you here how to create very
simple texture brushes, but photoshops brush engine allows for much more detailed and
complicated brushes to be made. Again its only a matter of experimenting until you have a brush
you like.

Figure 2.7: The created texture brush


Curves
The curves adjustment can be applied by going to Image
Adjustments Curves. Just like levels, the curves can be used to
affect the tones in an image. Unlike levels however, which only
has black, white and midtone control, a tonal curve is controlled
using any number of custom anchor points. On figure 2.8 you can
see the curves interface. The diagonal line through the centre is the
tonal curve of how your image looks now and if you dont touch it,
it will leave the tones unchanged.

Figure 2.8: Curves with tonal curve

In figure 2.9 I have made two custom anchor points. I made them by clicking on the tonal curve
then dragging the point slightly upwards or downwards. What Ive done here is making the grey
tone at the red line slightly more black, bringing it down to the blue line. Similar for the top anchor
point where I made the tones slightly brighter.

Up top you can choose the different channels (see Channels


in chapter 1). When the RGB channel is selected you
manipulate all channels (Red, green, and blue). If you select
one of the colour channels you only manipulate values and
colours associated with this channel. This is very useful for
changing colours. Curves is an immensely powerful tool,
and I can go on and on talking about all the aspects about it.
But youre only going to learn of it use to by experimenting
with it. If youre curious and want more information there
are several good tutorials on the internet. Figure 2.9: Modified tonal curve

18/68
Jonas Alletun Jensen

19/68
Jonas Alletun Jensen

Chapter 3: Setting up the environment


Now that you have a basic understanding of Photoshop, we can dive into modding. But first we
must set up the environment.

Unpacking
To set up your environment so that you are ready for modding follow these steps.

1)
Unpack the files. Do this by using the unpack_all in the M2TW/data/tools folder.

2)
Make a new folder called "wrath of the Norsemen" (or whatever your mod is called) in your M2TW
root directory.

3)
Create a batch file. It's a .txt file (notepad), where I wrote "medieval2.exe @wrathnorsemen.cfg" in
it. After that i closed it and renamed Wrathnorsemen.txt to Wrathnorsemen.bat

4)
Create a .cfg file, open it with notepad and write the following:

[io]
file_first = true

[features]
mod = Wrath of the Norsemen

[log]
to = logs/system.log.txt
level = * error

[video]
movies = false

Name it wrathnorsemen.cfg

5)
Go into your "wrath of the Norsemen" folder and create a folder called "data".

You are now ready to begin modding. Of course a copy of Milkshape and Photoshop will also be
needed if you wish to become a unit maker.

20/68
Jonas Alletun Jensen

Chapter 4: Text, Database and Texture files


Files needed for making units in m2tw
To make a new unit in m2tw you first need a placeholder for your graphics within the game. You
need two text files to enable your unit for custom battle, and a third to make the unit available in the
grand campaign. The first 2 files are the Export_descr_unit.txt, called the EDU, and
battle_model.modelDB, called modelDB. The EDU file can be found in Medievals data folder, and
I suggest that you copy this file over to your mods data folder for future editing. The modelDB file
can be found in data/battle_models. The file you need to make your unit available in the campaign
in the EDB (Export_descr_buildings.txt).

EDU
The EDU contains information about all the units in the game. Information such as attack, defence,
which entry in the modelDB it uses etc.

The first two lines specify the name of the unit. Its not how it will look inside the game, but its the
units name as it will be referred to inside the game mechanics. The real name is given in the file
Export_units.txt found in the Data/text folder, more on that in the project overview. After that
comes the information about what kind of unit it is. This particular unit in figure 4.1 is an infantry
unit. Next up is the soldier line. Firstly this line tells the game from which unit, in the ModelDB
file, that the animations come from. Secondly, it also specifies how many men there are in the unit.
Thats 48 in this example. The next is how many extras thats attached to the unit, such as
elephants, artillery etc. Here its 0, because swordsmen dont use any extra equipment models of
course. You cant see it on this figure, but after the soldier line you can add an officer line that
can link to another unit. This unit will then be attached as an officer. Useful if youd like to have
musicians, standard-bearers and the like. The next many lines concern the stats of the unit such as
attack, health and defence. Marked with red are the armour_ug lines. It is here that you link the
modelDB file. The upgrades are ordered so the base model is to the left and then comes all the
upgrade models, separated by a comma. Each armour upgrade has its own entry in the ModelDB.
The last few lines concern the ownership of the unit. As you can see both England and the slaves
can have this unit, and they therefore both have an entry in the modelDB as you will see in the next

21/68
Jonas Alletun Jensen

section. The eras show that England cannot build the unit until the late and high era. So in a
custom battle the unit wont show up in the units list if the game is set to Early.

Well! That certainly was a lot of information. And weve only just briefly touched the most central
lines and parameters. Thankfully, CA has written a thorough explanation of all parameters in the
EDU at the beginning of the file.

Figure 4.1: Armored Swordsmen EDU entry

ModelDB File
Below in figure 4.2 you see the modelDB entry for the armored swordsman whos EDU you saw
above. The ModelDB file is rather large and hard to read if you dont download KnightErrants
formatted file:

http://www.twcenter.net/forums/downloads.php?do=file&id=1180

Even with this file, it will take quite some explanation for you to get familiar with the format. So
here goes:

22/68
Jonas Alletun Jensen

17 armored_swordsmen
The first line is the name of the unit and is the one that is written in the armor_ug line in the EDU.
This name is 17 characters big (including the _). This number is shown before the name. This
format is repeated throughout the file: first the length of the line, then the line itself. If the written
number is different from the amount of characters in a line then the game will crash at start up. This
is probably the most common error, so I can only encourage you to double check the amount of
characters in a line if you have edited in it.

1 3
62 unit_models/_Units/EN_Pplate_Plate/armored_swordsmen_lod0.mesh 121
62 unit_models/_Units/EN_Pplate_Plate/armored_swordsmen_lod1.mesh 1225
62 unit_models/_Units/EN_Pplate_Plate/armored_swordsmen_lod2.mesh 6400
The first line in the above code stats that a 1 character string is about to come. Things string (3)
tells the game how many model lines there are to come. In this example there are 3 model lines. If
we take a closer look at the first model line we see that it is 62 characters big, and that it points to a
.mesh file. The number 121 represents the distance at which the model is last shown. The game
takes the square-root of 121 (or whatever number there is) to calculate the distance. So here the
distance in meters is 11 ingame meters. Notice that the distance number is not counted with the 62
characters. When you zoom out in the game, it goes to the next model at a distance of 121 which
continues to be shown till a distance of 1225, and so on. The reason for this is that the game, like
many other games, uses a LoD system. LoD stands for Level of Detail: the lower the lod number
(lod0) the more faces, or polygons, the model contain. The reason for this system is to optimise the
performance. After a distance of 6400 the games does no longer show 3d models, but 2d
representations called Sprites. More on sprite-creation later in the project overview.

2
7 england
74 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_england.texture
73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture
49 unit_sprites/england_Armored_Swordsmen_sprite.spr
5 slave
73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_rebels.texture
73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture
47 unit_sprites/slave_Armored_Swordsmen_sprite.spr
The first number tells us that now comes two faction entries for the units main textures. The two
factions are England and the slaves (rebels). Each of these faction names, as always, have a number
in front of them with the length of the string. The texture entries consist of 3 lines:
1. The first line is the diffuse map, or simple the ordinary textures.

23/68
Jonas Alletun Jensen

2. Next up is the normal map.


3. Lastly is the link to the sprites.
2
7 england
60 unit_models/AttachmentSets/Final Heater_england_diff.texture
60 unit_models/AttachmentSets/Final Heater_england_norm.texture 0
5 slave
58 unit_models/AttachmentSets/Final Heater_slave_diff.texture
58 unit_models/AttachmentSets/Final Heater_slave_norm.texture 0
The next entries concern the attachmentsets. These are textures used mainly for weapons and
shields. The lines are built up pretty much the same way as the main texture entries, with a diffuse
and a normal map.
1
4 None
19 MTW2_Slow_Swordsman 0
2
18 MTW2_Sword_Primary
14 fs_test_shield 0
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
These are the animations used by the unit. They are probably the hardest part of the ModelDB to
read. The 4 none states that the unit doesnt now use a mount. Next up it says that he uses the
slow swordsman animationset and the fs_test_shield line says that he uses a shield animation for
his off hand.

Figure 4.2: Armored Swordsmen ModelDB entry

24/68
Jonas Alletun Jensen

The EDU and the ModelDB files create the backbone of unit creation in M2TW, but other files such
as the EDB (data/export_descr_buildings.txt), the export_units.txt and a few more are also used,
but are not essential.

For a more in-depth explanation I recommend that you read Musashis tutorial here:
http://www.totalwar.org/vb/showthread.php?t=75706

The .texture format & the .dds format


When you go into a folder in the _units directory youll see all the .mesh files and a folder called
Textures, with all the textures. The .texture format is not readable by any conventional program so
youll have to convert them to the .dds format. Alpaca has created a very nice tool for this. It can be
downloaded here:
http://www.twcenter.net/forums/downloads.php?do=file&id=1347

Theres a very nice ReadMe in the above file that will teach you how to use it. Once you have your
texture converted to the .dds youll need a dds plugin for photoshop. This plugin can be found here
(download at the bottom of the page):
http://developer.nvidia.com/object/photoshop_dds_plugins.html

You save your file as a .dds by going to save as and choosing the D3D/DDS format in the
dropdown menu. Then a pop up window will appear, here you must choose the format:
DXT5 ARGB 8bpp | interpolated alpha from the drop down menu.
Now you have a .dds file and you can convert it back to .texture using Alpacas tool.

Normal-maps
Normal maps are like bump maps they are used to add details to shading without using more
polygons. It is simple a way to make your 2d texture seem more 3d-ish. I wont go into any deep
explanation of how to use and make them, since Phoenix[illusion] on the totalwar.org forums have
already written a good tutorial: http://www.totalwar.org/vb/showthread.php?t=78388

25/68
Jonas Alletun Jensen

26/68
Jonas Alletun Jensen

Chapter 5: Introduction to milkshape3D and investigating the


.mesh/.ms3d files
Milkshape3D is the program that we will be using to edit the unit models. The reason why we will
use this program is:
Its cheap
Easy to learn and use
But most importantly: its the only program that we can use to manipulate the .ms3d files
that GoMs converter produces.

In the figure below (figure 5.1) you see Milkshapes main interface.

Figure 5.1: milkshapes interface


There are four viewports where you can view your model
from different angles. You can change the view by right
clicking in a viewport and choosing Projection. See figure
5.2. At the right side of the interface youll find the tabs
panel. There are four tabs to choose from: Model, Groups,
Materials and Joints. I will address each of these tabs in Figure 5.2: changing viewport

27/68
Jonas Alletun Jensen

turn.

Model tab
In the models tab youll find the tools needed for creating and
manipulating faces and vertices. A vertex is the points or dots
that make up a face. There goes 3 vertices to a make a face. Faces
have a front face and a backface. Its only the frontface that we
can put our textures on. As modellers it will be our job to make
sure there are no backfaces turning the wrong way on our unit,
since backfaces will be transparent in the game.

The first tool is the Select tool. If you click it you can set it to
select different things such as vertices, faces, groups or joints. If
Figure 5.3: Model tab
you have vertices selected you can select individual vertices, while if faces is selected youll select
all 3 vertices in your selected faces. A special feature with the face selection is the ability to select
all faces that uses a specific vertex by enabling the by vertex feature. The select joint function is
what you use when you want to select joints in your models skeleton. To use the select tool in the
3D viewport you need to hold down the Alt-button and drag, but the
selection only works when set to vertices (you can only select faces in
the 2d viewports).
Figure 5.4: Select tool

To the right of the select tool youll find the move tool. And it does exactly what the name
implies; its moves the selected vertices/faces/groups/joints.

With the rotate tool you can rotate your selection.

With the Scale tool you can make your selection bigger or
smaller. When you click the scale tool a display will appear below
the toolbox (see figure 5.5). In the three fields you can write in the
relative scaling along the X, Y and Z axis. Y is upwards and
downwards, X is to the left and right and Z is forward and Figure 5.5: Scale tool
backwards. In the figure you can see that I have decided to make my selection (I.e. the entire

28/68
Jonas Alletun Jensen

model) 10% taller, and 20% flatter. I have also entered it to be 10% wider along the x-axis but I
have click on the X symbol and therefore the value will be ignored and the X values stay the
same. I apply the scaling by hitting the Scale button.

With the vertex tool we can place new vertices.


You create them by clicking in one of your
viewports with the vertex tool selected. But it is only
possible to use the non-3d viewports (such as front,
left etc.). As mentioned earlier there go 3 vertices to
a face. To create a face from the vertices in figure 5.6
you click the face tool. Then you click on each
vertex in turn in a Counter-Clock-wise order. On the
figure I have marked in with numbers the order in Figure 5.6: Creating faces
which I have clicked vertices. By click on them in that order the front face will face your way. If
you did it clock-wise you would be seeing the back-face and the front face would be facing away
from you.

The rest of the tools in the toolbox are different object that you can create, such as a box or a
cylinder. Besides that you can also create more joints, but that wont be necessary unless youre
creating a completely new skeleton.

Groups tab
All faces can be put together in a number of groups. Usually the
m2tw models have several groups for the legs, arms, hands etc. If
you click on a group you can select the faces in this group by
pressing the Select button. You can also hide all faces in a group
by hitting the Hide button. By pressing the Delete button you
can delete a group.

To merge two or more groups you use the Regroup tool. For
example if you want to merge a head and a helmet group you select

Figure 5.7: Groups tab 29/68


Jonas Alletun Jensen

all faces in the two groups. Then you hit the regroup button and the two groups will be deleted to
create a new group at the bottom of the group stack. This group now contains all the selected faces.
When you do a regroup the new group will probably have the name Regroup01 or similar. To
give it a new name you write it into the text field next to the Rename button. When youve
written the name you hit the rename button and the name changes. You can change a groups
position in the group stack by clicking on the group and then pressing the up or down buttons.

All groups in an m2tw unit must have a comment, I will take a closer look at what this comment
should contain a little later. You can see and edit a groups comment by clicking the comment
button.

Auto Smooth Trick:


Unmark the auto smooth function to make your units look better in game. If you leave the auto
smoothing on, your units will tend to have an ugly line down through their faces.

Figure 5.8: Auto Smooth

Materials tab
In the materials tab you can apply textures to your model. Typically a m2tw unit comes with two
textures: a figure texture and an attachments texture. By clicking on one of the <none> buttons you
can apply a .dds texture. See chapter 4 for more information about the .dds and texture format.

Figure 5.9: Materials Tab

30/68
Jonas Alletun Jensen

Joints Tab
Joints are what a skeleton in milkshape is built up of. A typical m2tw skeleton is made up of 23
bones (that is when using GrumpyOldMans converter). The number of bone strings in a mesh file
is 26, but as a convenience for modelling, these are converted to composite bone names. On back
conversion using GrumpyOldMans converter, the correct bone strings are inserted into the .mesh
file. To find out what faces on a model is assigned to a specific bone, you click the bone from the
bone stack and then click the SelAssigned button. This will select
all the assigned faces to that bone. You can also find out if there are
faces that have not been assigned to any bones by clicking the
SellUnAssigned button.

If there are a number of faces that you would like to assign to a


different bone than what they are now, you can go back to the model
tab and select the faces with the select tool set to faces. Then back in
the joints tab you click your desired bone in the stack and hit the
Assign button.

By marking the Show Skeleton button the skeleton will be


visible. This feature is mostly relevant if youre altering the skeleton Figure 5.10: Joints Tab
or doing a new animation.

However, a feature that is very important is the


Draw vertices with bone colors. When you click
this on your model will most probably look like a
baby went crazy with a color palette. But there is a
sense to the chaos. Every bone has a color assigned to
it and when you click the feature on that color is
painted onto your model. You can thereby see which
faces are assigned to which bones. To the left in figure
5.11 you can see how the bone assignments for the

Figure 5.11: Bone assignments


armoured_swordsman looks like. When a face is a

31/68
Jonas Alletun Jensen

middle-thing between two colors (for instance the green-ish color between the pelvis bone (yellow)
and the abs bone (green)), that means that this face is assigned to two bones.

You can assign a face to multiple bones by using the weighting bars in the joints tab. When a face is
assigned to only one bone, this face will have weight of 100 to this bone. The face gets this
weight automatically when you hit the assign button (the one near the bone stack). What you do
to assign the face to multiple bones is that you choose two bones from the drop down lists. In figure
5.12 I have chosen the pelvis and the abs bones, and I have selected a face that lies between the abs
and pelvis. I then set the weight to 50 for each bone and hit the assign button (thats the assign
button in the lower right corner, not the one near bone stack). The selected face(s) now react half
way on both bones, making the animations look more fluid.

Figure 5.12: Assigning to multiple bones

Useful Milkshape functions: Refresh Textures and Snap together


Refresh Textures can be found at Edit Refresh Textures. The main function of this tool is of
course to refresh the textures. So if youve made some change to the .dds texture in photoshop,
youll have to hit this tool in order for the changes to be seen in Milkshape. Another good feature
about this tool is that it also refreshes the shading that is on the faces. So if your moving around
on some faces, and they dont change how grey they are in the flat shaded mode, you can hit
this button to refresh it.

32/68
Jonas Alletun Jensen

The Snap Together tool is used to move two or more vertices so they lie on top of each other.
This is useful since we cannot weld the vertices (turn two vertices into one). I often use it when I
need to merge two body groups that dont fit each other. The tool can be found at Vertex Snap
Together.

Importing unit models from m2tw into milkshape


So, how do you get a model from the game into Milkshape, like the armoured swordsman from the
previous examples? Thanks to community tools the answer is quite simple: you use
GrumpyOldMans converter. First you need to unpack your files, see chapter 3. You can download
GoMs converter here:

http://www.twcenter.net/forums/downloads.php?do=file&id=1276

The tool has 3 functions:


Converter .MESH to .MS3D this feature takes a CA mesh file and converts it to the
milkshape3D format.
Converter .MS3D to .MESH this feature takes a Milkshape file, perhaps one you have
edited, and converts it back to the .MESH format
Merge .MS3D This feature can merge two ms3d files (for instance a file with a unit model
where you have deleted the weapon, and a file where there is a weapon). You should use
this function instead of Milkshapes inbuilt merge function, since GoMs merge makes sure
that there are no duplicate materials and bones.

I wont go into too much detail about the specific use of this tool since zxiang1983 has made quite a
good tutorial that should teach you the basics:

http://www.twcenter.net/forums/downloads.php?do=file&id=1283

Investigating a m2tw model


As said earlier an m2tw unit has 23 bones. Every face in a unit must be assigned to a bone. To
prevent the unit from moving stiffly you should be very careful not to alter the bone assignments
that CA has made.

33/68
Jonas Alletun Jensen

In an m2tw unit all groups must have a comment in the format:


Class
Object Name
Transparency

For instance:
Body
Body01
0

In the above example I have made a comment for a fictional group called Body01. First I have
assigned the group to the Body class. This means that when every time the game puts together a
new unit it chooses one of the objects that belong to a class. For instance if a unit had 3 body groups
in milkshape all belonging to the Body class, the game would choose randomly between one of
the three each time it makes a unit. This is how the game makes all those different looks individual
units within a unitgroup. Each vanilla unit has a number of different groups for each body part.
E.g. there are often 3 to 4 different body groups, perhaps 3 leg groups etc. Each of these groups is
modelled in the exact same way, but their UV-maps are all placed on different parts of the texture
file. So while the 3 body meshes have the same shape, they will look different because of the
textures.

The 0 in the end says that there will always be at least one object of this class on a unit (for
instance bodies or heads). If it had said 1 then there was a possibility that an object of this class
would not be included on every unit (for instance knives, bags and other gadgets).

34/68
Jonas Alletun Jensen

Chapter 6: Basic modelling using Milkshape


The basic functions for modelling are in the Model tab as described above. In the following I'll take
you though the process of how to model a very basic battle hammer. Ill try to stick with basic
shapes (boxes, triangles, circles).

1) Start by making a box with the box tool.

2) Then a cylinder closed with a triangle strip is added.

3) Then I add yet another box in between the previous box and cylinder.

4) More boxes are added and manipulated with the move tool. You might have begun to notice that
Im creating many basic shapes and then manipulating them. Thats because the basic shapes are
very easy to work with, more so than having to place each vertex by hand and then create faces
between them.

35/68
Jonas Alletun Jensen

5) Lastly I do a long cylinder for the wooden handle.

6) I use the snap together tool on the top of the long cylinder to create a spike.

To create the hammer I didn't create any single faces (where I start with 3 vertices and then create
the face based on them). Thats because I try to use the basic shapes as much as I can. If I was doing
a more complex shape such as a head or a helmet I would have approached the modelling in a
different way.

If you want to see how to UV-map the hammer you can continue reading in chapter 7. If you would
like to learn more about modelling using milkshape you can read chapter 6a which will teach you
how to do a helmet from Rohan.

Chapter 6a: How to model a new helmet


When modelling more complex shapes I usually start with some concept art. This can be both
screenshots from games, photos from real life, drawings or paintings. In this case I will go for some
drawings I made. In a concept the subject (here a helmet) must be seen from a minimum of two

36/68
Jonas Alletun Jensen

sides, preferably from the front and side. Ive drawn the Rohan helmet from the front and the left
side.

As you can see there are lines going from the key points of the left
side view to the front side view. These key points can be the top
most point, bottom most point, the eye sockets etc. This way I
know the two views have the same proportions. After the concepts
have been drawn they are divided into two separate jpegs of the same size. Then I go into
Milkshape, right click in the front view port and find the picture of the helmet seen from the front
view. The image is too big though, so we need to scale it down to make it the same size as a m2tw
unit. 0.0015 is a good size for a helmet, while 0.035 is good for a whole units. Remember that the
scaling must be made with . not ,.

I do the same for the side viewport, keeping the scaling sizes the same.

37/68
Jonas Alletun Jensen

I then start placing vertices with the vertex tool. I start by first placing them in the left viewport. I
place the vertices on both sharp and soft edges. A sharp edge is for instance where the concept goes
from the helmet to the white background. A soft edge is where the helmet bends in a 3D sense.
For instance the cone shape of the top of the helmet. You can see how Ive placed the vertices on
the figure below.

You can see that the vertices are correctly placed in the side viewport, but are placed along the same
vertical line in the front viewport. So next up we need to place the vertices correctly in the front
viewport without disturbing their placement in the left viewport. You move the vertices with the
move tool. To make sure the vertices doesnt move up or down you can click on the Y button in
the left tool bar. This locks the vertices Y coordinate.

Using the select tool I select each vertex in turn and move them to their correct position in the front
viewport.

38/68
Jonas Alletun Jensen

As you can see, only the vertices on one side of the helmet has been placed creating a half-helmet. I
only create half a helmet to begin with because it makes it easier to make a symmetrical correct
helmet later in the process. With all the vertices placed where I want them I can begin to connect
them to create faces using the face tool.

Now the left side of the helmet is done. I then select the all the faces and duplicate this selection
(see the figure on the left). Then I mirror the new group created by the duplication, using the Left to
Right method (see the figure on the right).

39/68
Jonas Alletun Jensen

The only thing left to do is to merge the two halves. You do this by snapping the vertices
together (using the snap together tool). Weve just made a complete Rohan helmet. We did the
mirroring trick because it makes our modelling job fast, and its a lot easier to UV-map a model
when its symmetrical. On the figure below you can see the finished helmet.

Here you can see what the same model looks like after it has been textured. You dont need a
huge amount of polygons to make something look decent; rich textures are all you need.

Chapter 7: Using 3dsmax instead of Milkshape


Thanks to KnightErrant it is now possible to use 3dsmax in your workflow instead of milkshape.
For beginning modellers I would recommend using milkshape since it is easier to use and learn. But
if you really want to create unique and beautiful units I can warmly recommend 3dsmax. Its far, far
more complex than milkshape, and is therefore harder to learn, but it has a lot of great features. To
name a few: great UV-unwrapper, easy to edit meshes, lighting and a lot more. Only downside is
that its pretty expensive.

About the plugin


In order to use 3dsmax youll need to download a plugin created by KnightErrant. It can be
downloaded here:

40/68
Jonas Alletun Jensen

http://www.twcenter.net/forums/downloads.php?do=file&id=1745

It comes with a good readme that explains how to use it.

How to install the plugin


For 3dsmax you install the plugin by copying ms3dImportExport_ver1_1.ms
to the C:/3dsmax/scripts folder. Follow the readme if your using Gmax.

Workflow with 3dsmax


My workflow with milkshape & lithunwrap is very much like my workflow
with 3dsmax. The milkshape/lith workflow can be seen in the project overview.
The only noticeable difference is that 3dsmax is a lot more powerful and have
many more features than milkshape/lith. To use 3dsmax I do the following
(after I have installed the script):

1) Converter a .mesh file to .ms3d using GrumpyOldMans converter.


2) Open 3dsmax and click the hammer (1), then MaxScript (2), then run
script (3). See the figure to the right.
3) Navigate to the script and open it
4) Click on import and navigate to the ms3d file you converter with GoMs
converter.
Once youre done with your editing you export the unit using the export function in the script.

41/68
Jonas Alletun Jensen

Chapter 8: UV-mapping, Texture Coordinate Editor and


LithUnwrap 1.3
A UV-map is essentially a way to represent a 3-dimentional object on a 2-dimentional plane. The
plane is also what we will call the texture. A 3D object has the coordinate "X", "Y" and "Z", but a
texture uses the coordinates "U" and "V" (hence the name: UV-map). What we
need to do is to plot in the vertices of the model on the plane creating the UV-
maps. This procedure of plotting in the vertices is called unwrapping. There are
three program/methods you can use to do this: Milkshapes Texture Coordinate
Editor, LithUnwrap or 3dsmax. An example of a UV-map can be seen on the
figure to the right, where you see the UV and texture of a boot from a
swordsman.

Texture Coordinate Editor


Milkshapes mapping tool (called the "Texture Coordinate Editor") is
horrible to use. The only thing its good for is to move around on existing
maps. You can find it in the Window Texture Coordinate Editor (see
the figure to the right). To see the UV maps of a model you need to have
the faces selected (done by saying select group in the Groups tab), then open the TCE and select
the group the faces are in from the dropdown-menu. I would like to emphasize what I said 4 lines
above: The TCE is fine if all you need to do is move around on an existing map, or do really small
changes to the UV-map, dont use LithUnwrap for that!

LithUnwrap
If you need to create new UV-maps, but dont have access to expensive programs like 3dsmax,
LithUnwrap 1.3 is a wonderful, and free, alternative. There are also other programs, but most of
them cost money. However if you have 3dsmax I suggest using that since its easier to use (thanks
to KnightErrant). You can download LithUnwrap here:

http://files.seriouszone.com/download.php?fileid=198

To begin with, we open up our model by going File Model Open, then navigation to the battle
hammer ms3d file (or whatever file it is that you are going to UnWrap).

42/68
Jonas Alletun Jensen

On the right hand side of the interface you can expand the groups node to see the different groups in
your model. Here I have each part of the hammer.

Select one of your groups by right clicking on it and choosing the "select" button.

Then go to the menu Tools -> UV Mapping.

43/68
Jonas Alletun Jensen

Here you can see the different types of unwrapping methods available to you. Each kind of method
is good to unwrap certain kinds of objects. Have a look later in the Project Overview chapter to see
how I use different methods. For the main part of the hammer I choose the "box" method because
the model is a box, obviously.

To move around with the new UV-map so it doesnt take up all the texture you can go to "Edit" and
choose to move it around, scale it up or down etc.

On the below figure you can see the finished UV-map. To finish your work with lithUnwrap you
save it as battle_hammer.ms3d and open it up with milkshape again. Now you only need to texture
it.

44/68
Jonas Alletun Jensen

3dsmax and Unwrapping


Im not going to spend a lot of space writing a tutorial for 3dsmax since there are many, many good
tutorials on the internet. Here is a really well written one:
http://www.waylon-art.com/uvw_tutorial/uvwtut_01.html
I just want to say this again: if you have 3dsmax you should use that instead of lithunwrap.

45/68
Jonas Alletun Jensen

46/68
Jonas Alletun Jensen

Chapter 9: Project Overview


For this project overview Im going to show you how to create something rather complicated: A
paladin from the Warhammer universe. Unfortunately I wont have the polycount needed to make it
look exactly the way I want it (the maximum amount of polys is around 6000). Therefore I will
show you have to get the maximum potential out of your textures.

To make things easy on myself, Im going to start out with an existing m2tw unit that can be used
as a base model. After a quick browse through the custom battle menu I arrive at the "noble
swordsmen" as being the unit that most closely resembles what I want to make. Many adjustments
will have to be made to the model before textures can be added. And usually thats a good way to
go: First you do the model and then you move on to the textures. In order to do that successfully
you need to have a fairly clear image in your head of how you want your unit to look like. I looked
through the Warhammer Online website to gather some good reference material:

Figure 9.1: Concepts for the paladin

Modelling
From the reference its already easy to see that a large amount of details will have to be omitted
(e.g. those metal flaps, the hammer symbol, the chains etc.). After I've gather all the references
and I know in which direction to go, I fire up the noble_swordsmen model in milkshape:

47/68
Jonas Alletun Jensen

Figure 9.2: Noble_swordsman model

Obviously I need to delete the helmet and put in a real head. I also need to delete the sword and
shield and model one or more battle hammers (hey! Thats what we did in the last chapter!). Lastly
he needs more armour around his shoulders and neck, and his legs needs to be more covered.

I'll start by giving him a new head. I open up the town_militia_lod0 model, because he's go the kind
of head I want. Then all groups except one head are deleted and the file is saved as head.ms3d.

Figure 9.3: Isolating a head


Using the same procedure I delete all the helmet groups from the noble_swordsmen file.

GoM's converter is then used to merge the two ms3d files. First you load the noble_swordsmen
model then the head model. The file is saved as "Paladin_cur1_merge.msd". The file name is a
system I have to keep track on all the stages of a unit production. Cur1 stands for "Current 1" so the
model file with the highest cur-number is the newest. The "_merge" bit states in what stage of the
production the file is at. It's a useful system if you want to go back and change something at an
earlier stage. On figure 9.4 you can see what the new model looks like:

48/68
Jonas Alletun Jensen

Figure 9.4: Armoured body with peasant head


Now that the heads in (it still needs a little work but that will come later), it's time to move on to the
armour. To make the neck-piece Im going to make a simple cylinder using the cylinder tool under
the "model" tab.

Figure 9.5: Neck armour


Next up I take a look at the shoulder armour. Because there is a limit to how many faces each unit
can have (performance reasons) I will have to go for a simple solution. In figure 9.6 you can see
what I've modelled. It's made up of simple planes and boxes, pieced together using the "snap
together" tool (see chapter 5).

Figure 9.6: Shoulder armour model


I now save the file in a new version called "paladin_cur2_modeling.ms3d"

With the armour and head done I move onto the legs. Instead of the current legs I need for them to
be almost completely covered by a dress. I took another browse through the custom battle menu and

49/68
Jonas Alletun Jensen

decided that the Dismounted Latikons had the kind of legs I wanted. Using the same technique as
with the heads I merged the paladin body (minus noble_swordsman legs) with the latikon model
(now only containing legs). Here a problem arises: the paladins body does not fit the new legs.
So I need to push the vertices around and try and integrate the new legs. I use a combination of the
scale, move and snap-together tools. So far this is what the paladin looks like:

Figure 9.7: Paladin model


The model is almost done. Now comes all the small details. I go over the model and fix small things
such as to remove the armour piece by the elbows and correct the hairline (so he can be bald). See
figure 9.8.

Figure 9.8: Removing hairline


UV-Mapping
Now that we have a model we can begin to unwrap the parts that need it. Some of the parts, such as
the torso and arms are fine, so we'll just keep the vanilla UV-maps for them. The things I modelled
myself Ill have to UV-map, but besides them Im also going to UV-map the legs and the head.
While im mapping all the elements out, Im also going to be concerned about the amount of space
each map takes up so each texture get an appropriate size.

50/68
Jonas Alletun Jensen

I start by opening up lithunwrap and loading the paladin ms3d model. Again I would like to stress
this point: only use lithunwrap if you want to create or change UV-maps (like I want to do here),
else just use the TCE. After loading the model I then reorder the existing uv-maps. The neck-guard
is unwrapped using the "cylindrical" method set to y. I choose this method because the neckpiece
is in fact a cylinder along the y-axis. I use the same technique on the legs. The head can be seen as a
ball so I use the spherical method to unwrap it. The shoulder pads are a more complex shape so I
use the Box method to handle it. So can see how my UV-maps look like on figure 9.9. Since my
paladin only has one variety I made plenty of room for my textures. For more ordinary units (with
many varieties) the uvmaps must be smaller and more economically placed.

Figure 9.9: UV-maps and methods

On figure 9.10 I have applied a checker material to my model so


you can see how my UV-map is mapped. As you can see there

Figure 9.10: Checker material 51/68


Jonas Alletun Jensen

are no stretching rectangles so I can therefore safely begin to apply textures. I save the file as
Paladin_cur5_UVmaps.ms3d and open it up in milkshape.

There is one problem using lithunwrap as the primary unwrapper: if a face is assigned to multiple
bones then those assignments are replaced by full weighting to only one bone. This can make the
animations look "stiff". So to fix this I set the selection tool to "faces" and begin to correct the
assignments by hand. This is boring and tedious work, but it will pay off when we begin testing the
unit in game. Another problem when porting between milkshape and LithUnwrap is that the
comments are lost. But they can be easily restored. You might think now that those are a lot of
problems just to get some UV-maps. But without good UV-maps even the best texture will look
weird and stretched. So you will be happy for the time you invested in this stage of production
when you reach the later stages.

Texturing and UV-mapping


And now for the fun part: texturing. To make sure we have
the alpha channel and the resolution that is needed, its a
good idea to open up an existing vanilla texture and filling it
in with black. Then we want to get the UV-maps from the
model over to photoshop. For that we use KnightErrants
WriteUVMaps2DDS tool. What this python tool does is that
it writes the UV-maps down to a DDS file which can be
opened with photoshop. You can download the tool here:
Figure 9.11: Transferred UVmap
http://www.twcenter.net/forums/downloads.php?do=file&id=1888

Here are the instructions from KnightErrant:


A Python utility for extracting uv maps from a Milkshape .ms3d binary file and writing them as
pixel images in the .dds format. After unzipping the Python file WriteUVMaps2DDS.py, run it by
double-clicking it in Explorer.
A FileChooser will pop up and you select the .ms3d file from it. It creates two .dds files, one with
_figure appended to the file name for uv maps with material ID 0, and one with _attachments
appended to the file name for uv maps with material ID 1. This is NOT the compressed dxt5 format
so remember to open them with Photoshop and then save them to the dxt5 format. (note: you can
also just copy the entire layer (using the marquee tool and ctrl+c) over an existing vanilla texture).

52/68
Jonas Alletun Jensen

Texturing the main armour


In the following I will go though in detail how I paint armour. Armour, and metal in general, is one
of the hardest things to make look believable, because of its special way of reflecting light.
Therefore I prefer doing it in grayscale to begin with and then add colors later. It helps me to focus
on the values instead of the colors, which can sometimes be a distraction. To this I use nothing but
the brush tool. You can see the process on the following page. Take your time when doing this; I
used about 1 hours on this piece of armour.

53/68
Jonas Alletun Jensen

54/68
Jonas Alletun Jensen

Texturing the Skirt/legs


To add more substance and photorealism to the skirt I used real photos. Photos are an
excellent way of adding texture to fabrics such as wool, leather, wood and other very
flat and dull surfaces. I used this texture from www.mayang.com:
http://www.mayang.com/textures/perl/fullsize.pl?image=woolen_fabric_9271298.JPG

To get them integrated I used the curves to lower their brightness and a layer filled with
dark red set to the blending mode color. I then pasted in some vanilla chainmail. I
also painted in a yellow border with the brush tool. So far the skirt looks like on the
picture to the right.

Figure 9.12: Closeup of texture


From here one its all about adding details. The concepts in the start of this chapter are a great help
for this.

Texturing the head


As you see on the finished product I have also made a completely new head (texture-wise). At this
point I cant show you how to make that exact head, because Im making it exclusively for WotN
and Warhammer Total War. When those mods are released I will update this section with a detailed
head tutorial. However, at this point I can only go through the overall process.

Doing a head (and any other texture) is a lot like doing the above armour. You start with a base
color (preferably a darker color) and then build everything up from there. For a head the base color
is usually a red-ish brown color:

Figure 9.12: Head base color

55/68
Jonas Alletun Jensen

Then from there I start building up the contours of the face. To make the face as photo real as
possible I use a combination of photos and the brush tool to add in the main features like the ears,
eyes and mouth. To find the best photos I use:
www.sxc.hu
www.google.com
To merge the photos together I also use the curves tool.

Finished product
This is what the finished paladin looks like:

I can now use GoMs converter and the .dds to .texture converter to convert the files.

Getting the paladin into the game


To get the unit into the game I use the below EDU entry. Ive made no balance adjustments as its
just the armoured swordsman entry with a new name.
type Paladins
dictionary Paladins ; Paladins
category infantry
class heavy
voice_type Heavy
banner faction main_infantry
banner holy crusade
soldier Paladins, 16, 0, 1.2

56/68
Jonas Alletun Jensen

attributes sea_faring, hide_forest, hardy, can_withdraw


formation 1.2, 1.2, 2.4, 2.4, 3, square
stat_health 1, 0
stat_pri 22, 4, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
;stat_pri_ex 0, 0, 0
stat_pri_attr no
stat_sec 0, 0, no, 0, 0, no, melee_simple, blunt, none, 25, 1
;stat_sec_ex 0, 0, 0
stat_sec_attr no
stat_pri_armour 8, 8, 6, metal
;stat_armour_ex 8, 9, 0, 0, 8, 6, 6, metal
stat_sec_armour 0, 0, flesh
stat_heat 6
stat_ground 1, -2, 3, 2
stat_mental 9, normal, highly_trained
stat_charge_dist 30
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 610, 175, 90, 70, 610, 4, 150
armour_ug_levels 0
armour_ug_models Paladins
ownership france
era 2 france
;unit_info 13, 0, 22

This is the modelDB entry:


8 Paladins
1 3
51 unit_models/_Units/order_paladin/paladins_lod0.mesh 121
51 unit_models/_Units/order_paladin/paladins_lod0.mesh 1225
51 unit_models/_Units/order_paladin/paladins_lod0.mesh 6400
1
6 france
59 unit_models/_Units/order_paladin/textures/paladin_2.texture
64 unit_models/_Units/order_paladin/textures/Paladin_Normal.texture
48 unit_sprites/scotland_Noble_Swordsmen_sprite.spr
1
6 france
53 unit_models/AttachmentSets/final Paladin_diff.texture
53 unit_models/AttachmentSets/final Paladin_norm.texture 0
1
4 None
14 MTW2_Slow_Mace 0
2
17 MTW2_Mace_Primary
14 fs_test_shield 0
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002

As you can see I have given the paladins the noble swordsmen sprites. That wont do so Ill have to
make some new sprites.

Sprite creation
To create sprites do like this:

57/68
Jonas Alletun Jensen

1) Make a folder called Export in your M2TW directory. In this folder make another folder
called unit_sprites.
2) Then go back to your M2TW directory and create a .txt file sprite_script.txt.
3) In this file you write paladins (the name of the unit in the modelDB)
4) Go into your mods .cfg file (here mine is called warhammer.cfg) and add the lines:
[misc]
bypass_sprite_script = 1
5) Run your mod and the sprites will be created. Convert the files from .tga to .dds, and then
from .dds to .texture.
6) Place the sprite textures in your mods data/unit_sprites/ folder.
7) Change the sprite entry in the ModelDB to 39 unit_sprites/france_paladins_sprite.spr.
The paladins now have sprites.

For more information go to Calibans topic:


http://www.twcenter.net/forums/showthread.php?t=97254

Finishing remarks
All in all I used about two days on making the paladin and a total of 14 cur stages.

58/68
Jonas Alletun Jensen

59/68
Jonas Alletun Jensen

Chapter 10: Trouble Shooting / FAQ


In this part Ill come with an answer to most of the questions asked most frequently in the model
workshop on TWC. If you cant find the answer to your problem here please dont hesitate to ask
me via PM (my username is Alletun on both TWC and the Org), e-mail
(Alletun_dk@hotmail.com) or in the TWC workshop which I check regularly.

What is vanilla?! I know youre not talking about vanilla, vanilla!


Vanilla is the term used about the unedited files from CA (Creative Assembly). So if youre playing
vanilla m2tw it means that the game is unmodded. Also if youre using a vanilla mesh it means
that youre using an unedited model. Likewise with vanilla textures, and so on.

Milkshape crashes when I try to hit Draw vertices with bone colors. Why?
Oh bugger! This means that one of more of the faces in your model has something wrong with their
bone assignments. And I mean totally wrong. Only way Ive found to fix this is: Select all faces and
assign them to the pelvis bone and then recreate the assignments by hand.

My new unit has the jesus syndrome, what can I do about it?
The Jesus-syndrome is when your units stand like this:

(Thanks to Kungfuserge for the picture)

Go through these steps to thoroughly check your unit and correct the mistake:
1) One or more of your groups has no comments. Write them following the format stated in chapter
5.

2) Your bone assignments are wrong (e.g. all faces are assigned to a single bone). If youre unsure
of how good bone assignment look like I recommend that you opening up a different vanilla model
(you can see the assignments by click on "draw vertices with bone colors" in the joints tab).
You can correct bone assignment by using the select tool set to "faces" to select parts of your model
and then go to the joints tab, click a bone and assign the selected faces to that bone. Theres a more
detailed explanation in chapter 5.

3) All faces must have a bone assignment to them. Use to "select unassigned" function under the
joints tab to see if there are any faces without assignments. This is probably the most common cause
for the Jesus syndrome.

60/68
Jonas Alletun Jensen

How do I get units from Rome into Medieval2?


Simple: you use GrumpyOldMans converter. It takes a model from a rome .Cas file and sticks it on
a m2tw skeleton. In the first link below you can download the Casm2tw converter, and in the
second link you can download the documentation that should contain all the information you need.
http://www.twcenter.net/forums/downloads.php?do=file&id=1321

http://www.twcenter.net/forums/downloads.php?do=file&id=1322

A different approach:
If you have 3dsmax you could also import a .cas file using this importer script:
http://www.twcenter.net/forums/downloads.php?do=file&id=141
Then export it to .ms3d format using KnightErrants script.

Why does my unit look like this? (Lots of blue circles)


The blue circle you can see on the below figure is the joints of the skeleton. Go to File
Preferences and change the joint size to 0.025 (thats a . not a ,). To switch the skeleton off go to
the joints tab and unmark show skeleton.

How do I assign a face to multiple bones?


See chapter 5.

How do I get a unit from m2tw into milkshape?


See chapter 5.

My weapons are floating in mid-air! Why?


I dont know whats wrong, but I know how to fix it:
Just assign the weapons to the Rhand bone instead of the weapons bone.

How do I add officers to a unit?


To add officers to a unit you add the line officer just after the soldier line in the EDU. Then you
must link to the ModelDB entry of the unit you would like to be the officer. For instance:
Soldier peasants, 60, 0 ,1
Officer Armored_Swordsmen

Now the peasant unit will have an armoured swordsman as an officer in their unit.

How do I make my created unit available for recruitment through a build in the
imperial campaign?
You write an entry into the EDB (Export_descr_buildings.txt), like so:

61/68
Jonas Alletun Jensen

Capability
{
Recruit_pool paladins 1 0.7 6 0 requires factions {England,}
}

How do I mount an unmounted unit?


Lets say you want a mounted arquebusiers unit for Denmark. Below you see the needed modelDB
entry:

Code:
20 mounted_arquebusiers
1 4
56 unit_models/_Units/RN_Light_Lmail/arquebusiers_lod0.mesh 121
56 unit_models/_Units/RN_Light_Lmail/arquebusiers_lod1.mesh 900
56 unit_models/_Units/RN_Light_Lmail/arquebusiers_lod2.mesh 2500
56 unit_models/_Units/RN_Light_Lmail/arquebusiers_lod3.mesh 6400
1
7 denmark
73 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_denmark.texture
72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_normal.texture
44 unit_sprites/denmark_Arquebusiers_sprite.spr
1
7 denmark
69 unit_models/AttachmentSets/Final European CB Gun_denmark_diff.texture
69 unit_models/AttachmentSets/Final European CB Gun_denmark_norm.texture 0
1
5 Horse
16 MTW2_HR_Arquebus
13 MTW2_HR_spear
24 MTW2_HR_Arquebus_Primary 1
18 MTW2_spear_Primary 1
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
The important things I have highlighted with bold. Firstly I give the unit a new name
(mounted_arquebusiers). Then I change it's animations to a HR set. The animations are the bottom
6-7 lines in the entry. HR stands for Horse Rider. This is what makes your unit a mounted one.
Notice I didn't change the model or the textures to do this; they follow neatly along and dont need
to be changed.

The EDU entry should look like this:

Code:
type mounted_arquebusiers
dictionary mounted_arquebusiers ; mounted_arquebusiers
category cavalry
class missile
voice_type Light
banner faction main_cavalry
banner holy crusade_cavalry
soldier mounted_arquebusiers, 48, 0, 0.8
mount fast pony
mount_effect elephant -4, camel -4

62/68
Jonas Alletun Jensen

attributes sea_faring, hide_forest, can_withdraw, gunpowder_unit,


fire_by_rank, start_not_skirmishing, gunmen
formation 1.2, 1.2, 2.4, 2.4, 3, square
stat_health 1, 0
stat_pri 14, 1, arquebus_bullet, 120, 20, missile, missile_gunpowder,
piercing, none, musket_shot_set, 25, 1
;stat_pri_ex 0, 0, 0
stat_pri_attr ap
stat_sec 6, 1, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
;stat_sec_ex 0, 0, 0
stat_sec_attr no
stat_pri_armour 0, 3, 0, flesh
;stat_armour_ex 0, 5, 0, 0, 3, 0, 0, flesh
stat_sec_armour 0, 0, flesh
stat_heat 2
stat_ground 1, -2, 3, 2
stat_mental 3, normal, trained
stat_charge_dist 30
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 460, 125, 65, 50, 460, 4, 110
armour_ug_levels 0
armour_ug_models mounted_arquebusiers
ownership denmark
;unit_info 6, 14, 3
In the line:
mount fast pony
you tell the game which horse your unit uses.

In the line:
soldier mounted_arquebusiers
you tell the game that this unit should use the animations specified in the end of the
mounted_arquebusiers entry in the modelDB (the HR one).

The line:
armour_ug_models mounted_arquebusiers
links to the modelDB and the model and textures you specified there.

How do I get each faction to have unique generals and captains?


Making new captains and generals are just like making any other units. For northern factions, the
model you want to change is:
unit_models/_Generals_and_Captains/Northern_Captain/northern_captain_lod0.mesh

But if you change this model, it's going to affect all factions which uses "northern captains". So
what you do is create a separate entry for e.g. byzantium in the modelDB, like so: This entry will
hold model, texture and animation information about the new captain.

Code:
17 byzantine_captain
1 4

63/68
Jonas Alletun Jensen

78
unit_models/_Generals_and_Captains/Northern_Captain/northern_captain_lod0.mesh
121
78
unit_models/_Generals_and_Captains/Northern_Captain/northern_captain_lod1.mesh
900
78
unit_models/_Generals_and_Captains/Northern_Captain/northern_captain_lod2.mesh
2500
78
unit_models/_Generals_and_Captains/Northern_Captain/northern_captain_lod3.mesh
6400
1
9 byzantium
100
unit_models/_Generals_and_Captains/Northern_Captain/textures/late_northern_capta
in_byzantium.texture
97
unit_models/_Generals_and_Captains/Northern_Captain/textures/late_northern_capta
in_normal.texture 0
1
9 byzantium
63 unit_models/AttachmentSets/Final General_byzantium_diff.texture
63 unit_models/AttachmentSets/Final General_byzantium_norm.texture 0
4
4 None
15 MTW2_Non_Shield 0
1
18 MTW2_Sword_Primary
0
5 horse
18 MTW2_HR_Non_Shield 0
1
18 MTW2_Sword_Primary
0
8 elephant
18 MTW2_Elephant_Crew 0
1
18 MTW2_Sword_Primary
0
5 camel
18 MTW2_HR_Non_Shield 0
1
18 MTW2_Sword_Primary
0 -1 0 0 0 0 0 0

Then you go into "descr_character.txt" and change Byzantines entry under "general" (thats the
same a captain, while "named character" is what we'll usually call a general) to this:

Code:
faction byzantium
dictionary 2
strat_model southern_captain
battle_model byzantine_captain
battle_equip gladius, chainmail shirt helmet and rectangular shield

64/68
Jonas Alletun Jensen

Notice how I link to byzantine_captain from the character file to the modelDB, where I then
specify which model and texture to use. In the pieces of code presented above I still use the same
captain model, but you can change it to any unit you want. Byzantium can now have their own
completely unique captain.

Can I use 3dsmax instead of milkshape to edit units and animations?


Yes! Thanks to KnightErrant, it is now possible to use 3dsmax without the use of any form of
workaround. See chapter 7 for more details.

Ive changed the skeleton, followed KEs guide, but the model looks weird in
the game! Why?
If youve followed KnightErrandss guide and you get for instance wonky long arms or weird
looking legs, the problem lies in that you have not zero jointed the skeleton before exporting it.

After youve made the skeleton go to Tools Zero Joints in Milkshape. This will reset all the bone
angles to 0. You must do this because (quoting GrumpyOldMan): Any movement of any bones
screws up the angles and rotations for other bones.

My newly edited unit has a line down through it's face


M2TW units (and indeed most units in CGgames) are constructed around a vertical line that divides
the mesh in half. Kind of like Ive showed in the helmet modelling chapter, where I first created the
one half, then mirrored it over to get the whole helmet. However, this create a problem when you
stick the unit into a scenario where there is a lightsource. The vertical line (where one half was
mirrored over) show up very distinctly. The solution to this problem is smoothing. In 3dsmax they
are called smoothing groups or Smooth Modifier, and the vertical line can be removed by applying
one. In milkshape its even easier to fix:
Just untick the autosmooth
See chapter 5, figure 5.8 under Autosmooth trick.

My Unit is invisible! Why? And how do I fix it?


Usually when a unit is invisible there are two causes:
1. There is no file at the location specified in the modeDB. E.g:
unit_models/_Units/New_unit/textures/missing_textures.texture
I think the programming term for this is a null pointer exception. It's probably the most
common mistake.
2. Check the alpha channels of your textures. They should be all black. The normal map's
alpha channel is where transparency information is stored, so if it's all white the unit will be
invisible.

My unit "glows" / Very shiny white


Two reason:
1. You didn't save the normal map as interpolated DTX5
2. The alpha-channel of the normal-map is all white (should be black), or there is no alpha-
channel. If you try to save your normal-map and it says too many channel (5) just flatten
the image (right click on the bottom layer and press flatten image).

65/68
Jonas Alletun Jensen

How do I edit animations?


To edit animations and create new skeletons you most use KnightErrants animationUtilities. It
comes with a very nice guide too:
http://www.twcenter.net/forums/downloads.php?do=file&id=1469

Help my unit looks like this (missing parts & jesus syndrome)

Dont know what causes it, but here's how to fix it:
1. In milkshape, unhide all groups
2. Select every face with the select tool
3. Rig every face to the pelvis bone
4. Start to re-rig all the faces to their respective bones (long, boring process)
5. Give every group a comment if you havn't already done that.

Can I change the strategy map models?


Yes. See my strat map models reloaded tutorial (uses 3dsmax):
http://www.twcenter.net/forums/showthread.php?t=116837

Can I use milkshape to change the strategy map models?


Yes! Thanks to KnightErrant:
Python strat model converter for Milkshape Users:
http://www.twcenter.net/forums/showthread.php?t=139169

66/68
Jonas Alletun Jensen

Eyecandy tutorial
If you want to create other graphics with photoshop that have nothing to do with units, then I have
made a tutorial that covers most of the 2D aspects of the game. The tutorial can be found here:
http://www.twcenter.net/forums/showthread.php?t=87628

Strat map models


If you have created a new unit and would like to make it a general or captain on the campaign map I
have also written a tutorial about that. It requires 3DsMax, and I go though basic character rigging
(a.k.a. bone assignment). The tutorial can be found here:
http://www.twcenter.net/forums/showthread.php?t=116837

67/68
Jonas Alletun Jensen

References
Andrew Loomis Drawing the Head and Hands

Special Thanks:
GrumpyOldMan (GoM)
KnightErrant
Alpaca
zxiang1983
Caliban
Emil Jensen

www.twcenter.net
www.totalwar.org

The Creative Assembly for making such a great game!

68/68