Difference between revisions of "Porting hairs to Fallout"

From Nexus Mods Wiki
Jump to: navigation, search
m (Small typo I noticed.)
m (Updated links.)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
==Overview==
+
 
This tutorial shows all the main steps you need to follow to port a hair from another game to Fallout 3.  
+
== Overview ==
 +
 
 +
This tutorial shows all the main steps you need to follow to port a hair from another game to Fallout 3.
  
 
If you create a hair from scratch, apart from the steps explained here you will have to create the hair mesh, its UV map and its textures.
 
If you create a hair from scratch, apart from the steps explained here you will have to create the hair mesh, its UV map and its textures.
  
:'''''Note:''' If you are porting the hair to distribute it you must ask permission first to the original author of the hair, and always credit him for his work''
+
:'''''Note:''' If you are porting the hair to distribute it you must ask permission first to the original author of the hair, and always credit him for his work''  
  
 
== Required tools ==
 
== Required tools ==
* [http://www.blender.org/ Blender]
+
 
* [http://www.gimp.org.es/ GIMP]
+
*[https://www.blender.org/ Blender]  
* [http://www.niftools.org/ Nifskope]
+
*[https://www.gimp.org GIMP]  
* [http://fallout.bethsoft.com/eng/downloads/geck.html GECK]
+
*[http://www.niftools.org/ Nifskope]  
 +
*[https://geck.bethsoft.com/index.php?title=Main_Page GECK]  
  
 
== Porting a hair to Fallout ==
 
== Porting a hair to Fallout ==
 +
 
The main steps to follow when porting hairs to Fallout are:
 
The main steps to follow when porting hairs to Fallout are:
# Importing into Blender the Fallout head mesh and the hair mesh
+
 
# Modify the hair mesh to fit Fallout head mesh
+
#Importing into Blender the Fallout head mesh and the hair mesh  
# Export the hair mesh
+
#Modify the hair mesh to fit Fallout head mesh  
# Modify the hair textures
+
#Export the hair mesh  
# Adjust the hair mesh in NifSkope
+
#Modify the hair textures  
# Create an egm file
+
#Adjust the hair mesh in NifSkope  
# Add the hair to the game using the GECK
+
#Create an egm file  
 +
#Add the hair to the game using the GECK  
  
 
=== Importing into Blender the Fallout head mesh and the hair mesh ===
 
=== Importing into Blender the Fallout head mesh and the hair mesh ===
[[File:Armour_1_Importing.jpg|right|thumb|Importing a mesh into Blender]]
+
 
 +
[[File:Armour 1 Importing.jpg|thumb|right|Importing a mesh into Blender]]
  
 
First step is to import the head mesh you want to work with. In Fallout there are several head meshes depending on the age and gender of the charaters (there is even a different head mesh for ghouls). Head meshes are usually located in the \Data\Meshes\characters\head\ folder.
 
First step is to import the head mesh you want to work with. In Fallout there are several head meshes depending on the age and gender of the charaters (there is even a different head mesh for ghouls). Head meshes are usually located in the \Data\Meshes\characters\head\ folder.
  
 
The head meshes of player characters are:
 
The head meshes of player characters are:
* headhuman.nif: head mesh for male characters  
+
 
* headfemale.nif: head mesh for female characters  
+
*headhuman.nif: head mesh for male characters  
 +
*headfemale.nif: head mesh for female characters  
  
 
Import the head mesh you want to adapt the hair for using the menu option ''File -> Import -> Netimmerse/Gamebyro (.nif)''
 
Import the head mesh you want to adapt the hair for using the menu option ''File -> Import -> Netimmerse/Gamebyro (.nif)''
  
:'''''Notes:'''''
+
:'''''Notes:'''''  
: ''* The meshes and textures of the game are inside compressesd files with BSA format. To extract then you can use the "BSA Browser" utility that comes with [http://www.fallout3nexus.com/downloads/file.php?id=640 Fallout Mod Manager].''
+
:''* The meshes and textures of the game are inside compressesd files with BSA format. To extract then you can use the "BSA Browser" utility that comes with [https://www.nexusmods.com/fallout3/mods/640 Fallout Mod Manager].''  
: ''* If you cannot find that option it is because you haven't installed NifScripts. Follow the instructions given here: [[Installation_of_Blender|Installation of Blender]] to install everything you need.''
+
:''* If you cannot find that option it is because you haven't installed NifScripts. Follow the instructions given here: [[Installation_of_Blender|Installation of Blender]] to install everything you need.''  
  
 
Then import the hair mesh of the hair you want to port to Fallout using the same menu option (if it is a nif file) ''File -> Import -> Netimmerse/Gamebyro (.nif)'' or the option that corresponds to the format of the mesh you are importing.
 
Then import the hair mesh of the hair you want to port to Fallout using the same menu option (if it is a nif file) ''File -> Import -> Netimmerse/Gamebyro (.nif)'' or the option that corresponds to the format of the mesh you are importing.
  
 
=== Modify the hair mesh to fit Fallout head mesh ===
 
=== Modify the hair mesh to fit Fallout head mesh ===
[[File:PortHair1_imported_hair.jpg|right|thumb|Imported hair mesh]]
+
 
[[File:PortHair2_modified_hair.jpg|right|thumb|Modified hair mesh]]
+
[[File:PortHair1 imported hair.jpg|thumb|right|Imported hair mesh]] [[File:PortHair2 modified hair.jpg|thumb|right|Modified hair mesh]]
  
 
Once you have imported the hair, you'll probably see that it doesn't fit the head as in the example shown in picture ''Imported hair mesh''. To fix this work in Edit mode. Select all vertices of the hair (press A once or twice to select them all) and move them and scale them as required until the hair fits the head mesh. Try to fix the hair mesh by selecting all vertices at the same time: this way you'll keep the shape of the original hair. Only if needed work with some of the vertices (to get them out of the head, for example), but be careful and try to keep these modifications to the minimum.
 
Once you have imported the hair, you'll probably see that it doesn't fit the head as in the example shown in picture ''Imported hair mesh''. To fix this work in Edit mode. Select all vertices of the hair (press A once or twice to select them all) and move them and scale them as required until the hair fits the head mesh. Try to fix the hair mesh by selecting all vertices at the same time: this way you'll keep the shape of the original hair. Only if needed work with some of the vertices (to get them out of the head, for example), but be careful and try to keep these modifications to the minimum.
  
: '''''Note:''' don't move or rotate the hair mesh in Object mode because you want your hair to have the same center than the Fallout hair in Object mode. Do all required modifications in Edit mode.''
+
:'''''Note:''' don't move or rotate the hair mesh in Object mode because you want your hair to have the same center as the Fallout hair in Object mode. Do all required modifications in Edit mode.''  
  
 
=== Export the hair mesh ===
 
=== Export the hair mesh ===
[[File:PortHair3_export.jpg|right|thumb|Exporting the hair mesh]]
+
 
 +
[[File:PortHair3 export.jpg|thumb|right|Exporting the hair mesh]]
  
 
To export the hair mesh:
 
To export the hair mesh:
# In Object mode select the hair mesh.  
+
 
# Press the Ctrl + A keys and select the option ''Scale and Rotation to ObData'' from the pop up menu.  
+
#In Object mode select the hair mesh.  
# Keeping the hair mesh selected, select the menu option ''File -> Export -> NetImmerse/Gamebyro'', enter the name of the nif file for your hair (for example Hair.nif) and the folder where you want to save it.  
+
#Press the Ctrl + A keys and select the option ''Scale and Rotation to ObData'' from the pop up menu.  
# Set the exporting parameters as shown in the picture ''Exporting the hair mesh''. It is important that the parameters are set like this:  
+
#Keeping the hair mesh selected, select the menu option ''File -> Export -> NetImmerse/Gamebyro'', enter the name of the nif file for your hair (for example Hair.nif) and the folder where you want to save it.  
## Fallout 3 -> selected  
+
#Set the exporting parameters as shown in the picture ''Exporting the hair mesh''. It is important that the parameters are set like this:  
## Stripify geometries -> deselected  
+
##Fallout 3 -> selected  
## Smoothen Inter-Object Seams -> deselected  
+
##Stripify geometries -> deselected  
## Flatten Skin -> deselected  
+
##Smoothen Inter-Object Seams -> deselected  
## Export Skin Partition -> deselected  
+
##Flatten Skin -> deselected  
# Press the OK button and wait until Blender finishes saving the nif file.  
+
##Export Skin Partition -> deselected  
 +
#Press the OK button and wait until Blender finishes saving the nif file.  
  
 
=== Modify the hair textures ===
 
=== Modify the hair textures ===
 +
 
Hairs in Fallout use three different texture files:
 
Hairs in Fallout use three different texture files:
* .dds file: diffuse map. This image file contains the painted hair and accesories (ribbons, hats, etc)
 
* _n.dds file: normal map. Fallout uses this file to give sense of volume to the hair and also influences how bright it will be seen in game.
 
* _hl.dds file: this image file tells Fallout waht parts of the hair mesh are colourable. Your hair requires this file to be colourable in game.
 
  
====.dds image file====
+
*.dds file: diffuse map. This image file contains the painted hair and accesories (ribbons, hats, etc)
 +
*_n.dds file: normal map. Fallout uses this file to give sense of volume to the hair and also influences how bright it will be seen in game.
 +
*_hl.dds file: this image file tells Fallout waht parts of the hair mesh are colourable. Your hair requires this file to be colourable in game.
 +
 
 +
==== .dds image file ====
 +
 
 
Usually Fallout hairs look better if you take off all the colour of this image file. To do this:
 
Usually Fallout hairs look better if you take off all the colour of this image file. To do this:
# Open the texture file of the hair you are porting to Fallout in GIMP
 
# If it contains something that doesn't have to be colourable in game (like a ribbon or a hat) select everything except that part
 
# Select the menu option ''Colors -> Desaturate'' and select any of the three options (Lightness, Luminosity or Average)
 
# Save the image file as dds as this is the image format that the game requires. As hair textuures usually use transparency, save it as DTX3 or DTX5. Make sure that the Generate mipmaps flag is marked when you save the texture.
 
  
====_n.dds image file====
+
#Open the texture file of the hair you are porting to Fallout in GIMP
[[File:Sword_7_Normal_map.jpg|right|thumb|Normal map window]]
+
#If it contains something that doesn't have to be colourable in game (like a ribbon or a hat) select everything except that part
 +
#Select the menu option ''Colors -> Desaturate'' and select any of the three options (Lightness, Luminosity or Average)
 +
#Save the image file as dds as this is the image format that the game requires. As hair textuures usually use transparency, save it as DTX3 or DTX5. Make sure that the Generate mipmaps flag is marked when you save the texture.
 +
 
 +
==== _n.dds image file ====
 +
 
 +
[[File:Sword 7 Normal map.jpg|thumb|right|Normal map window]]
  
 
This step is exactly the same than the one explained in the tutorial [[Creating_a_sword_for_Fallout|Creating a sword for Fallout]] because it doesn't matter the mesh you are working with: you will create the normal maps following the same steps.
 
This step is exactly the same than the one explained in the tutorial [[Creating_a_sword_for_Fallout|Creating a sword for Fallout]] because it doesn't matter the mesh you are working with: you will create the normal maps following the same steps.
  
 
You can create the normal map from the dds texture you've saved before, to do it this way just follow these steps:
 
You can create the normal map from the dds texture you've saved before, to do it this way just follow these steps:
# Select ''Colors -> Color to alpha'' and then select black or 000000 as the source colour.
 
# Select ''Filter -> Map -> Normalmap''. A window will pop up like the one shown in the ''Normal map window'' picture.
 
## pressing 3d preview you will be able to see in another screen how the changes in the parameters give more or less deep to the normal map.
 
## select the ''Wrap'' flag and change the value of ''Height source'' to Alpha.
 
## select a filter (I usually select 3x3 but you can try different filters and see which one works better for you)
 
## modify the scale value to add more or less deep to the normal map (I usually set this to 3 or 4)
 
## Press the OK button and the image will show now a blueish look: this is the normal map. Save it with the same name than your texture file + the _n.dds extension and choose the DTX5 compression. Make sure that the ''Generate mipmaps'' flag is selected when saving it.
 
  
:'''''Note:''' In Fallout light colours look very bright, and often they look too shiny. If you want to make your textures less shiny:''
+
#Select ''Colors -> Color to alpha'' and then select black or 000000 as the source colour.
:*'' make your textures a little darker: for example, don't paint white parts in white but in a light grey.''
+
#Select ''Filter -> Map -> Normalmap''. A window will pop up like the one shown in the ''Normal map window'' picture.
:*'' make the normal map a little more transparent: if you are generating them from the textures, you can try the following:''
+
##pressing 3d preview you will be able to see in another screen how the changes in the parameters give more or less deep to the normal map.  
:**'' before generating the normal map, add a black layer to the texture and merge it with the texture using a % of opacity (like 50%, or 25%).''
+
##select the ''Wrap'' flag and change the value of ''Height source'' to Alpha.
:**'' merge down the black layer onto your original texture and then generate the normal map.''
+
##select a filter (I usually select 3x3 but you can try different filters and see which one works better for you)
 +
##modify the scale value to add more or less deep to the normal map (I usually set this to 3 or 4)
 +
##Press the OK button and the image will show now a blueish look: this is the normal map. Save it with the same name than your texture file + the _n.dds extension and choose the DTX5 compression. Make sure that the ''Generate mipmaps'' flag is selected when saving it. 
  
====_hl.dds image file====
+
:'''''Note:''' In Fallout light colours look very bright, and often they look too shiny. If you want to make your textures less shiny:''
[[File:PortHair4_hl_channels.jpg|right|thumb|_hl.dds file colour and alpha channels]]
+
:*''make your textures a little darker: for example, don't paint white parts in white but in a light grey.''
 +
:*''make the normal map a little more transparent: if you are generating them from the textures, you can try the following:''
 +
:**''before generating the normal map, add a black layer to the texture and merge it with the texture using a % of opacity (like 50%, or 25%).''
 +
:**''merge down the black layer onto your original texture and then generate the normal map.''   
  
This kind of image files are only used by hairs in Fallout. This image file controls waht part of the hair mesh is colourable. If part of your hair mesh doesn't have to be colourable (as a ribbon or a hat) you have to paint that part of the alpha channel of this image in black (opaque) as shown in picture ''_hl.dds file colour and alpha channels''. White parts (transparent) of the alpha channel of this image file will be coulourable.
+
==== _hl.dds image file ====
  
: '''''Note:''' In GIMP, if you are looking at the Alpha channel on the Channels dialog window, colours are reversed, i. e. there you'll see opaque parts of the image painted in white and transparent parts in black.''
+
[[File:PortHair4 hl channels.jpg|thumb|right|_hl.dds file colour and alpha channels]]
 +
 
 +
This kind of image files are only used by hairs in Fallout. This image file controls waht part of the hair mesh is colourable. If part of your hair mesh doesn't have to be colourable (as a ribbon or a hat) you have to paint that part of the alpha channel of this image in black (opaque) as shown in picture ''_hl.dds file colour and alpha channels''. White parts (transparent) of the alpha channel of this image file will be coulourable.
 +
 
 +
:'''''Note:''' In GIMP, if you are looking at the Alpha channel on the Channels dialog window, colours are reversed, i. e. there you'll see opaque parts of the image painted in white and transparent parts in black.''  
  
 
In this example, the right bottom part of the image corresponds to a ribbon that doesn't have to change its colour in game when you change the coulour of your character's hair, and that is why that part of the alpha channel is completely black.
 
In this example, the right bottom part of the image corresponds to a ribbon that doesn't have to change its colour in game when you change the coulour of your character's hair, and that is why that part of the alpha channel is completely black.
Line 107: Line 123:
  
 
=== Adjust the hair mesh in NifSkope ===
 
=== Adjust the hair mesh in NifSkope ===
[[File:PortHair5_NoHat.jpg|right|thumb|Hat and NoHat NiTriShapes]]
+
 
 +
[[File:PortHair5 NoHat.jpg|thumb|right|Hat and NoHat NiTriShapes]]
  
 
Each Fallout hair mesh is actually made of two meshes: a mesh that is equipped by your character when wearing a hat (the mesh in the NiTriShape called ''Hat'') and a mesh that is equipped by your character when not (the mesh in the NiTriShape called ''NoHat''), as shown in picture ''Hat and NoHat NiTriShapes''. The NiTriShapes must be called Hat and NoHat for the game to choose the right one when your character equips a hat (hat, helmet, cowl, etc).
 
Each Fallout hair mesh is actually made of two meshes: a mesh that is equipped by your character when wearing a hat (the mesh in the NiTriShape called ''Hat'') and a mesh that is equipped by your character when not (the mesh in the NiTriShape called ''NoHat''), as shown in picture ''Hat and NoHat NiTriShapes''. The NiTriShapes must be called Hat and NoHat for the game to choose the right one when your character equips a hat (hat, helmet, cowl, etc).
  
You can create a mesh for your character when wearing a hat by editting the hair you are porting in Blender, modifying the top and sides of the hair mesh until they are very close or even into the head (the part of the hair that is going to be covered by the hat) or use one of the existing vanilla hair meshes.  
+
You can create a mesh for your character when wearing a hat by editting the hair you are porting in Blender, modifying the top and sides of the hair mesh until they are very close or even into the head (the part of the hair that is going to be covered by the hat) or use one of the existing vanilla hair meshes.
  
 
If you are using a vanilla Hat mesh:
 
If you are using a vanilla Hat mesh:
# Open two NifSkope instances. In one of them load the nif file that contains the hair mesh you are porting to Fallout (Hair.nif in the example) and in the other one open the nif file of a vanilla hair mesh.
+
 
# In the vanilla hair mesh, delete the ''Hat'' NiTriShape. It is best that you save the existing hair from the game with a new name, like FalloutHair.nif, to prevent overwriting it. To delete it select the Hat NiTriShape node of the vanilla hair you are going to delete and right click. Then select ''Block -> Remove Branch'' from the pop up menu.
+
#Open two NifSkope instances. In one of them load the nif file that contains the hair mesh you are porting to Fallout (Hair.nif in the example) and in the other one open the nif file of a vanilla hair mesh.  
# Copy the shape of your hair in the nif file of the vanilla hair following this steps:
+
#In the vanilla hair mesh, delete the ''Hat'' NiTriShape. It is best that you save the existing hair from the game with a new name, like FalloutHair.nif, to prevent overwriting it. To delete it select the Hat NiTriShape node of the vanilla hair you are going to delete and right click. Then select ''Block -> Remove Branch'' from the pop up menu.  
## In your hair file (Hair.nif in the example) select the NiTriShape node that contains your hair's shape and right click on it. Select the option ''Block -> Copy Branch'' from the pop up menu.
+
#Copy the shape of your hair in the nif file of the vanilla hair following this steps:  
## Go to the vanilla hair mesh (FalloutHair.nif in the example) and select the top node (the NiNode that is called ''HairBaseF'' in the example picture, right click and select the option ''Block -> Paste Branch'' from the pop up menu.
+
##In your hair file (Hair.nif in the example) select the NiTriShape node that contains your hair's shape and right click on it. Select the option ''Block -> Copy Branch'' from the pop up menu.  
# Select the NiTRiShape you've just copied and then, in the Block details part of the screen click on the '''''txt''''' little button (see picture ''Hat and NoHat NiTriShapes'') to change the name of the NiTriShape. Select or type ''NoHat'' in the pop up window and click on OK. Now the name of the NiTriShape of the hair you've ported is NoHat.
+
##Go to the vanilla hair mesh (FalloutHair.nif in the example) and select the top node (the NiNode that is called ''HairBaseF'' in the example picture, right click and select the option ''Block -> Paste Branch'' from the pop up menu.  
# In the NiTriShapeData of the NiTriShape node you've copied you can change the value of TSpaceFlag from 240, that is the default value that Blender sets when exporting, to 16 that is the value that the vanilla meshes use in game. Once you've changed the value of this parameter go down a little and you'll see the parameters Binormals and Tangents. Right click on the green round arrows that are beside these two parameters and select Array -> Update. Then select the main node NiNode ''Sceene Root'' at the top and from the top menu select ''Spells -> Batch -> Update All Tangent Spaces'' and wait until NifSkope finishes the calculations.
+
#Select the NiTRiShape you've just copied and then, in the Block details part of the screen click on the '''''txt''''' little button (see picture ''Hat and NoHat NiTriShapes'') to change the name of the NiTriShape. Select or type ''NoHat'' in the pop up window and click on OK. Now the name of the NiTriShape of the hair you've ported is NoHat.  
 +
#In the NiTriShapeData of the NiTriShape node you've copied you can change the value of TSpaceFlag from 240, that is the default value that Blender sets when exporting, to 16 that is the value that the vanilla meshes use in game. Once you've changed the value of this parameter go down a little and you'll see the parameters Binormals and Tangents. Right click on the green round arrows that are beside these two parameters and select Array -> Update. Then select the main node NiNode ''Sceene Root'' at the top and from the top menu select ''Spells -> Batch -> Update All Tangent Spaces'' and wait until NifSkope finishes the calculations.  
  
 
==== Make your hair colourable ====
 
==== Make your hair colourable ====
[[File:PortHair6_HasVertexColors.jpg|right|thumb|Has Vertex Colors parameter]]
+
 
 +
[[File:PortHair6 HasVertexColors.jpg|thumb|right|Has Vertex Colors parameter]]
  
 
There are two things that determine that a hair is colourable in Fallout:
 
There are two things that determine that a hair is colourable in Fallout:
* the hair has a _hl.dds image file associated to it (see [[Porting_hairs_to_Fallout#hl.dds_image_file|previous section]] for details)
+
 
* the hair mesh has vertex colours. To set this:
+
*the hair has a _hl.dds image file associated to it (see [[Porting_hairs_to_Fallout#hl.dds_image_file|previous section]] for details)  
** select the NiTriShapeData of the NoHat NiTriShape node and in Block Details look for the parameter ''Has Vertex Colors''. Set it to ''yes'' as shown in picture ''Has Vertex Colors parameter''.
+
*the hair mesh has vertex colours. To set this:  
 +
**select the NiTriShapeData of the NoHat NiTriShape node and in Block Details look for the parameter ''Has Vertex Colors''. Set it to ''yes'' as shown in picture ''Has Vertex Colors parameter''.  
  
 
==== Modify textures and materials ====
 
==== Modify textures and materials ====
[[File:PortHair7_Shader_flags.jpg|right|thumb|Shader and Shader flags]]
+
 
[[File:PortHair8_Textures.jpg|right|thumb|Textures]]
+
[[File:PortHair7 Shader flags.jpg|thumb|right|Shader and Shader flags]] [[File:PortHair8 Textures.jpg|thumb|right|Textures]]
  
 
Fallout nif files use some new parameters, the Shader and the Shader flags, that have to be set properly or the object will look bad in game (too shiny, too dark, etc) or even be completely invisible. To check or modify their values select the ''BSShaderPPLightingProperty'' node and look for the properties ''Shader'' and ''Shader flags'' in Block details. In picture ''Shader and Shader flags'' you can see the Shader and Shader flags that I've used for hairs in Fallout.
 
Fallout nif files use some new parameters, the Shader and the Shader flags, that have to be set properly or the object will look bad in game (too shiny, too dark, etc) or even be completely invisible. To check or modify their values select the ''BSShaderPPLightingProperty'' node and look for the properties ''Shader'' and ''Shader flags'' in Block details. In picture ''Shader and Shader flags'' you can see the Shader and Shader flags that I've used for hairs in Fallout.
Line 140: Line 160:
 
Check that the texture files begin like this: textures\... as shown in the ''Textures'' picture. If the links to the files begin like C:\Program files\Bethesda Softworks\Fallout3\Data\textures\..., or \textures\... the game may not be able to upload them and you'll see the hair black or purple.
 
Check that the texture files begin like this: textures\... as shown in the ''Textures'' picture. If the links to the files begin like C:\Program files\Bethesda Softworks\Fallout3\Data\textures\..., or \textures\... the game may not be able to upload them and you'll see the hair black or purple.
  
The last step is to modify the material properties. Under the ''NiTriShape'' node that contains the shape of your armour select the ''NiMaterialProperty'' node, right click on it and select ''Material'': a window like the one shown in the ''Material'' image will pop up. In Fallout materials have no name so delete the nale that appears on the top box (if there is any).  
+
The last step is to modify the material properties. Under the ''NiTriShape'' node that contains the shape of your armour select the ''NiMaterialProperty'' node, right click on it and select ''Material'': a window like the one shown in the ''Material'' image will pop up. In Fallout materials have no name so delete the nale that appears on the top box (if there is any). In this screen you can modify the values of the Specular and Emissive colours, the level of transparency (Alpha) and the Glossiness of the hair. You can also modify these values numerically if you select the material node and then select View -> Block details.
In this screen you can modify the values of the Specular and Emissive colours, the level of transparency (Alpha) and the Glossiness of the hair. You can also modify these values numerically if you select the material node and then select View -> Block details.
 
  
 
==== Apply the textures on both sides of the hair mesh ====
 
==== Apply the textures on both sides of the hair mesh ====
[[File:PortHair9_NiStencilProperty.jpg|right|thumb|NiStencilProperty]]
 
  
Most hair meshes are made by flat surfaces, and then, if the textures are only applied to the top of the surface, the hair will be invisible in game when view from some angles (for example, the inner part of the hair will be invisible).
+
[[File:PortHair9 NiStencilProperty.jpg|thumb|right|NiStencilProperty]]
 +
 
 +
Most hair meshes are made by flat surfaces, and then, if the textures are only applied to the top of the surface, the hair will be invisible in game when view from some angles (for example, the inner part of the hair will be invisible).
  
 
You can tell the mesh to apply the texture on both sides to fix this problem. To do this:
 
You can tell the mesh to apply the texture on both sides to fix this problem. To do this:
# Select the ''NoHat'' NiTriShape and right click on it
+
 
# Select ''Node -> Attach Property'' from the pop up menu
+
#Select the ''NoHat'' NiTriShape and right click on it  
# Select ''NiStencilProperty'' from the drop down list
+
#Select ''Node -> Attach Property'' from the pop up menu  
 +
#Select ''NiStencilProperty'' from the drop down list  
  
 
This will add a new node, a NiStencilProperty node, under the ''NoHat'' NiTriShape. Select it and in Block Details look for the Flags parameter and set it to 19840 as shown in picture ''NiStencilProperty''. If the Flags parameter is set to any other value, Fallout won't paint both sides of the mesh.
 
This will add a new node, a NiStencilProperty node, under the ''NoHat'' NiTriShape. Select it and in Block Details look for the Flags parameter and set it to 19840 as shown in picture ''NiStencilProperty''. If the Flags parameter is set to any other value, Fallout won't paint both sides of the mesh.
Line 158: Line 179:
  
 
=== Create an egm file ===
 
=== Create an egm file ===
[[File:PortHair10_export_Oblivion.jpg|right|thumb|Exporting the hair mesh for Oblivion]]
+
 
 +
[[File:PortHair10 export Oblivion.jpg|thumb|right|Exporting the hair mesh for Oblivion]]
  
 
Egm files tell Fallout how to resize the hair when the face changes shape. These files will allow your hair to fit almost all character faces in game.
 
Egm files tell Fallout how to resize the hair when the face changes shape. These files will allow your hair to fit almost all character faces in game.
  
 
Fallout hairs use two egm files, one for the ''Hat'' hair mesh and another one for the ''NoHat'' hair mesh. Both egm files need to be called following this conventions (in the example, our hair mesh nif file is called MyHair.nif):
 
Fallout hairs use two egm files, one for the ''Hat'' hair mesh and another one for the ''NoHat'' hair mesh. Both egm files need to be called following this conventions (in the example, our hair mesh nif file is called MyHair.nif):
* egm file for the ''Hat'' hair mesh: name of your nif file + hat.egm (in the example MyHairhat.egm)
+
 
* egm file for the ''NoHat'' hair mesh: name of your nif file + nohat.egm (in the example MyHairnohat.egm)
+
*egm file for the ''Hat'' hair mesh: name of your nif file + hat.egm (in the example MyHairhat.egm)  
 +
*egm file for the ''NoHat'' hair mesh: name of your nif file + nohat.egm (in the example MyHairnohat.egm)  
 +
 
 
Egm files are under the Data\Meshes\ folder, in the same subfolder than the nif file of your hair mesh is.
 
Egm files are under the Data\Meshes\ folder, in the same subfolder than the nif file of your hair mesh is.
  
 
If you are using a vanilla Hat mesh, in Windows make a copy of the corresponding egm file and change rename it following the rule explained before (in the example, you will rename it as MyHairhat.egm).
 
If you are using a vanilla Hat mesh, in Windows make a copy of the corresponding egm file and change rename it following the rule explained before (in the example, you will rename it as MyHairhat.egm).
  
To create an egm file for the NoHat hair mesh, the hair mesh you are porting to Fallout, you can use [http://www.tesnexus.com/downloads/file.php?id=9360 The Conformulator by Scanti].  
+
To create an egm file for the NoHat hair mesh, the hair mesh you are porting to Fallout, you can use [https://www.nexusmods.com/oblivion/mods/9360 The Conformulator by Scanti].
  
 
This tool was made for Oblivion, so it cannot read Fallout hair meshes. Then, to use it you'll have to create a hair mesh that can be read by the Conformulator either by saving your hair mesh as an obj file or as an Oblivion nif file. To save it as an Oblivion nif file:
 
This tool was made for Oblivion, so it cannot read Fallout hair meshes. Then, to use it you'll have to create a hair mesh that can be read by the Conformulator either by saving your hair mesh as an obj file or as an Oblivion nif file. To save it as an Oblivion nif file:
# Open your hair mesh in Blender
+
 
# In Object mode select the hair mesh.  
+
#Open your hair mesh in Blender  
# Press the Ctrl + A keys and select the option ''Scale and Rotation to ObData'' from the pop up menu.  
+
#In Object mode select the hair mesh.  
# Keeping the hair mesh selected, select the menu option ''File -> Export -> NetImmerse/Gamebyro'', enter the name of the nif file for your hair (for example OblivionHair.nif) and the folder where you want to save it.  
+
#Press the Ctrl + A keys and select the option ''Scale and Rotation to ObData'' from the pop up menu.  
#: ''Make sure that you save this nif file with a different name than the one you are using for your Fallout hair mesh!''
+
#Keeping the hair mesh selected, select the menu option ''File -> Export -> NetImmerse/Gamebyro'', enter the name of the nif file for your hair (for example OblivionHair.nif) and the folder where you want to save it.  
# Set the exporting parameters as shown in the picture ''Exporting the hair mesh for Oblivion''. It is important that the parameters are set like this:  
+
#:''Make sure that you save this nif file with a different name than the one you are using for your Fallout hair mesh!''  
## Oblivion -> selected  
+
#Set the exporting parameters as shown in the picture ''Exporting the hair mesh for Oblivion''. It is important that the parameters are set like this:  
## Stripify geometries -> selected
+
##Oblivion -> selected  
## Stitch Strips -> deselected  
+
##Stripify geometries -> selected  
## Smoothen Inter-Object Seams -> selected  
+
##Stitch Strips -> deselected  
## Flatten Skin -> deselected  
+
##Smoothen Inter-Object Seams -> selected  
## Export Skin Partition -> deselected  
+
##Flatten Skin -> deselected  
# Press the OK button and wait until Blender finishes saving the nif file.
+
##Export Skin Partition -> deselected  
 +
#Press the OK button and wait until Blender finishes saving the nif file.  
  
 
Then run The Conformulator, select the tri file for the Fallout head mesh you've made the hair for (for example headfemale.nif), and the Oblivion version of the hair (OblivionHair.nif in the example). Wait until the tool finishes creating the egm file, and when it's done, rename it following the rule explained before (in the example, you will rename it as MyHairnohat.egm)
 
Then run The Conformulator, select the tri file for the Fallout head mesh you've made the hair for (for example headfemale.nif), and the Oblivion version of the hair (OblivionHair.nif in the example). Wait until the tool finishes creating the egm file, and when it's done, rename it following the rule explained before (in the example, you will rename it as MyHairnohat.egm)
  
 
=== Add the hair to the game using the GECK ===
 
=== Add the hair to the game using the GECK ===
[[File:PortHair11_Add_hair.jpg|right|thumb|Character menu option and Hair window]]
+
 
 +
[[File:PortHair11 Add hair.jpg|thumb|right|Character menu option and Hair window]]
  
 
First copy the textures, nif and egm files to the game folders:
 
First copy the textures, nif and egm files to the game folders:
* Copy to the \Data\Meshes\Characters\Hair\MyMod\ folder: the nif and egm files (in the example, copy the files MyHair.nif MyHairnohat.egm and MyHairhat.egm)
+
 
* Copy to the \Data\Textures\Characters\Hair\MyMod\ folder: the dds image files (the dds, the _n.dds and the _hl.dds)
+
*Copy to the \Data\Meshes\Characters\Hair\MyMod\ folder: the nif and egm files (in the example, copy the files MyHair.nif MyHairnohat.egm and MyHairhat.egm)  
*: '''Notes:'''  
+
*Copy to the \Data\Textures\Characters\Hair\MyMod\ folder: the dds image files (the dds, the _n.dds and the _hl.dds)  
*: ''* it is good practice to create a new subfolder for each of your mods. This way it will be easier to uninstall the mod. In the example I've called that subfolder \MyMod\ but you can use any name that identifies your mod uniquely.''
+
*:'''Notes:'''  
*: ''* the path to the texture files must be the same than the one you set in the nif file in NifSkope [[Porting_hairs_to_Fallout#Modify_textures_and_materials|here]]. If it is not, modify the texture paths again in NifSkope.''
+
*:''* it is good practice to create a new subfolder for each of your mods. This way it will be easier to uninstall the mod. In the example I've called that subfolder \MyMod\ but you can use any name that identifies your mod uniquely.''  
 +
*:''* the path to the texture files must be the same than the one you set in the nif file in NifSkope [[Porting_hairs_to_Fallout#Modify_textures_and_materials|here]]. If it is not, modify the texture paths again in NifSkope.''  
  
 
The final part is to add the hair to the game using the GECK following this process:
 
The final part is to add the hair to the game using the GECK following this process:
# Open the GECK
 
# Select ''File -> Data'' from the top menu, and check Fallout3.esm and your current cosmetic mod (or only select Fallout3.esm if you are not using any cosmetic mod). Select your current cosmetic mod and press the button ''Set as Active File''. Then press the OK button and wait for the GECK to stop loading.
 
# Add the new hair:
 
## Select ''Character -> Hair'' from the top menu: a window will pop up with all the available hairs like the one shown in picture ''Character menu option and Hair window''.
 
## Right click on the list of hairs and select "New" from the pop up menu. Enter a unic name for your hair (for example, MyHair) and press OK.
 
## On the right section of the window, enter a name for your hair (this will be the name displayed in the character facegen screens in game). Check the Flag "Playable". Check the flag ''Can be female'' or ''Can be male'' depending on if the hair is for female or male characters. Make sure the flag ''Fixed color'' is deselected.
 
## Click on the ''Edit'' button of the Art file section and select the hair mesh file (for example Data\Meshes\Characters\Hair\MyMod\MyHair.nif)
 
## Click on the ''Edit'' button of the Texture file section and select the texture file (for example Data\Textures\Characters\Hair\MyMod\MyHair.dds)
 
## Click OK
 
# Assign the new hair to your race:
 
## With the hairs window opened, select ''Character -> Race'' from the top menu. Another window will pop up showing all available races (move the window as needed if it covers the hairs window)
 
## Select the race you want to modify (for example Caucasian) on the list.
 
## Select the Face Data tab on the right. You'll see a list of Hair Styles available for the selected race.
 
## Left click on the new hair you've just added in the hairs window and with the left mouse button pressed, drag it to the Hair Styles window of your race and then drop the hair there (stop pressing the mouse left button). The new hair has just been added to the list of available hairs for your race.
 
## Click OK on the races window.
 
## Click OK on the hair window.
 
# Save your changes to the active .esp file.
 
# Start Fallout 3 Launcher, click 'Data Files' and place a checkmark beside the .esp file.
 
  
Enjoy your new hair in game! :)
+
#Open the GECK
 +
#Select ''File -> Data'' from the top menu, and check Fallout3.esm and your current cosmetic mod (or only select Fallout3.esm if you are not using any cosmetic mod). Select your current cosmetic mod and press the button ''Set as Active File''. Then press the OK button and wait for the GECK to stop loading.
 +
#Add the new hair:
 +
##Select ''Character -> Hair'' from the top menu: a window will pop up with all the available hairs like the one shown in picture ''Character menu option and Hair window''.
 +
##Right click on the list of hairs and select "New" from the pop up menu. Enter a unic name for your hair (for example, MyHair) and press OK.
 +
##On the right section of the window, enter a name for your hair (this will be the name displayed in the character facegen screens in game). Check the Flag "Playable". Check the flag ''Can be female'' or ''Can be male'' depending on if the hair is for female or male characters. Make sure the flag ''Fixed color'' is deselected.
 +
##Click on the ''Edit'' button of the Art file section and select the hair mesh file (for example Data\Meshes\Characters\Hair\MyMod\MyHair.nif)
 +
##Click on the ''Edit'' button of the Texture file section and select the texture file (for example Data\Textures\Characters\Hair\MyMod\MyHair.dds)
 +
##Click OK 
 +
#Assign the new hair to your race:
 +
##With the hairs window opened, select ''Character -> Race'' from the top menu. Another window will pop up showing all available races (move the window as needed if it covers the hairs window)
 +
##Select the race you want to modify (for example Caucasian) on the list.
 +
##Select the Face Data tab on the right. You'll see a list of Hair Styles available for the selected race.
 +
##Left click on the new hair you've just added in the hairs window and with the left mouse button pressed, drag it to the Hair Styles window of your race and then drop the hair there (stop pressing the mouse left button). The new hair has just been added to the list of available hairs for your race.
 +
##Click OK on the races window.
 +
##Click OK on the hair window. 
 +
#Save your changes to the active .esp file.
 +
#Start Fallout 3 Launcher, click 'Data Files' and place a checkmark beside the .esp file.
 +
 
 +
Enjoy your new hair in game! :)
  
[[Category:Fallout_3]]
+
[[Category:Fallout 3]] [[Category:Tutorials]] [[Category:Modelling]] [[Category:Texturing]] [[Category:Blender]] [[Category:GIMP]] [[Category:NifSkope]] [[Category:GECK]]
[[Category:Tutorials]]
 
[[Category:Modelling]]
 
[[Category:Texturing]]
 
[[Category:Blender]]
 
[[Category:GIMP]]
 
[[Category:NifSkope]]
 
[[Category:GECK]]
 

Latest revision as of 21:19, 20 November 2018

Overview

This tutorial shows all the main steps you need to follow to port a hair from another game to Fallout 3.

If you create a hair from scratch, apart from the steps explained here you will have to create the hair mesh, its UV map and its textures.

Note: If you are porting the hair to distribute it you must ask permission first to the original author of the hair, and always credit him for his work

Required tools

Porting a hair to Fallout

The main steps to follow when porting hairs to Fallout are:

  1. Importing into Blender the Fallout head mesh and the hair mesh
  2. Modify the hair mesh to fit Fallout head mesh
  3. Export the hair mesh
  4. Modify the hair textures
  5. Adjust the hair mesh in NifSkope
  6. Create an egm file
  7. Add the hair to the game using the GECK

Importing into Blender the Fallout head mesh and the hair mesh

Importing a mesh into Blender

First step is to import the head mesh you want to work with. In Fallout there are several head meshes depending on the age and gender of the charaters (there is even a different head mesh for ghouls). Head meshes are usually located in the \Data\Meshes\characters\head\ folder.

The head meshes of player characters are:

  • headhuman.nif: head mesh for male characters
  • headfemale.nif: head mesh for female characters

Import the head mesh you want to adapt the hair for using the menu option File -> Import -> Netimmerse/Gamebyro (.nif)

Notes:
* The meshes and textures of the game are inside compressesd files with BSA format. To extract then you can use the "BSA Browser" utility that comes with Fallout Mod Manager.
* If you cannot find that option it is because you haven't installed NifScripts. Follow the instructions given here: Installation of Blender to install everything you need.

Then import the hair mesh of the hair you want to port to Fallout using the same menu option (if it is a nif file) File -> Import -> Netimmerse/Gamebyro (.nif) or the option that corresponds to the format of the mesh you are importing.

Modify the hair mesh to fit Fallout head mesh

Imported hair mesh
Modified hair mesh

Once you have imported the hair, you'll probably see that it doesn't fit the head as in the example shown in picture Imported hair mesh. To fix this work in Edit mode. Select all vertices of the hair (press A once or twice to select them all) and move them and scale them as required until the hair fits the head mesh. Try to fix the hair mesh by selecting all vertices at the same time: this way you'll keep the shape of the original hair. Only if needed work with some of the vertices (to get them out of the head, for example), but be careful and try to keep these modifications to the minimum.

Note: don't move or rotate the hair mesh in Object mode because you want your hair to have the same center as the Fallout hair in Object mode. Do all required modifications in Edit mode.

Export the hair mesh

Exporting the hair mesh

To export the hair mesh:

  1. In Object mode select the hair mesh.
  2. Press the Ctrl + A keys and select the option Scale and Rotation to ObData from the pop up menu.
  3. Keeping the hair mesh selected, select the menu option File -> Export -> NetImmerse/Gamebyro, enter the name of the nif file for your hair (for example Hair.nif) and the folder where you want to save it.
  4. Set the exporting parameters as shown in the picture Exporting the hair mesh. It is important that the parameters are set like this:
    1. Fallout 3 -> selected
    2. Stripify geometries -> deselected
    3. Smoothen Inter-Object Seams -> deselected
    4. Flatten Skin -> deselected
    5. Export Skin Partition -> deselected
  5. Press the OK button and wait until Blender finishes saving the nif file.

Modify the hair textures

Hairs in Fallout use three different texture files:

  • .dds file: diffuse map. This image file contains the painted hair and accesories (ribbons, hats, etc)
  • _n.dds file: normal map. Fallout uses this file to give sense of volume to the hair and also influences how bright it will be seen in game.
  • _hl.dds file: this image file tells Fallout waht parts of the hair mesh are colourable. Your hair requires this file to be colourable in game.

.dds image file

Usually Fallout hairs look better if you take off all the colour of this image file. To do this:

  1. Open the texture file of the hair you are porting to Fallout in GIMP
  2. If it contains something that doesn't have to be colourable in game (like a ribbon or a hat) select everything except that part
  3. Select the menu option Colors -> Desaturate and select any of the three options (Lightness, Luminosity or Average)
  4. Save the image file as dds as this is the image format that the game requires. As hair textuures usually use transparency, save it as DTX3 or DTX5. Make sure that the Generate mipmaps flag is marked when you save the texture.

_n.dds image file

Normal map window

This step is exactly the same than the one explained in the tutorial Creating a sword for Fallout because it doesn't matter the mesh you are working with: you will create the normal maps following the same steps.

You can create the normal map from the dds texture you've saved before, to do it this way just follow these steps:

  1. Select Colors -> Color to alpha and then select black or 000000 as the source colour.
  2. Select Filter -> Map -> Normalmap. A window will pop up like the one shown in the Normal map window picture.
    1. pressing 3d preview you will be able to see in another screen how the changes in the parameters give more or less deep to the normal map.
    2. select the Wrap flag and change the value of Height source to Alpha.
    3. select a filter (I usually select 3x3 but you can try different filters and see which one works better for you)
    4. modify the scale value to add more or less deep to the normal map (I usually set this to 3 or 4)
    5. Press the OK button and the image will show now a blueish look: this is the normal map. Save it with the same name than your texture file + the _n.dds extension and choose the DTX5 compression. Make sure that the Generate mipmaps flag is selected when saving it.
Note: In Fallout light colours look very bright, and often they look too shiny. If you want to make your textures less shiny:
  • make your textures a little darker: for example, don't paint white parts in white but in a light grey.
  • make the normal map a little more transparent: if you are generating them from the textures, you can try the following:
    • before generating the normal map, add a black layer to the texture and merge it with the texture using a % of opacity (like 50%, or 25%).
    • merge down the black layer onto your original texture and then generate the normal map.

_hl.dds image file

_hl.dds file colour and alpha channels

This kind of image files are only used by hairs in Fallout. This image file controls waht part of the hair mesh is colourable. If part of your hair mesh doesn't have to be colourable (as a ribbon or a hat) you have to paint that part of the alpha channel of this image in black (opaque) as shown in picture _hl.dds file colour and alpha channels. White parts (transparent) of the alpha channel of this image file will be coulourable.

Note: In GIMP, if you are looking at the Alpha channel on the Channels dialog window, colours are reversed, i. e. there you'll see opaque parts of the image painted in white and transparent parts in black.

In this example, the right bottom part of the image corresponds to a ribbon that doesn't have to change its colour in game when you change the coulour of your character's hair, and that is why that part of the alpha channel is completely black.

Save the image file with the same name than your texture file + the _hl.dds extension and choose the DTX3 or DTX5 compression. Make sure that the Generate mipmaps flag is selected when saving it.

Adjust the hair mesh in NifSkope

Hat and NoHat NiTriShapes

Each Fallout hair mesh is actually made of two meshes: a mesh that is equipped by your character when wearing a hat (the mesh in the NiTriShape called Hat) and a mesh that is equipped by your character when not (the mesh in the NiTriShape called NoHat), as shown in picture Hat and NoHat NiTriShapes. The NiTriShapes must be called Hat and NoHat for the game to choose the right one when your character equips a hat (hat, helmet, cowl, etc).

You can create a mesh for your character when wearing a hat by editting the hair you are porting in Blender, modifying the top and sides of the hair mesh until they are very close or even into the head (the part of the hair that is going to be covered by the hat) or use one of the existing vanilla hair meshes.

If you are using a vanilla Hat mesh:

  1. Open two NifSkope instances. In one of them load the nif file that contains the hair mesh you are porting to Fallout (Hair.nif in the example) and in the other one open the nif file of a vanilla hair mesh.
  2. In the vanilla hair mesh, delete the Hat NiTriShape. It is best that you save the existing hair from the game with a new name, like FalloutHair.nif, to prevent overwriting it. To delete it select the Hat NiTriShape node of the vanilla hair you are going to delete and right click. Then select Block -> Remove Branch from the pop up menu.
  3. Copy the shape of your hair in the nif file of the vanilla hair following this steps:
    1. In your hair file (Hair.nif in the example) select the NiTriShape node that contains your hair's shape and right click on it. Select the option Block -> Copy Branch from the pop up menu.
    2. Go to the vanilla hair mesh (FalloutHair.nif in the example) and select the top node (the NiNode that is called HairBaseF in the example picture, right click and select the option Block -> Paste Branch from the pop up menu.
  4. Select the NiTRiShape you've just copied and then, in the Block details part of the screen click on the txt little button (see picture Hat and NoHat NiTriShapes) to change the name of the NiTriShape. Select or type NoHat in the pop up window and click on OK. Now the name of the NiTriShape of the hair you've ported is NoHat.
  5. In the NiTriShapeData of the NiTriShape node you've copied you can change the value of TSpaceFlag from 240, that is the default value that Blender sets when exporting, to 16 that is the value that the vanilla meshes use in game. Once you've changed the value of this parameter go down a little and you'll see the parameters Binormals and Tangents. Right click on the green round arrows that are beside these two parameters and select Array -> Update. Then select the main node NiNode Sceene Root at the top and from the top menu select Spells -> Batch -> Update All Tangent Spaces and wait until NifSkope finishes the calculations.

Make your hair colourable

Has Vertex Colors parameter

There are two things that determine that a hair is colourable in Fallout:

  • the hair has a _hl.dds image file associated to it (see previous section for details)
  • the hair mesh has vertex colours. To set this:
    • select the NiTriShapeData of the NoHat NiTriShape node and in Block Details look for the parameter Has Vertex Colors. Set it to yes as shown in picture Has Vertex Colors parameter.

Modify textures and materials

Shader and Shader flags
Textures

Fallout nif files use some new parameters, the Shader and the Shader flags, that have to be set properly or the object will look bad in game (too shiny, too dark, etc) or even be completely invisible. To check or modify their values select the BSShaderPPLightingProperty node and look for the properties Shader and Shader flags in Block details. In picture Shader and Shader flags you can see the Shader and Shader flags that I've used for hairs in Fallout.

Next step is to associate the texture files you created previously to the mesh. To do it select the BSShaderTextureSet node (see Textures picture) and in Block details expand the Textures properties: you'll see that there is room for 6 image files but for hair you will use the first three. In the first place, at the top, link the colour texture (the dds file), in the second place link the normal map dds file (the _n.dds file) and in the third place link the hl image file (the _hl.dds file).

Check that the texture files begin like this: textures\... as shown in the Textures picture. If the links to the files begin like C:\Program files\Bethesda Softworks\Fallout3\Data\textures\..., or \textures\... the game may not be able to upload them and you'll see the hair black or purple.

The last step is to modify the material properties. Under the NiTriShape node that contains the shape of your armour select the NiMaterialProperty node, right click on it and select Material: a window like the one shown in the Material image will pop up. In Fallout materials have no name so delete the nale that appears on the top box (if there is any). In this screen you can modify the values of the Specular and Emissive colours, the level of transparency (Alpha) and the Glossiness of the hair. You can also modify these values numerically if you select the material node and then select View -> Block details.

Apply the textures on both sides of the hair mesh

NiStencilProperty

Most hair meshes are made by flat surfaces, and then, if the textures are only applied to the top of the surface, the hair will be invisible in game when view from some angles (for example, the inner part of the hair will be invisible).

You can tell the mesh to apply the texture on both sides to fix this problem. To do this:

  1. Select the NoHat NiTriShape and right click on it
  2. Select Node -> Attach Property from the pop up menu
  3. Select NiStencilProperty from the drop down list

This will add a new node, a NiStencilProperty node, under the NoHat NiTriShape. Select it and in Block Details look for the Flags parameter and set it to 19840 as shown in picture NiStencilProperty. If the Flags parameter is set to any other value, Fallout won't paint both sides of the mesh.

Once you've made all changes in NifSkope, save your hair nif file.

Create an egm file

Exporting the hair mesh for Oblivion

Egm files tell Fallout how to resize the hair when the face changes shape. These files will allow your hair to fit almost all character faces in game.

Fallout hairs use two egm files, one for the Hat hair mesh and another one for the NoHat hair mesh. Both egm files need to be called following this conventions (in the example, our hair mesh nif file is called MyHair.nif):

  • egm file for the Hat hair mesh: name of your nif file + hat.egm (in the example MyHairhat.egm)
  • egm file for the NoHat hair mesh: name of your nif file + nohat.egm (in the example MyHairnohat.egm)

Egm files are under the Data\Meshes\ folder, in the same subfolder than the nif file of your hair mesh is.

If you are using a vanilla Hat mesh, in Windows make a copy of the corresponding egm file and change rename it following the rule explained before (in the example, you will rename it as MyHairhat.egm).

To create an egm file for the NoHat hair mesh, the hair mesh you are porting to Fallout, you can use The Conformulator by Scanti.

This tool was made for Oblivion, so it cannot read Fallout hair meshes. Then, to use it you'll have to create a hair mesh that can be read by the Conformulator either by saving your hair mesh as an obj file or as an Oblivion nif file. To save it as an Oblivion nif file:

  1. Open your hair mesh in Blender
  2. In Object mode select the hair mesh.
  3. Press the Ctrl + A keys and select the option Scale and Rotation to ObData from the pop up menu.
  4. Keeping the hair mesh selected, select the menu option File -> Export -> NetImmerse/Gamebyro, enter the name of the nif file for your hair (for example OblivionHair.nif) and the folder where you want to save it.
    Make sure that you save this nif file with a different name than the one you are using for your Fallout hair mesh!
  5. Set the exporting parameters as shown in the picture Exporting the hair mesh for Oblivion. It is important that the parameters are set like this:
    1. Oblivion -> selected
    2. Stripify geometries -> selected
    3. Stitch Strips -> deselected
    4. Smoothen Inter-Object Seams -> selected
    5. Flatten Skin -> deselected
    6. Export Skin Partition -> deselected
  6. Press the OK button and wait until Blender finishes saving the nif file.

Then run The Conformulator, select the tri file for the Fallout head mesh you've made the hair for (for example headfemale.nif), and the Oblivion version of the hair (OblivionHair.nif in the example). Wait until the tool finishes creating the egm file, and when it's done, rename it following the rule explained before (in the example, you will rename it as MyHairnohat.egm)

Add the hair to the game using the GECK

Character menu option and Hair window

First copy the textures, nif and egm files to the game folders:

  • Copy to the \Data\Meshes\Characters\Hair\MyMod\ folder: the nif and egm files (in the example, copy the files MyHair.nif MyHairnohat.egm and MyHairhat.egm)
  • Copy to the \Data\Textures\Characters\Hair\MyMod\ folder: the dds image files (the dds, the _n.dds and the _hl.dds)
    Notes:
    * it is good practice to create a new subfolder for each of your mods. This way it will be easier to uninstall the mod. In the example I've called that subfolder \MyMod\ but you can use any name that identifies your mod uniquely.
    * the path to the texture files must be the same than the one you set in the nif file in NifSkope here. If it is not, modify the texture paths again in NifSkope.

The final part is to add the hair to the game using the GECK following this process:

  1. Open the GECK
  2. Select File -> Data from the top menu, and check Fallout3.esm and your current cosmetic mod (or only select Fallout3.esm if you are not using any cosmetic mod). Select your current cosmetic mod and press the button Set as Active File. Then press the OK button and wait for the GECK to stop loading.
  3. Add the new hair:
    1. Select Character -> Hair from the top menu: a window will pop up with all the available hairs like the one shown in picture Character menu option and Hair window.
    2. Right click on the list of hairs and select "New" from the pop up menu. Enter a unic name for your hair (for example, MyHair) and press OK.
    3. On the right section of the window, enter a name for your hair (this will be the name displayed in the character facegen screens in game). Check the Flag "Playable". Check the flag Can be female or Can be male depending on if the hair is for female or male characters. Make sure the flag Fixed color is deselected.
    4. Click on the Edit button of the Art file section and select the hair mesh file (for example Data\Meshes\Characters\Hair\MyMod\MyHair.nif)
    5. Click on the Edit button of the Texture file section and select the texture file (for example Data\Textures\Characters\Hair\MyMod\MyHair.dds)
    6. Click OK
  4. Assign the new hair to your race:
    1. With the hairs window opened, select Character -> Race from the top menu. Another window will pop up showing all available races (move the window as needed if it covers the hairs window)
    2. Select the race you want to modify (for example Caucasian) on the list.
    3. Select the Face Data tab on the right. You'll see a list of Hair Styles available for the selected race.
    4. Left click on the new hair you've just added in the hairs window and with the left mouse button pressed, drag it to the Hair Styles window of your race and then drop the hair there (stop pressing the mouse left button). The new hair has just been added to the list of available hairs for your race.
    5. Click OK on the races window.
    6. Click OK on the hair window.
  5. Save your changes to the active .esp file.
  6. Start Fallout 3 Launcher, click 'Data Files' and place a checkmark beside the .esp file.

Enjoy your new hair in game! :)