Adding custom armor tutorial
This is a tutorial to import meshes into DAO with Eshme’s 3ds max plugin. Some of the things here are not specific to DAO, such as weight painting in 3dsmax. There are many more resources to find than can be put into this tutorial, it is not exhaustive.
- 3ds max (or free version - gmax). 3ds max version needs to be 2010-2012 or the import script will not work. GMax needs specific setup- check useful links and fextralife forums.
- Dragon Age Origins
- Dragon Age Toolset
- Gimp/Photoshop/ Anything else that will make .dds files
- GDA plugin
- Eshme Import/Export DAO Tools
Contents
- 1 Anatomy of an Item
- 2 Naming
- 3 Script Settings
- 4 Exporting a template
- 5 Preparing A Model
- 6 Textures
- 7 3D MAX
- 8 Alternate Method to skin the mesh
- 9 Weight Painting
- 10 Assign materials
- 11 Export
- 12 LODS
- 13 Hair And other Multi Mesh Items
- 14 Transplanting MMH for separate armour chunks and tinting
- 15 Bug Fixes
- 16 Useful links
Anatomy of an Item
mmh. This is the one the game references first. It defines the path for the other parts of the mesh(msh, mao etc). It has information in it like bone order for whatever skeleton the item uses.
Msh. The actual mesh itself.
Phy. Handles collision, physics
Mao. The material object file. This tells the item which texture files it’s supposed to use.
Textures
Naming
Very important for the GDA. Textures in the game are named as follows: [belonging to a semi-race]_[type of armor\clothing]_[unique index of 4 letters]_0[texture type]. Although you can name your custom textures anything you want so long as it is unique.
Model naming has more restrictions, no more than 4 letters for the idenfifying string. Check custom item GDAs to get a clearer idea of this.
Race gender is defined as follows:
hf- female Human hm - male Human ef- female elf em - male elf df - female dwarf dm - male dwarf qm - male qunari (there's no female qunari in the game)
Armor:
arm - armor rob - robe (mage, clergyman) cth - clothes (nobleman, wedding)
Helmets:
hlh - for mages. hlf - massive ones.
Texture types:
d - diffuse (Duffise) n - Normal s - Spectacular t - tint (Tint) e - emissive (Emissive) Need for a glowing effect. Almost never used in dao)
The result should be something like this: hf_rob_xmpl_0d or em_arm_exmp_0n. *NOTE: The material itself (the name of the material in max, then it will be the MAO file) is named the same, but without the texture type. For example: hf_rob_xmpl or em_arm_exmp. The model is named the same, only with a detail number at the end: hf_rob_xmpl_0 or em_arm_exmp_0
Script Settings
Decide where you install all programs - program files(x86) for 32 bit programs on 64 bit computers. The export script and the game itself must be in the same program files folder. To Install Eshme Import/Export script: Startup, YAGG and DAOTools add to C(disk):/Program Files/Autodesk/3dsmax/Scripts -> scripts If you did everything correctly, then at the first start, a window with settings will appear.
The Game Path should be the folder with the game: C:\Program Files (x86)\Dragon Age.. For the Export Path, make a folder in your Override folder- the one you put mods in, [local_disk_name]:\Documents and Settings\[user_name]\My Documents\BioWare\Dragon Age\packages\core\override\. This makes it easier to test it.
For scale, tick x100. This makes it much easier to work with them. Note, make sure any obj you import and export also uses the x100 scale, or whatever you are using. The toolset itself must be installed in the game folder, after that you can start working in 3 d Max -> Run Script.
Before closing, the configurator will inform us about the possibility to change the settings at any time, this is fine.
Exporting a template
The engine will not be able to work with a model larger than 45,000 polygons (Faces) and 30,000 vertices (Vertices).
First, pick an outfit with similar dimensions for the same race and class as the one you want to import for(see below). You will need the mmh, msh, phy and mao of the item. These can be extracted from the game’s erfs or using DATOOL if you have it.
In the Toolset, open the archives modelhierarchies.erf materialobjects.erf modelmeshdata.erf (you can find them at [game_disk_name]: \Dragon Age\packages\core\data). Also, open the texturepack.erf archive located at [game_disk_name]:\Dragon Age\packages\core\textures\high. If we want the female chantry robe: In these archives we find the files hf_rob_chaa_0.mmh, hf_rob_chaa_0.phy (modelhierarchies.erf) hf_rob_chaa_0.msh (modelmeshdata.erf) pf_rob_chaa.mao (materialobjects.erf) pf_rob_chaa_0d.dds, pf_rob_chaa_0n_dds, pf_rob_chaa_0s. .erf) and unpack it into a separate folder. In total, the output should be 8 files. If you are doing an object for a female, you will want to use tmp’s proportion fixes- copy his mmh and msh and let it overwrite the original ones you downloaded.
Run the DAOImport script. In the File section of the Model Import section, specify the location of the .mmh file we recently pulled out (hf_rob_chaa_0.mmh). Click on the Import button, a special window will notify us that it is ready for import, click OK and wait 5-30 seconds (depending on the power of the computer) until the model is loaded.
Select everything except the mesh then delete it. Save the model as an obj.
Preparing A Model
Pick the new item you want in Origins. If it is an Inquisition item, extract both the model and 4 textures(diffuse, normal, tint and spec) with Frosty mod manager. DAI mod manager extracts textures fine but can jumble or flip Uvs on models.
Open it in blender. Make sure to have ‘seperate groups’ ticked on the import, otherwise it will import with several different meshes layered inside it
The item needs to be should be one mesh object, all on the same UV map. If it is a Dragon age Inquistion item with skin showing, you will need to alter the UV map in Blender to combine them, as all the skin in DAI is on a separate material. DA:O has difficulty with multi mesh objects, and will only tint the mesh with higher priority in the mmh- very bad on objects with visible skin. It can cause difficulty elsewhere if you try and use it as a mesh replacer too, so it is best to combine the two textures into one UV map where possible.
Try not to rotate pieces, as keeping them in the same orientation means you can reuse the original’s normal map.
If you are porting a DA2 item or a single mesh DAI item that has no skin showing, you shouldn’t need to alter the UV.
Import the obj. you exported from dao. Flip your model to match it. Now either move the model into position with blender pose mode(if you exported a psk or a fbx model), or push it into place in Blender sculpt mode with the grab brush, to match the obj. you exported from the game.
You may want to check it has no gaps, merge redundant vertices and reset the normals to make it ready for editing.
Textures
If your UV map had skin and needed combining, export the UV map as a guideline. You can now move things around and create your texture in any program.
If you did not need to change the UV map the textures still need to be changed to meet the DA:O standard, with shading added, normal map converted and appropriate specular and tint maps created. Check various texture guides for more information.
Save them as .dds in GIMP, Photoshop or any other program that can make .dds files.
You should have textures with distinct unique names as placeholders at least- a diffuse, a normal, a spec and a tint.
3D MAX
Import the dragon age mmh you are using as a template. As before it will import with skeleton, glowing green boxes and collision bubbles, take care to move or delete none of these. Do not move the model from its starting position.
Import your own new item as an obj, in the correct scale matching the import scale (x100)
You may want to Poly> Weld polygons to make it easier to weight paint. Copy the skin modifier from the dragon age mmh. Paste it into the modifier list of your new mesh. It should now register as having absorbed the weighting, if you click Paint Weights to check. You can delete the template mmh now, it has served its purpose.
Use the Select and Link tool in the top left hand corner. Select your mesh. Draw a line from your mesh to the small green box between its feet. The box should glow upon connection. Return to the regular select tool to make sure you don’t link anything by accident. Run script> DAO ModelManager
The mesh will show up. Change its parameters to ‘mesh’ instead of Unknown. If you have done this correctly, there should be an option under Poly that contains a list of Dragon Age mesh options. Make sure Cast Runtime Shadow is ticked, or your item will not cast a shadow.
Your poly needs 3 modifiers in the following order(The other two can be found in the dropdown list.): 1)Skin 2) Unwrap UVW 3)Edit Normals
Alternate Method to skin the mesh
1) Import both the example mmh with the script, and your new obj. 1) Select your model. Right-click on an empty space->Convert To-> Convert To Editable Mesh 2) Select the mmh’s Skin and Edit Normals modifiers. Right Click, Cut 3) Switch to polygon editing mode
4) Press CTRL+A The entire original outfit should be in the red selection color. Next, you need to deselect a single polygon (done with the ALT key pressed). It doesn't matter which one it is, the main thing is that it should be visible and easy to get to. 5)Click the Delete button. This will delete the entire model, except for the one polygon we left behind. 6)Now we need to attach the new mesh to this polygon. To do this, select the Attach button on the toolbar on the right and click on the suit with the mouse. A window will appear, select the Match Material to Material IDs option. Click OK. 7)Now we need to remove the last polygon of the original robe. We again switch to the polygon editing mode (having previously “pressed” the attach button), find the polygon we once left and delete it. 5) Paste the cut modifiers in the list 6) Either reset the normals or add a new Edit Normals modifier
Weight Painting
If you have just copy/pasted the Skin modifier onto the mesh, it will probably have some weighting problems that will need to be touched up.
Run the import window again. Now, select the animation window. First you will need to export some test animations to make your life easier. For example, mh_m.mov_rf is the running animation and it has 3 files in the animations erf.
You can also import a test head, if you extracted all the base head files. (racegenderprefix_uhm_basa_0.mmh, racegenderprefix_uhm_bas_0.msh and so on) Tick Merge With Selected and you should be able to see how it reacts with a head in it. Make sure you delete it before exporting.
Now use Paint Weights button to edit anything that needs it.
If you want to do things very well and you used Blender pose mode to match the original mesh in blender, you can import that in as a fbx and do a bone weight transfer(under Utilities>Skin Utilties). This will get you very good weighting, as it was professionally done.
When you are done weighting the mesh, select everything in the scene especially any gizmos that may have moved far out of view. Go to timeline, select all the animation frames, right click Delete Selected Frames. This should snap everything back into default positions, ready to export.
Assign materials
On the top toolbar we find the material editor button (four multi-colored balls) Next, click Get Material and select Dragon Age Material from the list (if the plugin is installed correctly, it will be in the list)
In Material Type we specify what type of MAO semantic the item will need. For example 1 - Model with skin and transparent bits (fur robe for example) - [Armor w / Skin Tint][Alpha Blending][No Emissive]. 2- Skinless Model in Render Semantics – [No Tint][Alpha Blending][No Emissive].
Expand the list of Texture Maps and assign the appropriate textures. Next, Assign Material to Selection (the item should be selected). If you really want to see the texture in the editor, then click Show Map in Viewport. It remains only to give our material a normal name. In the corresponding field, enter pf_rob_chaz_0. That's all.
You can also select the LOD type. LOD2/3 don’t have normal maps and their maos are a little different in type. LOD MAOs also do not have transparency.
Expand the list of Texture Maps and assign the appropriate textures. Next, Assign Material to Selection (the item should be selected). If you want to see the texture in the editor, then click Show Map in Viewport.
You can always do all of this in Notepad later and change the file paths of everything, so it’s fine if you don’t have the right textures yet. You do need to apply a placeholder Dragon Age Material so the mesh will export correctly.
You can import a Dragon Age Mesh and use the eyedropper to sample its MAO and apply it to other items.
Export
To do this, run the DAOModelExport script. We will see a window like this:
Between Name and .MMH enter whatever your new item is named. You should call it something that works with the gda you have already set up. Between Name and .MSH, enter the same thing (if this was not done automatically). Check the Create MAO Material File option. That's it, now click Export. At the end of the export process, five new files should appear in the folder [local_drive_name]:\Documents and Settings\[username]\My Documents\BioWare\Dragon Age\packages\core\override\ hf_rob_chaa_0.phy hf_rob_chaa_0.msh hf_rob_chaa_0.mmh hf_rob_chaa_0.met pf_rob_chaz_0.mao Your textures should already be there. The model is ready, you can run the game and see the result.
LODS
Every item imports with its own skeleton. The LOD 0, 2 and 3 skeletons for the races are all different as they have different numbers of bones. You cannot export LOD0 skeleton for a LOD2, it will cause errors. To create, just import a LOD2 model (ends with _2.mmh) and repeat the steps. It does not matter how good the LOD2 weighting is, as it is only seen from a distance anyway. For a custom item with its own GDA, you only need a LOD2. For an item replacer that replaces a vanilla mesh, you will also need a LOD3. It is a good idea to create LOD2 as it stops the character deforming from a distance, such as in the party camp.
Hair And other Multi Mesh Items
Generally, a multi mesh item(merely attach more mesh chunks with skin modifiers to the same GOB) is not an ideal solution for modelling. This is because only the first mesh listed in the MMH will tint. This is obviously bad for any item with skin showing. Very few items in the game are multi mesh MMHs.
An exception is found in hair. Hair is made up of a scalp (HairM1), plus the hair(HairM2). Multiple hair chunks with the hair material will tint(The same applies to beards). Mod authors may often add accessories to hair- this usually shows up as HairM3, but the name given is not important. The Eshme script can sometimes jumble the order of these, so ensure they are the right way around or the scalp will not tint correctly. Deleting the scalp entirely can cause odd bugs with the shadows of the hair, so this is not recommended.
Transplanting MMH for separate armour chunks and tinting
Sometimes custom meshes have a bug where they hold the goblet upside down (see Ashhawk’s Goblet De-Gobbler - a Joining chalice fix and more https://www.nexusmods.com/dragonage/mods/5864) Custom armour/glove/boot sets may also have an issue where the gloves/boots do not tint.This is because the 3dsmax exporter slightly corrupts the MMH.
One way to get around this is to steal the MMH of a vanilla item OR tmp7704’s skeleton(tmp’s custom skeletons don’t have this issue, possibly because they were made with lightwave exporter)
You would export your mesh as normal (ef_cth_mymesh_0.msh), then delete the exported MMH, MET and PHY. You would find a vanilla or tmp7704 MMH and PHY, and then rename them ef_cth_mymesh_0.mmh and ef_cth_mymesh_0.phy. You would need to open them with DATOOL/PYGFF, find any internal references and change them to match, and also change the materialobject line to put in your custom MAO. - The .MMH has the name of the mmh, the msh, and also the same internal name as the original mesh (something like EF_ROB_CHAA_BodyM1) - The .PHY just has the name of the MMH in it. - We don’t need to bother with a .MET.
However, if your MSH’s skin modifier doesn’t have the same amount of bones as the original MMH, the item will warp and distort.
Weight your full body armour as you would usually, then Use utilities -> skin utilities to export the weighting (search 3ds max skin utilities to find tutorial videos about this). A colourful mesh will appear. You can delete the original skeleton and the none-glove parts of your mesh, then import in a glove from the vanilla game. Give your mesh the modifier from the vanilla glove mesh. Then import the weighting from your 'Skin utility' mesh. A prompt will appear, telling you to match up the bones. Do so. Your mesh should now have the original weighting your full body mesh did. Export the mesh. Find what was exported and delete the MMH. Go into the files and find the vanilla glove MMH. Copy the MMH, change all the names and internal references(including the mesh chunk, if you didn't give it the same name as the donor) to your new msh. The phy doesn't need to be replaced. Your glove should now tint. Remember if you try and match up a msh that has more bones listed in its Skin modifier, with a MMH that has less, the game will distort the mesh.
Bug Fixes
If something isn’t tinting, you may need to open the .mmh in the toolset, find the field Material Library and make sure it is empty. All your LODs(you did make LODs right?) need to be the same 'material type' as the main one or they won't tint- aka RobeM1, CLothesM1 and so on. Capitalization does matter.
You can have more than one mesh chunk in an outfit mmh, but only the top billed one will tint at all, so make sure you put anything with skin at the top.
If your character using tmp proportion has long grotesque hands, you may need to get a vanilla phy and rename it to replace the exported phy. (one that is similar, a boot for a boot and so on)
If something is glowing green and t-posing, your mao is either not connected properly, not connected at all, or missing a texture.
If your item is exporting blank, make sure it is connected to the GOB, checking by launching the DAO Model Manager script.
If your item is losing verts in the export, make sure you are exporting it as what it imported in as- so if you are replacing a hair, export it as a hair. You can rename the msh and mmh and change the file references in the toolset or pygff later.
Useful links
- How to set up a mesh for Eshme’s script
- Similar tutorial, How to add new armor to DAO
- Guide to 3ds max Weight Painting Mike Pickton
- Painting Weights 3ds Max tutorial
- Add a weapon with 3ds max Mike Pickton
- Adding Custom Armor to Game in Toolset Mike Pickton- explains GDAS, file naming
- Customisation of original Dragon age armor
- Adding custom shield tutorial
- Adding custom level tutorial - Add your own level. Contains explanation of adding props with Eshme script
- How to fix GDA conflict
- Item Variation ID spreadsheet modification
- How to configure import script for GMAX
- Skinning Example video
- Crinoline example video
- Own modifications video
- Learn Blender for beginners tutorials
- Converting hair to DAO with blender 2.49
- DAO texture guide
Language: | English • русский |
---|