Modeling & DB. Milkshape & UU3D. 3DS MAX workflow. How wangrin and I use them.
Hi!
First give thanks in this order to :
ProvostGuard , because with his merging tutorial I made my first steps on modeling.
T.C. for his tutorials and tool promoting so we can make models much eaiser.
Wangrin for his discreetly very helpful personality and his merging tutorial.
As title says I am going to explain here how I use these two programs to make models of the units for my mod. I have been using this programs for five months now, so I have some knowledge but I am not expertise. Thank Carricanta because his new interest in modeling has made me write this. Any other modeler please feel free to add any comment or knowledge you want to share.
What is a model? what is textures? what is skin?.
When you get to the vanilla files, you see in data folder ( C:\Program Files (x86)\Steam\SteamApps\common\empire total war\data) a file called models.pack and patch.packs, these ones five of them, and if you open them with PackFileManager, you will find a directory called + unitmodels, so if you open it you will see tens of files, most of them in groups of four, with what seems to be a unit name and followed by lod#.variant_weighted_mesh, and # values go from 1 to 4. These are the models files. And what is a model? The model is the 3D representation of the soldier that are part of the units you see when you play any battle, but this model files are just volume but not the colorful soldier you see in the battle. The colors, and some other light and relief effects, are given in the textures files, and this colors are commonly know as skins. That is why you may see advertisements of any mod team looking for modelers and skinners. First ones work with the 3D part of the soldier and skinners give them the beautiful look they have. So first ones are like sculptors and second ones are like painters.
To find the textures files go down the unitmodels directory and there you will find another directory called just textures, difficult, isn't it? There you will find the files in groups of three, diffuse.dds for colours mostly, gloss_map.dds for light, shadows, and faction colors effects, and normal.dds for relief.
Ok, but this thread is about modeling so retaking the thing, what are lods for? As you saw lods are named 1,2,3 and 4. Lod1 is the 3d soldier shape you see when you are watching the soldier in the closets position, then 2 a little bit further and so till 4 which is the soldier shape you see when you are moving your battle camera far from the unit. And why are four of them and not just one? Because the first one is very detailed and the second one is less detailed and so until the fourth, and the more details the soldier has the more your graphic card has to work, so to avoid the game colapsing or just getting too laggy when you have hundreds of soldier in your screen, the lods to see the soldiers from far have less details.
So let's start talking about the programs UU3D and Milkshape. Models are worked with Milkshape, but you cannot work directly over vanilla files with it, you have to convert them to Milkshape (MS from now on) files. This is one of the things UU3d program is useful for. I am not going to explain how to convert the files from Empire to MS as T.C. has done a magnificent tutorial about it that you can find here http://www.twcenter.net/forums/showthread.php?t=374975 , its name is about weapons but all the tool and file management is the same for soldier models files. Once you have converted lod1 you can work with it in MS, then convert lod2 and work with it and so. It is important that you have all the plugins needed or else you wont be able to open the files.
When you open MS you will see several screens, a menu up and another vertical menu to the right or maybe to the left, we will see how to change this soon. Go to file and open the lod file you have just converted, once you do this you will see the 3d representation of the soldier on the several screens you have open. Going back to menu, in file you will find the typical lay out of this submenu, save, save as .... and some other functions. One that will be important is merge, that will allow you to merge parts of different models. This will be explained later.
In the same menu to the right you can see windows submenu. There you have 'viewports', that you can open, and that you can use to change the numbers of screens you use to work, and also control panel which you can use to move the vertical menu to the left or to the right. But more important is that you have the show view caption checked, this will open little menus in each screen that allow you to change the type of screen, they are for you to work or to see. They are front, back, right,.... the point from where you are watching the model and 3D.To move the view on the working screens just press the mouse wheel and move the mouse. It moves up down right and left, also you can use the wheel to get a closer view of the model. But 3D screens intead of moving up down right left when the mouse wheel is pressed it moves arround the model. About this last type of screen, there is always a 3D screen open with the model in the caracteristic milk color surfaces, that you can see but not work with, if you make another screen to be the 3D type you will see that the image is not the same, you wont be able to work with it but the look of the model is similar to the front back ... screen types. This second 3d screen type is very useful to work as it allows you to move arround, over inside the model giving you a 3D view of the vertex, lines, faces, and groups of them that models are made of.
And what is a vertex, a line, a face, a group?
Vertexs are the little dots that you can see in any work screen(front, back...) that are united by lines. Three vertex linked by three lines make a face, which are the surfaces of the model, and groups are just groups of faces, so groups of vertex and lines that the model is made of. But models have more components. The faces are the surface but the model needs to move when playing so for that they have, as we have, a skeleton. The skeleton is made of joints and bones and the addition of the groups of the model to the joints is what makes the model to move as the joints are said to move by the game. This is the animation part, which I have no knowledge. I mean, I do not know how to change animations but I know and I will explain how to add the parts of the models to the joints for it to move as the game animations are set.
Ok, so let's work. If we go to the vertical menu, that you can find to your left or to your right, depending on the settings you have in windows submenu in main menu, you will see four parts, model, groups, materials and joints. If we have model visible we can use several tools, first and main one is select. Once you press on it you will see that the lower part of that menu changes so you can check vertex, face, group or joint. Let's check vertex and once you have done so, go to any working screen and drag your mouse over any part of the model. You can do this too selecting now faces or groups. I never select joints now that I think about it but maybe you can find a good use of it. Select any vertex or faces or groups and go to main menu>edit. There you will see a lot of things you can do. As always an undo function so it will say undo selection. But then more, they are just what they say so just practice with them. About invert selection, it has not always worked as I wanted it. About hide selection, I have never used it but I have used hide groups in vertical group menu, and this will make the selected part to disapear temporary from the screens, working ones and 3D, until you unhide them, so this parts wont be selected or afected by any work you do, which can be very useful when you only want to work with a part of the model. In the vertical menu below vertex, face, groups and joint buttons you will see a checking box that says ignore backfaces, this will make that when dragging your mouse over the model only the closer faces vertex ... will be selected. This works in an somehow random way so it is not always so useful and you have to get really close to the model and work vertex by vertex.
So once you have the components of the model you want selected then you can edit them by moving, rotating or scaling them( which means that you can make them bigger or smaller). And also extrude them, but I normally do not use this tool. There are two ways to move, rotate or scale the parts, directly on the screen or using the coordinates system that opens below in the menu over x, y and z buttons. I do not normally use this way but for scaling. I have not said but of course if you click on move, rotate, scale that activates the tool and its settings. Below those tools you have other buttons that are not exactly tools but geometrical shapes you can add to your model, and also you can see change the settings of them. I think it is worthless to explain the setting just play with them. NOTICE that you have to select and unselect, or activate the adecuate tool every time you want to work with any other part of the model or change the way you want to work with it. If you are repeating some consecutive tools use you can check the auto tool box you have in the lower part of this model vertical submenu.
Very important and necessary thing to know is the use of groups vertical submenu. It is also very simple, with it instead of selecting vertex, faces or even groups on the working screens you will be able to select, hide, delete or rename them just clicking on the list or moving up and down of it. Some changes only work with groups, they do not work with vertex selection. This is the case of the duplicating selection tool that you will find in main menu >edit. This a very useful tool. Of course once you select a group this way if you go back to model menu you can select any tool ( move, rotate, scale..) or in main menu to make any change you want and also as we will see later you can go to the joints vertical menu to add the group to any joint so that part of the model will move the way you want in game. About rename: when opening a model you will see that some parts of the model seem to be duplicates for example, Euro_Expat_Infantry_arms01, Euro_Expat_Infantry_arms02. This is that the model is designed with two possible arms shapes that the game selects randomly when opening a battle so the soldiers do not look all the same. I think this does not work for all groups but for the ones that the game was designed for, I mean if you rename it with a vanilla name the game will work this way, but if you rename it mymother01 this group will be present in all soldiers without random selection If you create any new group MS will give it a specific name related to the geometrical shape you have given it in model submenu. But you can rename it to the part or the model you want, even a vanilla name.
So let's move to joints submenu. Maybe when you opened the model you saw the blue skeleton it has, or maybe not. If you want to see it check the 'view skeleton box' you have in the middle of this vertical submenu. In the upper part of this submenu you see a list of joints, double click on any of them, then on screen you will see that the joint is in red and other joints and bones that depends on it are in light green. If you pressed delete button of your computer you will delete not only the red joint but also the light green ones that depends on them. So do not delete a main joint if you do not want the ones depending on it to disapear. OK one important rule that T.C. says in his tutorial and that, if you have had the patient to read untill here, you have surely forgoten is that all vertex must be assinged to a joint. If you leave any vertex unassigned when the time to convert from MS to Empire UU3D will give you a nice mesage telling you about it, so there you go back to your model to find what was it that ' I forgot despite T.C. and Bethencourt told me about it' If you click on selassinged you will see all vertex that are currently assinged to that joint. And if you press SelUnAssigned guess what...
Ok to merge parts of different models we have two already worked out tutorials as far a I know
When you first open your model you will see it is very tiny and far away and when you try to move any vertex or part of the model it only moves to a position too far from where you want to place it. I think it is because Empire models are very small to what MS was designed for. To avoid this once you open it you can scale( make it bigger, in this case) all of it or just the part you want to work with. I used to scale to 1000 but then you lose the view from some of the position as top or right. So it is better to scale it to 100. And to do so, in 'model' vertical menu and click on scale button. Then in the lowest part of that menu you will see that an x,y,z slots of coordinates have opened, with values 1,0. Also some check dots that say 'center of mass', ' origin' and 'user point'. In this case we should use origin. Then put 100 in the three x y z slots and press scale button that is to the right of those slots. Then press select before going to the working screen and then move the screen and you will see a much bigger model easier to manage and edit. BUT you cannot put this colosus on the game so once you have edited it you have to revert the scale so in this case put 0,01 in the three slots and again press the scale button to the right.
DB WORK
I have decided to quote this answer I have posted in another thread because it shows the basic db work you have to do to add you unit to the mod.
Originally Posted by Bethencourt
What you are asking for is really two things. One disabling one unit and the other is adding a new one.
You have to add the following tables to your mod
warscape_animated
warscape_animated_lod
units_to_groupings_military_permissions or units_to_exclusive_faction_permissions
units
unit_to_unit_abilities_junctions
unit_stats_land
building_units_allowed
There are other tables like units_to_gov_type_permissions that you may want to add depending on your design.
To disable one unit you have to identify its db identity. The most common way to do it is to go to unit table in main or in the patch it has been publish in by CA. The second column of that table is screen name. If you click on the name of the column the names will apear in alphabetical order so you search for Coldstream Guard. In this case the db identity of the unit is euro_superior_line_infantry_coldstream.
Then go to units_to_groupings_military_permissions or units_to_exclusive_faction_permissions in main or in patch file to see where the unit is attached to the group that the faction belongs to or the to the faction directly. If it is in units_to_groupings_military_permissions just delete the file if you do not really want it in the game, but if you want to preserve it for other factions of the group, British rebels or whatsoever, or it is attached via units_to_exclusive_faction_permissions then go to this last table ald put false where it is true. This second method using units_to_exclusive_faction_permissions is the best method.
Then to add the new unit. If you have created a new model and then new textures then add the lod files and the textures files to your mod. It is better to use the same name for the lods files and for the textures files so things go quicker when changing db tables which is what follows, so you can use the same name for the unit id and the unit model in the tables. This tutorial is made suposing that you have done so if not it can cause ctd if you do no place the correct names in the tables.
Go to warscape_animated add a row, copy and past the last row. (In general you can clone rows but in some tables like unit stat land this is forbiden as the clonation is always partial and it causes ctd.) In first column replace the name by the same name you have used to name the lods and then textures. and replace "unitmodels/textures/vanilla unit" by "unitmodels/textures/your unit name". With this you are adding the textures to the db table.
Go to warscape_animated_lod and clone the last four rows. Each row is for a lod, so lod1 lod2 lod3 and lod4. Change the number of the first column, put any number for example adding 10 to each number in that column for each row. In the second column where you see UnitModels/vanilla name_lod1.variant_weighted_mesh change to UnitModels/your unit name_lod1.variant_weighted_mesh. Repeat it in the three other lines for lod2 until lod4.
In the last column change the vanilla unit name by you unit name.
With all this you have added the model to the db files.
Go to units_to_groupings_military_permissions or units_to_exclusive_faction_permissions, here attach the unit to the group you are interested or to the faction you want by using true value the faction permission table.
Go to units table. Add a row, find the row of the euro_superior_line_infantry_coldstream copy it and past it in the new row you first created.
Go to unit_to_unit_abilities_junctions. Find the rows of euro_superior_line_infantry_coldstream , clone them all and then change the first column puting your unit name.
Go to unit_stats_land and add a new row find euro_superior_line_infantry_coldstream and then copy and past it in the row you first created. In the first column change the name of the vanilla unit by the name of you unit and then in the same table add the name of your unit in the Model Name column.
Then go to building_units_allowed and clone the rows of the euro_superior_line_infantry_coldstream and in the second column change the vanilla unit name by the name of your unit.
And that is it. Test.
To add officers, standard bearers, buglers and drummers you need to mod the next tables
warscape_animated
warscape_animated_lod
unit_stats_land
battle_personalities
The changes in the two first are the same as the unit ones. Starting in warscape_animated you can give there the name you are going to use for you model, for example euro_officer_100, but you can give any name to it that is not already used for another model.
So as I have said make the same changes in the two first tables as you have done for normal soldriers.
Once you have finished with those two tables go to unit stat land and in the colum officer, standard bearer or bugler/drummer put the name of the model you have created there for the unit you want to add it to.
Then go to battle_personalities, here you can clone the row of any officer, standard bearer, bugler or drummer, and then in the first and in the second column change the name you find there by the one of your model.
And that is it. Test.
UNDER CONSTRUCTION.
Last edited by Bethencourt; February 25, 2013 at 04:20 PM.
I know that you carry an enormous workload Bethencourt and it may be a bit bold of me to petition in all modesty for some sort of guide through tutorial here on this thread.
Perhaps one day you could do an exemplary remodelling and merging based on one of your excellent napoleonic models for ETW? That would be absolutely tremendous.
It is also possible to modify or create animations (.anim files) using both MilkShape and UU3D.
Creating animation :
1. Open your ms3d model with MilkShape
2. Select ANIM button
3. Select the joint you want and modify its position (rotate, move, etc.)
4. When your first frame is done, select CTRL+K to fix it
5. Same process for each frame utill your animation is completed
6. Save your ms3d file
7. Open the ms3d file with UU3D (Ultimate Unwrap)
8. Save it as animated_rigid_model or variant_weighted_model BUT select "export animation", UU3D will create a blank.anim file with your animation
Last edited by wangrin; November 29, 2015 at 08:24 AM.
« Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES
This software is particularly useful to create new UVmap (texture patron).
But this software main interest is the ETW plugin that convert variant_weighted_mesh and rigid files to any file format you want (.ms3d, .3ds (3DS Max), .dae (collada file format can be used with Blender).
Notes that UU3D isn't a free software.
Paint.Net :
Autodesk 3dx mask is a professional modeling software. It is use by CA to create their models.
It is possible to use 3ds max for free by joining the Autodesk Education Community as long as you use this software for non-commercial purpose.
Photoshop :This is the Rolls-Royce of 2D software to create texture.You can use NVidia tool to create normal map based on diffuse texture.
Last edited by wangrin; July 15, 2013 at 03:13 AM.
« Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES
Last edited by wangrin; January 11, 2015 at 03:34 PM.
« Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES
I take advantage of helping someone to write some new chapters
Last edited by wangrin; August 05, 2012 at 01:43 PM.
« Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES
MODELING PART3 : MODIFYING A MODEL USING MILKSHAPE - CHAPTER 1
USING DIVIDING EDGE, UNWELD VERTEX, SELECT FACE BY VERTEX AND DUPLICATE SELECTION
NOTE : I've attached .ms3d model and its different steps to this post
Last edited by wangrin; November 10, 2012 at 09:52 AM.
« Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES
Wow Wangrin thats far from a quick description, i will take my time and study it
I would rep you if i could!
Well i broke my head trying to understand exactly what you mean in the tutorial, i cannot understand it litteraly though, i cant get the step by step procedure no matter how iam trying to think of it.
The only think that i have managed to do is to duplicate the vertces -faces that i wanted, and the snap them to the main body vertex by vertex.
Then the other half has a gap that misses faces in order to close it, my only solution to that is to make a square shaped vertex-face and snap it , part by part to its place.
Last edited by Megasalexandros; November 10, 2012 at 09:59 PM.
Last edited by wangrin; November 20, 2012 at 06:21 AM.
« Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES
Re: Modeling & DB. Milkshape & UU3D. How wangrin and I use them.
I've add this to "How to add a new Cannon Model" thread to answer to TuranianGhazi, but I think it is better to add this little tutorial here.
Last edited by wangrin; June 01, 2013 at 12:35 PM.
« Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES
Re: Modeling & DB. Milkshape & UU3D. How wangrin and I use them.
Work in Progress
Last edited by wangrin; June 06, 2013 at 12:40 PM.
« Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES
Re: Modeling & DB. Milkshape & UU3D. How wangrin and I use them.
1. DIFFUSE, NORMAL & GLOSS MAP
A model usually need 3 textures :
The ..._diffuse.dds, used to "paint" the model
The ..._normal.dds, used to simulate bumps and wrinkles on the surface of the model
The ..._gloss_map.dds, used to define specular effects, dirt mask and faction colour mask
Examples :
1. 2. 3.
1. diffuse texture
2. normal texture
3. gloss_map texture
File format is .dds (DTX5)
2. CREATING THE NORMAL TEXTURE
The ..._normal.dds texture is a bump map, used to simulate bumps and wrinkles on the surface of the model
But this texture is also used as a base to create "shadows" in the diffuse texture, to reinforce the illusion of relief.
So, creating this texture is a very important step.
To create the bump map, we have several possibilities :
2.1 creating the bump map from a high poly model
This is the best and most effective process to create a bump map, but not the easiest.
It means to convert the unit model, a low poly one, to high poly, keeping the UVmap, and then sculpting relief on the surface of the model.
Then, exporting the bump map.
Tools needed :
converter : .variant_weighted_mesh, .rigid_model, etc. <> .fbx, .obj, etc.
Ultimate Unwrap 3D (up to date, but not free)
Milkshape plugin (outdated, converting to .obj)
3d modeling tool :
MudBox
Zbrush
etc.
Process :
low poly model --(3dsm max)--> High Poly Model --(MudBox)--> sculptin High Poly model --(MudBox)--> exporting Bump Map
Low Poly to High Poly :
select model and convert it to "editable poly"
right clic on model > convert > editable poly
using Turbosmooth modifier to increase the number of poly (3 to 4 iterations)
(*]collapse to editable poly
2.2 creating the bump map from a 2d picture/texture
This is not the most effective solution, but the easiest and the most common.
Bump map is created from the diffuse map, using nVidia plugin for Photoshop or plugin for paint.Net or, probably, The Gimp.
Diffuse.dds use RGB channels but also the Alpha channel.
Alpha channel is use to fix "transparency".
Black = transparency 100%
White = transparency 0% (opacity 100%)
Example :
2.2 CREATING THE TEXTURE
Tools needed :
Photoshop
The Gimp
Paint.Net
etc.
Process :
Layers are fundamentals to create good textures.
base layer : Black and White UVmap >
This layer is used to place base colours for the texture
top layer : Black and White wireframe UVmap
This layer is used to locate and place elements using wireframe as a guideline / patron
Intermediate layers :
shadows : used to increase the illusion of relief
a. b.
a. Shadows layers (reuse of the bump map to reinforce the feeling of relief for creases, etc.)
b. Shadows layers for "decals" (to reinforce the feeling of relief for pockets, braids, buttons, etc.)
decals : use to place buttons, braids, etc.
But, before working on a model, you need documents, from pictures to text describing the unit :
French chasseur à cheval - late XVIIIth century : : UVmaps (B&W and B&W filled), 3d model (.variant_weighted_mesh and .fbx file formats), documents showing such unit
Legion de Dabrowski officer - Late XVIIIth century : UVmaps (B&W and B&W filled), 3d model (.variant_weighted_mesh and .fbx file formats), documents showing such officer
4. CREATING THE GLOSS_MAP TEXTURE
The gloss map define specular effects, but also the dirt mask.
Channels are used to define separate effects :
1. 2. 3.
1. gloss_map - red channel : specular sharpness
2. gloss_map - green channel : specular level
3. gloss_map - blue channel : dirt mask
4. gloss_map - alpha channel : colour mask (white = faction colour over diffuse texture / black = no faction colour over diffuse texture)
5. EXAMPLE : FLIKITOS' TEXTURES FOR IMPIERIAL SPLENDOUR
Some example from a Master :
1. 2. 3.
1. GB Colonial Line Infantry diffuse and normal textures
2. FR Polish Troop (Legion de Dabrowski) diffuse and normal textures
3. FR Monarchy - General diffuse and normal textures
Last edited by wangrin; December 02, 2015 at 02:10 PM.
« Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES
Re: Modeling & DB. Milkshape & UU3D. How wangrin and I use them.
Exporting animations using UU3D need three main steps :
Opening model and animation
To be able to export an animation, you must open a model and an animation
step 1 : open a model
example : opening african_tribal_lod1.variant_weighted_mesh
step 2 : in the Import Empire: Total War windows, select an animation to import
step 3 : you can look at the animation
Modifying animation through MilkShape
Exporting animations
Step 1 : save you model as a .variant_weighted_mesh
Step 2 : select the "Export Animations" option
Step 3 : the exporter create two files, a .variant_weighted_mesh and a .anim ones.
NOTES :
Process to modify animation is :
ETW plugin has been updated to allow to "force" the T-pose.
Just check the export option called "Transform vertices to rest pose".
Use this option if your model has been transformed to a different rest pose (from FBX or elsewhere).
Process should work differently for TW:R2 as ETW plugin dosn"t allow to save .rigid_model_v2.
TW:R2 process should be :
Last edited by wangrin; January 11, 2015 at 03:37 PM.
« Le courage, c’est de ne pas subir la loi du mensonge triomphant qui passe, et de ne pas faire écho de notre âme, de notre bouche et de nos mains aux applaudissements imbéciles et aux huées fanatiques.. » Jean JAURES