The vanilla game comes with a variety of face tattoos for all races, and there are various threads discussing the process by which you can make your own custom ones. This is a fairly straightforward process, and there are a number of custom face tattoo mods floating around. However, these face tattoos don’t extend onto the scalp, which is problematic for those wanting bald characters with either scalp or full head tattoos. The reason is because the face is a separate mesh from the scalp/hair, as you can see here:

What this means is that full head tattoos require a two-part texture, one for the face and one for the scalp. That’s not necessarily a problem in principle, but it’s made difficult by two factors. The first is the inconsistent polygon flow and UV mapping of the two different meshes, and the second is the fact that the game is not set up to utilise tattoo masks for the scalp as it is for the face. What this boils down to is that you need to make a custom diffuse texture for your tattoo and make a custom scalp model so that the default one isn’t overridden.
The first step is to locate and extract the appropriate model files for the scalp of interest. There are two sets of files we need, MMH and PHY files, named as follows:
XX_har_blda_Y.mmh and XX_har_blda_Y.phy
Where XX =
df (Dwarf female)
dm (Dwarf male)
ef (Elf female)
em (Elf male)
hf (Human female)
hm (Human male)
qm (Qunari male)
and Y =
0 (highest LOD)
2 (mid LOD)
3 (lowest LOD)
So for a given race and gender there are 6 files, 3 x MMH and 3 x PHY. For this example I’ll be using a Human male. The required files in this case are:
hm_har_blda_0.mmh
hm_har_blda_2.mmh
hm_har_blda_3.mmh
hm_har_blda_0.phy
hm_har_blda_2.phy
hm_har_blda_3.phy
You can find these files inside <install directory>\packages\core\data\modelhierarchies.erf which you can open either via the standalone ErfEditor.exe or the Toolset. Select the required files, then right click and choose Extract Resource. In the pop-up folder browser, choose somewhere to save them and click OK.
In addition, we also need to extract the textures and MAO files. Fortunately, scalp meshes for all races and sexes share a common texture set, meaning you only need to extract this one set of files regardless of which race and gender the tattoo is for. The first are the MAO files. They are located in <install directory>\packages\core\data\materialobjects.erf, the files required being pn_har_bld.mao, pn_har_bld_l2.mao and pn_har_bld_l3.mao. For textures, we only require the diffuse, as the vanilla normal, specular and tint maps can be utilised as-is. Find and extract pn_har_blda_0d.dds in <install directory>\packages\core\textures\high\texturepack.erf. You will also see the LOD2 and LOD3 diffuse textures, pn_har_blda_0dl2.dds and pn_har_blda_0dl3.dds, but we don’t need those.
You now have all the base game files you need. However, you’ll also want to download these UV maps to use as guides for your custom textures:

A particular point to note here is that models in Bioware games have traditionally always had pretty ropey UV maps, and the models in DA are no exception. The scalp mesh UV map has a couple of issues which will impact custom tattoo textures, as illustrated here:

You can see there are two areas of concern. The first (and the biggest problem area) is the first few rows of polygons along the forehead. The UVs for this area are stretched, meaning that any image in this area will end up compressed when applied to the mesh. Conversely, the area at the back of the head has compressed UVs (although only mildly so), meaning an image in this area will end up being stretched when applied to the mesh. There are also varying levels of UV stretching and compression for the polys between these two areas. These issues will need to be compensated for, especially if you are trying to produce very precise geometric designs. The scalp mesh really needs to be remapped, or ideally a new mesh made from scratch to match the face mesh’s polygon flow. This is something I may possibly address myself at some point in the (distant) future if I have time, but don’t hold your breath. In the meantime, expect a lot of trial and error tweaking to get your texture looking the way you want it in-game.
Open pn_har_blda_0d.dds in your image editor of choice, such as Photoshop or the like. Change the resolution to 1024x1024. Create a new layer above it and paste the UV map. Change the opacity to around 30% so it’s superimposed over the texture and can act as a guide. Now create a new layer and add your tattoo artwork. Once you are satisfied, save a master version (PSD or the like), then hide or delete the UV map layer, flatten the image and save the texture as a new DDS file. You’ll need to give it a custom name, but you’ll want to stick to the existing naming convention to make your life easier in the Toolset. An example of something suitable is pn_har_bldat1_0d.dds. Once that is done, reduce the resolution to 512x512 and save it out as the LOD2 version (e.g. pn_har_bldat1_0dl2.dds) and then reduce it to 256x256 and save out the LOD3 version (e.g. pn_har_bldat1_0dl3.dds). Here’s a very quick and dirty example I whipped up:

I will add at this point that if you are conversant with a 3D modelling app such as Max etc. that you will considerably reduce the amount of time tweaking the texture takes by loading a suitable head model and seeing how various changes look on-the-fly (as I have done for these example shots). While this is in no way mandatory, testing exclusively via the Toolset is a significantly more fiddly and time consuming approach.
Now that we have suitable textures, it’s time to make some custom MAOs. Open the LOD0 file pn_har_bld.mao in your text editor of choice (the free Notepad++ is worth considering). You’ll see a whole lot of info using XML syntax. There are 2 lines we need to edit, and 2 we need to delete. The two that need editing are MaterialObject Name and mml_tDiffuse. For the first, simply change the value to match the first part of your custom texture name (e.g. PN_HAR_BLDT1) and for the second, change it to your texture’s full filename (e.g. pn_har_bldat1_0d.dds). Next, completely delete the two lines labelled mml_tBrowStubble and mml_tBrowStubbleNormal. Now save it as a new file using the name you used for MaterialObject Name (e.g. pn_har_bldt1.mao). Now open pn_har_bld_l2.mao. You’ll see that there are fewer lines this time, however the lines we need to edit remain the same (with the exception that there is no mml_tBrowStubbleNormal). Edit them as before, but with the addition of the LOD2 suffix (e.g. PN_HAR_BLDT1_L2 and pn_har_bldat1_0dl2.dds). Save it as a new file with an appropriate filename (e.g. pn_har_bldt1_l2.mao). Rinse and repeat for the pn_har_bld_l3.mao with the appropriate LOD3 suffixes (e.g. PN_HAR_BLDT1_L3, pn_har_bldat1_0dl3.dds, pn_har_bldt1_l3.mao). Note: you will see a line called mml_tTattooMask. This is because hair MAOs are based on the same source material used for faces. Just ignore it.
The final step is to produce the custom model files. We are not touching the physical mesh, we are just creating a new set of associated files (controlling animations, collision, etc) that reference that mesh, essentially creating, as far as the game is concerned, a whole new model. Open the LOD0 MMH file (e.g. hm_har_blda_0.mmh) in either the standalone GffEditor.exe or the Toolset. Right click and choose Expand All. There are a couple of lines we need to edit. The first is right at the top – MMH_NAME. Double click on the filename in the Value column to the right in order to edit it. Change it to the same custom filename you used for your textures and MAOs (e.g. hm_har_bldat1_0.mmh). Now scroll right down to the bottom and look for the line MMH_MATERIAL_OBJECT. Change the value to that of your LOD0 MAO (e.g. pn_har_bldt1). Save it using the same filename that you used earlier (e.g. hm_har_bldat1_0.mmh). Now do the same for the LOD2 and LOD3 MMHs, using the appropriate LOD suffixes (e.g. hm_har_bldat1_2.mmh, pn_har_bldt1_l2, hm_har_bldat1_3.mmh, pn_har_bldt1_l3). Now do the same for the PHY files, although here you only need to change the values for MMH_NAME at the top of each file, using the appropriate MMH filenames from the files you just saved. Note: hair models don’t actually need PHY files, but it is a good practice to get into in case you are ever making custom models that do require them.
You should now have everything you need to try a test in the Toolset. Before loading the Toolset, you’ll need to copy across all your files to the Override folder so it can find them. Go to My Documents\BioWare\Dragon Age\packages\core\override\ and create a new folder with an appropriate name (e.g. Custom Scalp Tattoo). The name isn’t important, it just helps keeps things a bit tidier. Once that is done, load the Toolset. Go to File->New->Morph to open up the head morph editor. In the drop-down menu on the toolbar, choose the appropriate base model for the race and sex of your custom scalp (in this case, HM_UHM_BASa_0 for Human male). Change to tab 02, Part Selection, and look for section 2, Parts. You’ll see item 5 is the hair mesh. Select that and click on the button to open the file browser. Find your custom scalp model (see why we stuck to naming conventions?) and click OK. Assuming everything went smoothly, you should now see your tattoo:

If things didn’t go smoothly, make sure that you have all the necessary files in the Override folder and that all the filenames referenced in the MAOs and MMH/PHYs match the actual filenames. I’ll include the tutorial sample files below, so if you have problems download those and compare them to your own.
Now that you have your tattoo finalised and working, you are ready to get it into the game. You have two options here. The first is to make a custom head preset that you can load in the Character Creator. This has been covered elsewhere, so I won’t go over it here in detail, but the basic process is to create a morph to your taste in the Toolset and then export it as a MOP. Then edit chargenmorphcfg.xml and add the name of your MOP to the appropriate race and gender’s preset list (the <heads> section), remembering that there can only be one copy of chargenmorphcfg.xml in the Override (so if you have a mod like “Pineappletree's Vibrant Colors” then edit the one that came with it). You should then be able to choose your custom preset in the Character Creator. The second option is to add your custom scalp to the hair model list in chargenmorphcfg.xml, which will make it selectable in the Character Creator just like any other hairstyle. Be aware however that this option is really only useful for tattoos that are confined to the scalp mesh. If you want to have a full head tattoo you are far better off making a custom head preset that utilises a custom face diffuse texture. The reason for this is that you can’t add additional face textures or additional face tattoo masks to the Character Creator, only replace existing ones.
Either way, once you have chosen the option you prefer, load up the game and see how it looks. Here’s the sample scalp tattoo from earlier as a head preset in the Character Creator, along with a two part face/scalp tattoo you might recognise that will be making an appearance in a certain upcoming mod:

For those interested, I have put together the files I used for the above example. You can grab them here: http://social.biowar...ect/2639/#files
Modifié par DarthParametric, 29 avril 2010 - 11:02 .





Retour en haut









