Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
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
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).
6/68
Jonas Alletun Jensen
The above units are created by Alletun for the mod Wrath of the Norsemen
7/68
Jonas Alletun Jensen
8/68
Jonas Alletun Jensen
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.
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.
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.
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).
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.
Hue/Saturation
To apply the Hue/Saturation
adjustment to a layer, go to Image
Adjustments Hue/Saturation (see
figure 1.10)
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.
Levels
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.
In the following chapter we will go more in-depth on the most useful tools.
15/68
Jonas Alletun Jensen
16/68
Jonas Alletun Jensen
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.
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.
18/68
Jonas Alletun Jensen
19/68
Jonas Alletun Jensen
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
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.
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
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
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
In the figure below (figure 5.1) you see Milkshapes main interface.
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 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.
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
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.
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.
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.
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.
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.
http://www.twcenter.net/forums/downloads.php?do=file&id=1276
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
33/68
Jonas Alletun Jensen
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
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
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.
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.
40/68
Jonas Alletun Jensen
http://www.twcenter.net/forums/downloads.php?do=file&id=1745
41/68
Jonas Alletun Jensen
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.
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
45/68
Jonas Alletun Jensen
46/68
Jonas Alletun Jensen
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:
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
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.
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
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:
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.
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.
52/68
Jonas Alletun Jensen
53/68
Jonas Alletun Jensen
54/68
Jonas Alletun Jensen
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.
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:
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.
56/68
Jonas Alletun Jensen
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.
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
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:
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
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.
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,}
}
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.
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
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.
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.
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.
65/68
Jonas Alletun Jensen
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.
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
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
68/68