PDA

View Full Version : Strat Map Models Reloaded



Alletun
08-22-2007, 09:03
Strat Map Models Reloaded
By: Alletun


Introduction
This tutorial will teach you how to turn a battle-map model from m2tw into a strategy-map model. If you have any questions dont hesitate to ask.
Software used:
Grumpy Old Man's converter: http://www.twcenter.net/forums/downloads.php?do=file&id=1276
Milkshape 1.8.1
3ds Max 7 (i think you can use any version from 5 to 9?)
Verc's Cas import/exporter for 3dsmax:
http://www.twcenter.net/forums/downloads.php?do=file&id=141

Rtw/Stratmap skeleton vs. M2tw/Battlemap skeleton:
The major obstacle that we need to deal with is the difference in skeleton between the stratmap models and the battlemap models. The battlemap models use a skeleton with 20 standard bones (with unique bones such as bone_jaw and bone_clavicalL / R). The stratmap models use a different skeleton, where the most noticeable difference is that the skeleton enables cloaks (like in Rtw) through 3 bones. We will not be making any use of these bones in this tut, but feel free to experiment.

Step 1. Importing a .mesh and exporting an Autodesk .3ds.
Firstly you need to set up m2tw for modding if you have not already done so: https://forums.totalwar.org/vb/showthread.php?t=76289

1.1: Make a folder called "model_strat" in your mod folder.

1.2: Make a subfolder called "textures" in model_strat.

1.3: For this tutorial were gonna use the Norman_king model, so go to data/unit_models/_generals_and_captains/early_generals/ and copy norman_king_lod0.mesh into your new model_strat folder.

1.4: Using GoM's converter, convert the mesh to .ms3d, then open the ms3d file with milkshape.

https://img523.imageshack.us/img523/4203/gomsconverterlv1.jpg


1.5: Export the model as an autodesk .3ds. Export to your model_strat folder.

https://img523.imageshack.us/img523/5596/exporting3dsnb6.jpg


Step 2. Merging model with skeleton
Now that we have the model we want, we're now gonna get the skeleton.

2.1: Download the script (see the introduction) and follow the install instructions in it's readme. Click the Hammer (1), then Max script (2), followed by Run Script (3), double click the script called "CAS_IE_b79.ms". then pull down the drop down menu and click the R:TW importer exporter.

https://img520.imageshack.us/img520/9087/casscriptcp8.jpg


2.2: Go to m2tw/data/model_strat/ and copy "late_general_northern.cas" into your model_strat folder.

2.3: In max, import the cas by clicking "Import Cas":

https://img501.imageshack.us/img501/6718/importcastc6.jpg


you should now have something like this (remember to zoom in):

https://img248.imageshack.us/img248/8917/general1dv9.jpg


2.4: Now select all parts of the model. Do NOT (!) select the bone helpers. Then delete the model:

https://img362.imageshack.us/img362/7190/selectinggeneralbg5.jpg


This is how it should now look like:

https://img512.imageshack.us/img512/5016/bonehelpersue7.jpg


2.5: Import the .3ds from step 1.5 by going to File>Import. It will ask you if it should replace the entire scene, take the top bullet and click ok (we want to keep the scene), if it asks about animation length, just say "yes".

(now would be a good time to save. perhaps under the name "New_late_general_northern")

Step 3. Finishing the merge:








3.1: If your newly imported general is laying down, select him and rotate him up (remember to also select the crown and sword).

https://img201.imageshack.us/img201/3425/newlayingdownra3.jpg

Use the rotate tool and the angle snap tool to rotate:

https://img201.imageshack.us/img201/7747/newgeneralrotateyl5.jpg


3.2: With everything still select (except the bone helpers), click the blue tube and then click the Skin modifier under animation:

https://img206.imageshack.us/img206/9908/selectskinmodifieryy8.jpg


3.3: Click "add" to add new bones.

https://img210.imageshack.us/img210/8569/addbonesof2.jpg


3.4: Add all bones except Scene Root (or, all bones that has a Bone_ infront of them).

https://img443.imageshack.us/img443/8070/addbones2ma8.jpg




Step 4. Assigning Vertices:
What we're gonna do now is that we're gonna assign all vertices in the mesh to one bone (bone_torso) and then start assigning them to the correct bones afterwards. We thereby make bone_torso our check-up bone.

4.1: Click the + (1) and then click Envelope (2). Then check "vertices" (3) and de-check envelopes and cross-sections. now only vertices will be selected. Then click on bone_torso:

https://img266.imageshack.us/img266/835/assallvercstotorsobo5.jpg


4.2: In your viewports select all vertices like so:

https://img337.imageshack.us/img337/5463/selectallverticesxm8.jpg


4.3: We now assign the weight for all vertices to be 1,0 and "rigid". this means that only one bone can be assigned per vertice (else the game crashes) and that the weight is 1 (full weighted). all of the vertices are now assigned to the torso bone.

https://img411.imageshack.us/img411/1144/weightingaj1.jpg
https://img411.imageshack.us/img411/7229/verticestotorsomb7.jpg


4.4: Deselect your vertices (by just clicking somewhere in a viewport) and then click on a new bone, lets start with bone_head. You select all the vertices in the head and do as you did above, with giving them an abs. effect of 1,0.

4.5: Repeat step 4.4 for all the bones untill every part of your model is assigned to the right bones. you can click on bone_torso to see if there are any vertices that you have forgotten to assign (eg: if a vertice on the arm is assigned to the torso, something is wrong since it should be assigned to an arm bone).

Step 5. Finishing up the model:
With the skeleton taken care of, lets finish up the model.

5.1: The .Cas exporter wants there to be a texture assigned to the model when it exports, so lets give it one. Go to data/unit_models/_generals_and_captains/early_generals/textures and copy "early_general_england.texture" into your model_strat/textures folder. then convert it with the dds converter.

5.2: In Max go to the Material Editor (shortcut m). Click on one of the spheres and scroll down to the dropdown menu called "maps". At "Diffuse Color" where it says "none", click there and navigate to your newly converted dds texture.

https://img63.imageshack.us/img63/5339/materialscq0.jpg


5.3: To assign the texture to your model, click and drag from the sphere to your model in the viewports. Make sure to also assign the texture to the crown and sword.

Step 6. Exporting the .Cas and getting it into the game:

6.1: You export pretty much the same way as you import. Export the cas as "late_general_northern.cas", and after that export it as "northern_general.cas"

6.2: Open up the photoshop and load the DDS texture of the norman king you converted earlier. Save it as "late_general_order_strat.tga" to the model_strat/textures folder, where "order" is your factions name.

6.3: Go to descr_model_strat.txt (in the data folder, if you havn't got it in your mod copy it over from the vanilla data folder). scroll down to



;;;;;;;;;;;
; GENERAL ;
;;;;;;;;;;;

type northern_general
skeleton strat_named_with_army
scale 0.7
indiv_range 40
texture denmark, models_strat/textures/late_general_denmark_strat.tga
texture scotland, models_strat/textures/late_general_scotland_strat.tga
texture france, models_strat/textures/late_general_france_strat.tga
texture order, models_strat/textures/late_general_order_strat.tga
texture hre, models_strat/textures/late_general_hre_strat.tga
texture england, models_strat/textures/late_general_england_strat.tga
texture saxons, models_strat/textures/late_general_hre_strat.tga
texture poland, models_strat/textures/late_general_poland_strat.tga
texture hungary, models_strat/textures/late_general_hungary_strat.tga
texture russia, models_strat/textures/late_general_russia_strat.tga
texture slave, models_strat/textures/late_general_rebels_strat.tga
model_flexi_m models_strat/late_general_northern.CAS, max
shadow_model_flexi models_strat/shadow_sword.CAS, max
6.4: Congratulations! you have a new stratmap model! :thumbsup2

https://img502.imageshack.us/img502/3548/successca3.jpg


This tutorial was based on Order Vs. Chaos mod, go check out the first preview:
https://img118.imageshack.us/img118/5139/promheaderfz2.jpg (http://www.twcenter.net/forums/showthread.php?p=2070123#post2070123)

ezekiel6
09-19-2007, 02:02
Has there been any look at this with Kingdoms? Is it possible to change the model for 1 faction only? I was thinking along the lines of converting captains to Highlanders and Generals to Noble Highlanders in the Britannia Campaign.

Alletun
09-23-2007, 13:26
that should be do-able, with some text work. i'll have a look at it.

ezekiel6
09-23-2007, 18:09
Well I took a shot at it, I only extracted the files that I needed, But I took the William Wallace model and simply duplicated it then re-named it highland general, I copied the texture too and altered it, saving it out as highland_general.tga. I then made new entries in descr_model_strat and descr_character and that worked. All generals use the William Wallace model, the captains use the standard model as does my King. The only odd thing was that my heir was wearing the English texture??

ezekiel6
09-23-2007, 21:39
Thanks Alletun for your tutorial, it's really helped me to get what I was after. Apart from a texture error with my Heir I've had full success.
http://www.markbrumby.com/Images/New_Generals.jpg