We'll start with our test subject, a human male noble that is an outstanding example of manliness named, appropriately enough, Bruce:

The first step is to extract the MOR from one of his save files. We'll use NewByPower's DA Face Replacer for this. I won't cover the specifics of how to use it, check the readme or various forum posts for that. The short version is you choose the save file as the source, a new face as the destination, then export. And voilà, one newly extracted MOR.
If you open the MOR in the GFF editor (either the toolset's or the standalone one), and look under the MORPH_NODES section, you'll find one labelled FaceM1 (node 2 in this example, but the actual number may vary for different sex/race combos). What we are looking for here is the MESH_STREAM_VERTEXDATA sub-node. As the name suggests, this is the vertex data for the face mesh, i.e. the vertex co-ordinates. The problem is, there is no apparent way in the GFF editor to easily extract this data, and copying and pasting it one value at a time would be ridiculously impractical (there are 9,128 individual values for a human male face mesh).

So Bioware's GFF editor won't do the job. Next we turn to pyGFF. Open the MOR with editor.exe and you'll see much the same thing as before. Again, there's no apparent way to simply copy and paste the data we need. But there is a workaround. Here's where things start to get messy. First, find the MESH_STREAM_VERTEXDATA sub-node of FaceM1. Once you have located it, you can manually select every other node one at a time and hit delete. This is necessary to prevent pyGFF erroring out in the next step. You should be left with something like this:

Now you can go to File->Save As and change the file type drop down to YAML (make sure to change the file extension in the filename box as well, as pyGFF doesn't seem to do it automatically). Once that is done, you can close pyGFF (without saving the MOR). Open the new YAML file with a text editor. As ever, I recommend Notepad++ for its superior functionality (and wide array of additional plugins). At the top of the file you'll see a bunch of information about the various nodes. All we want however is the vertex data. Select everything else and delete it. Make sure to scroll down to the bottom and get the superfluous lines there as well. If you have a human male head, you should have 9,128 lines, each with a single numerical value. Other race/sex combos will have slightly different numbers. You'll see that each number is preceded by some additional garbage that we don't want; two spaces, a dash, then another space. You can simply do a find and replace (Search->Replace in N++) and choose to replace that string with nothing to get rid of it. Save the resultant cleaned up data as a plain TXT file.
So, we've overcome the first major hurdle. We have the raw morph vertex data extracted from our MOR. The next step is to reconstitute it into something we can work with. We need to start by converting this data into the game model format, a MSH/MMH/PHY set. In order to do that, we'll take advantage of a method I described previously in the taller elves thread. Rather that repeat myself, I'll just direct you to the first post on page 2 where I describe how to extract a base head model and generate XML files for it. Choose the head of the appropriate sex/race for your morph, and then follow the steps detailed there until you reach the part where you need to paste in new vertex data.
That process was fairly straightforward. However, there's a problem in this instance with our vertex data. In our human male noble example, our data is 9,128 lines, one value per line. As some of you may have noticed, when looking at the MOR in the GFF editor there was a node named MESH_STREAM_VERTEXCOUNT with a value of 2,282, which matches the number in the XML file. That is the actual number of vertices in our face mesh. The amount of data we have is exactly 4 times that number, which is no coincidence. Vertices (and other related values, like normals, etc.) are specified as a float4, which basically means a single vertex is defined by an matrix of 4 values. The first three values are positional data in 3d space, while the 4th value is always 1.0 (for vertices at least. Anything that is a vector needs a 0 value. It's all about matrix transformations, light years beyond the scope of this post). So, the problem is that we have a dataset that is in a single column but needs to be transposed into 4 columns, with each row derived from 4 consecutive values. If this was a handful of data, we could just do it manually, but as with extracting the data in the first place, with over 9,000 lines of data, doing it manually is completely impractical.
There are a few different ways to approach the problem. The best way would be for someone to write a custom program to do it (well, perform the whole process really, and if anyone wants to volunteer, feel free). Trying to do it in Excel would be an obvious route, although I couldn't get it to work with vanilla Excel (there are some addons/plugins however that appear to do it, generally commercial though). An IT friend helped me out by suggesting Powershell, a commandline set of tools bundled with Windows (as of 7), and providing a code snippet to do the job. Go to the Start menu->Run, type in powershell and hit enter. A console window will pop up. Now paste in the following (change the values to the path and filenames you are using):
$x = Import-Csv "E:\\Temp\\Vertex_Data_RAW.txt" -Header Data -delimiter ' '
for($i=0; $i -lt $x.Count; $i++){$out += $x[$i].Data; if(($i + 1) % 4 -eq 0){$out += "`n"}else{$out += ' ' } }
$out | Out-File "E:\\Temp\\Vertex_Data_OUT.txt"
And hit enter. There will be a slight pause at the second line while it processes all the data, after which the last last line will pop up. Hit enter once again to finish and get to a new prompt. You can now close the Powershell window. If you look in the output directory, you should see the output file you specified. As an example, if we feed in a test file with just the first 16 lines of data, like this:3.71073838323e-10 0.0610870011151 1.52558004856 1.0 9.1121182777e-06 0.153705343604 1.70198023319 1.0 -1.92087463802e-06 0.137376964092 1.66151988506 1.0 -7.21627293387e-06 0.133858963847 1.64632999897 1.0The resultant output is:
3.71073838323e-10 0.0610870011151 1.52558004856 1.0 9.1121182777e-06 0.153705343604 1.70198023319 1.0 -1.92087463802e-06 0.137376964092 1.66151988506 1.0 -7.21627293387e-06 0.133858963847 1.64632999897 1.0Rearranged as 4 rows of 4 columns, exactly the format we need. So, now we have the vertex data properly formatted, we can copy and paste it into the mesh XML file, as described in the taller elves thread linked to earlier. Once that is done, resume with the procedure described in that thread, processing the XML files and importing them into Max/GMax. So, now we have our extracted morph as a mesh in Max/GMax, like so:

Note that I have hidden the rig and collision objects in that pic, for the sake of clarity.
The final stage is to get the face mesh back into the toolset's morph editor. To facilitate that, we need to export our face mesh from Max/GMax with the same filename as the base head mesh of the appropriate sex/race (i.e. the one you used to generate the donor XML above). In this example I'm using a human male head, so the appropriate filename hm_uhm_basa_0 for the MMH/PHY and hm_uhm_bas_0 for the MSH. Eshme's exporter gives the option to have a different name for the MSH, so just tick that box in the export window. Export the models from Max/GMax and put them in My Documents\BioWare\Dragon Age\packages\core\override. You can create a new sub-directory for them to keep things tidy if you want.
Now it's time to open the toolset. Open the morph editor (File->New->Morph) and choose the appropriate sex/race. Fingers crossed, instead of the original base head you should see your morph, like so (you may wish to employ this for dramatic effect):

Success! You can now tweak the parameters of your face. However, before getting too excited, be aware that you will likely have a much more limited range of customisation than you would with a typical morph. A lot of sliders will be greyed out and unusable. I'm guessing this is because the new base head vertices don't match their expected positional values. I'm not sure, but it's better than the likely alternative (i.e. a toolset crash). Anyway, play around as you see fit. Here's what I did to my head:

Save an MRH and Post to Local as you normally would in order to create a new MOR. Now you can use DA Face Replacer once again to transplant the new morph back into your save file. Make sure once you have finished that you remove the temporary base head models from the Override folder. Here's my modified morph in-game:

I've uploaded the source files from this example here for anyone that is interested. Additionally, here are the base head models for every player sex/race.





Do góry













