Creating an armour for Skyrim. Part 1

From Nexus Mods Wiki
Revision as of 18:23, 26 January 2014 by SydneyB (talk | contribs) (Paint the weights by hand: adding link to Growlf's utility)
Jump to: navigation, search

Overview

This tutorial shows all the main steps you need to follow to create an armour or an outfit from scratch for Skyrim. If you only want to change the textures of an existing piece of clothing or change its properties and bonus, just skip the first part of the tutorial. If you want to adapt existing armours or outfits to other bodies you will have to follow the steps explained here, except that you won't have to create the mesh (but you may probably have to adapt it to the new body), the textures or the UV maps.

Currently the tools used for modelling are not completely adapted for Skyrim, there are some steps that require some manual adjustments. This will surely change in the future months and this tutorial will be updated when required.

Required tools

  • Blender: latest Nifscripts version.
  • GIMP
  • Nifskope: latest NifSkope version.
  • Creation Kit: available on Steam (Menu option View -> Tools and then select Creation Kit)

Creating an armour for Skyrim

The main steps to create a custom armour or outfit for Skyrim are:

  1. Creating the armour:
    1. Create the _0.nif armour mesh:
      1. Import into Blender all parts of the _0.nif body
      2. Make the armour's shape
      3. Add a material
      4. Add a UVmap
      5. Create the textures and the normal maps in GIMP
      6. Reduce the amount of polygons of the mesh
      7. Add weights to the armour
      8. Cut parts of the body hidden by the armour
      9. Export the armour
      10. Adjust the armor in Nifskope
      11. Add the armour to the game
      12. Adjust the armour after testing it in game
    2. Create the _1.nif armour mesh:
      1. Import into Blender all parts of the _1.nif body
      2. Adjust the _0.nif armour shape
      3. Export the armour
      4. Adjust the armor in Nifskope
      5. Add the armour to the game
      6. Adjust the armour after testing it in game

Skyrim armour/clothing meshes

Skyrim armour/clothing meshes and character weight

Skyrim has introduced a new feature for characters: the weight slider. You can set the weight of characters or NPCs from 0% (the weight slider is completely to the left) to 100% (the slider is completely to the right). The changes in the shape of the character are managed using 2 mesh files for each armour/piece of clothing (this also applies to the meshes that contain parts of the body):

  • With 0% weight, the game uses the _0.nif
  • With 100% weight, the game uses the _1.nif
  • With any intermediate weight, the game combines the _0.nif and the _1.nif

An example of this is shown in picture Skyrim armour/clothing meshes and character weight.

This means that you will have to create two meshes for each of the armours/pieces of cloth instead of only one. In this tutorial we are going to create first the _0.nif armour and once it is finished we will adapt it to the _1.nif body

Create the _0.nif armour mesh

Import into Blender all parts of the _0.nif body

Editting the NiHeader in NifSkope
Deleting the BSLightingShaderProperty
Importing a mesh into Blender
Deleting the skeleton

When creating an outfit or an armour first thing is to decide what body you want to make the clothes for. If you want to create an armour that fits several bodies (male and female, for example) you will have to create different armours for each body.

That is why the first step is to import into Blender all the parts of the body you want to work with. The nif files that contain the body meshes are in the folder \Data\Meshes\actors\character\character assets\.

Note: The meshes and textures of the game are inside compressed files with BSA format. To extract then you can use SripterRon's FO3 Archive Utility.

If you are going to create the armour for a male, you'll have to import the following body parts:

  • malebody_0.nif: In Skyrim this nif file contains the torso, arms and legs.
  • malehands_0.nif: If you want to create gloves for your armour, import this mesh that contains the hands.
  • malefeet_0.nif: If you want to create gloves for your armour, import this mesh that contains the hands.

If you are going to create the armour for a female, you'll have to import the following body parts:

  • femalebody_0.nif: In Skyrim this nif file contains the torso, arms and legs.
  • femalehands_0.nif: If you want to create gloves for your armour, import this mesh that contains the hands.
  • femalefeet_0.nif: If you want to create gloves for your armour, import this mesh that contains the hands.

If you want to create a helmet, a hat or earrings, you'll have to import the head meshes that are in the folder \Data\Meshes\actors\character\character assets\:

  • malehead.nif: head mesh for male characters
  • femalehead.nif: head mesh for female characters

There is only one mesh for the head as it is not affected by the weight slider.

As Blender has not yet been fully adapted to Skyrim, to be able to import the nif files into it you have to change some properties in NifSkope. Do the following:

  1. Open the body you are going to work on in NifSkope (in the example, we are using femalebody_0.nif)
  2. First step is to edit the NiHeader settings:
    1. In the Block details section, expand the NiHeader property as shown in picture Editting the NiHeader in NifSkope
    2. You'll see that the User version property has a value of 12. Double click on the 12 and then change it to 11.
    3. Then go to the User version 2 property, that has a value of 83. Double click on the 83 and then change it to 34.
  3. Next step is to delete the BSLightingShaderProperty:
    1. Expand the NiTriShape node as shown in picture Deleting the BSLightingShaderProperty
    2. Select the BSLightingShaderProperty node and press Ctrl+Del or right click and select the menu option Block -> Remove Branch
    3. Do this for all the NiTriShape nodes the mesh has (if it has more than one)
  4. Save the modified nif file. This modified nif is the one you will be importing into Blender.

Repeat these steps for all the Skyrim meshes you need to import into Blender.

Now you can import the body parts into Blender. To do that use the menu option File -> Import -> Netimmerse/Gamebyro (.nif). 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.

Note: I am experiencing now a weird issue when importing nif files into Blender: after importing them I don't see anything in the Blender window. To see the meshes I do the following:
* In object mode select the skeleton (sometimes it is not easy to know which one it it just for the name. What I do is to select each of the objects until one of them is the skeleton)
* as you don't see anything to select them just right click on the little pink circle. If you click on it several times you'll see that the name of the selected object changes
* when you have selected one object, change form Object mode to Edit mode (if the object you0ve selected is the skeleton you'll see also the Pose mode available)
* go back to Object mode and now you'll be able of seeing everything in Blender!

Once you have all the body parts imported into Blender, delete all the skeletons you've imported with them. To do this, select each skeleton (Scene Root) as shown in picture Deleting the skeleton, press the Delete key and select OK. You have to repeat this process until you have deleted all the skeletons you've imported into Blender. Take into account that each part of the body you import will bring its own part of the skeleton.

Once you have just the body meshes, without the skeletons, it is worth you save it in a blend file you can reuse in the future (if you think you are going to create more armours or outfits). This will save you repeating this importing process each time.

From now on, work in Blender as you would do for creating a mesh for any other game.

Make the armour's shape

This is the first step of the process. In this tutorial I am not going to explain how to use Blender to model 3d objects as there are already very good tutorials on the matter like this one: Blender 3d: Noob to pro. Once you have build your armour in Blender you can proceed to the next step.

When creating your armour mesh you can use some of these tips:

Creating a basic clothes mesh

You can create a basic clothes mesh following this tutorial Creating basic clothes in 5 minutes using Blender and use it as a starting point for modelling your armour. The advantage of using this technique is that it allows you to create low polygon meshes, and therefore easier to work with, that already have the basic shape you need for your armour.

Duplicating body parts
  • A quick way of creating tight-fitting piece of clothes, like gloves, consists in duplicating the part of the body that is to be covered by the clothes and converting it into a new object. For example, to create a glove for the right hand:
    • In Edit mode select all the vertices of the right hand
    • Select Mesh -> Duplicate and right click so the duplicated vertices won't move from its place but are still selected
    • Press the P key and select Selected to move the duplicated vertices into a new object
    • Go into Object mode and select the duplicated hand (its name will be RightHand.001. You can change its name into Right glove or any other name you prefer).
    • Go into Edit mode and scale the duplicated hand (you can use the S or Alt+S keys) to make it a little bigger than the original hand so that it covers it like gloves do.
    • Work on the duplicated hand to give the glove its definitive shape.
Use the Mirror modifier
Working with half of the mesh
Adding the Mirror modifier

When creating armours or clothes you can work only with half of the meshes and apply after the Mirror modifier to make the clothes symmetrical. To use this technique:

  • Create a mesh that covers only half of the body and make sure that the center of the mesh, in Object mode, is in the axis that separates the body in two as shown in picture Working with half of the mesh.
  • Add the Mirror modifier (see picture Adding the Mirror modifier). In Object mode, in the Editting (F9) area click on the button Add modifier and select Mirror from the drop down list. You'll see that your object is now symmetrical and covers both sides of the body like in the picture.
  • Work with the mesh only in one half of the body and all the changes you do there will be symmetrically replicated into the other part of the mesh.
  • Once you've finished making your mesh press the Apply button that is beside the Mirror modifier. This will make your mesh real in both sides of the body (leave this step to the end, when you are sure you won't modify the mesh anymore, because once you've applied the modifier you cannot go back).
Give sense of volume
Adding a rim
Putting clothes inside the body

There are some ways of giving the impression that the clothes have a volume although they are only two dimensional bended surfaces, like:

  • select the edge of the clothes and execute Extrude twice (option Only Edges), and create a rim like the one shown in picture Adding a rim
  • select the edge of the clothes and execute Extrude one (option Only Edges), and put the new edge of the clothes inside the body as shown in picture Putting clothes inside the body
Use several objects

I find it useful to create the different parts of the armour as independent object and joining them in a unique object only at the end, when I am going to add weights to the armour. The advantages of working this way are:

  • It is easier to create the UV maps for the different parts of the armour as you create a UV map for each object. When you join all objects into one Blender keeps the independent UV maps you created before.
  • It is easier to use modifiers like Mirror, Bevel or Subsurf. The modifiers apply to one object but not to other objects, so you can control much easily the shape of each part of the armour. Join all parts into one object only after having applied all the modifiers to each individual object.
  • There are some scripts, like the one used to reduce the number of polygons, that apply to the whole object. So, if you work with independent objects you can reduce differently the polygons of the each part of the armour.

Add a material

This step is exactly the same as the one explained in the tutorial Creating a sword for Fallout because it doesn't matter the shape of the mesh you are working with: you will always add a material following the same steps.

Adding a material
Adding a texture
Map Input: UV
Associating an image to the texture

While you are making the armour object or after finishing it you have to add a material to it. The game requires the material because all textures, UV maps and properties that define how it will be seen in game are to be associated to this material.

1. To create a material, in the Editing(F9) area press on the New button (the button encircled in the image Adding a material).

2. Next, in the Shading (F5) area press the red ball (Material buttons), and that will open the area that is shown in the picture Adding a texture. Here you can change the name of the materials on the Links and Pipeline tab, change the material properties and add a texture. The material properties can also be modified in NifSkope and it is easier to do it there, so in this screen we are only going to add a texture to the material. To do so press on the Add New button on the Texture tab.

3. Once you've added the texture two new tabs will appear: Map Input and Map To. Go to the Map Input tab and select UV as shown in the Map Input: UV picture. This is important so that the mesh interprets that the texture will follow the positions of the vertices of the UV map.

4. The last step is to associate the texture you've just created to a texture image. Right now you can associate any texture to it, it doesn't have to be the right one as this will be done later in NifSkope. To associate the texture image press the Texture buttons (F6) as shown in the Associating an image to the texture picture, and in the Texture type drop down list select Image. A window will pop up where you can select the texture dds image and, as I've explained before at this moment you can associate any dds file you have as we will associate the right one in NifSkope later.

Add a UV map

UV/Image Editor

Once your armour has the shape yo want and at least you've added one material, you have to colour it or it will be seen as transparent in game.

To do this the first step is to create the UV maps. The UV maps are projections in 2 dimensions of the mesh that is a 3 dimensional object. With the UV maps you are telling the mesh what part of the texture (that is a 2 dimensional image) has to be painted on each of the faces of the mesh.

To create the UV map:

  1. Subdivide Blender screen in two screens: right double click on the top of the screen and select Split area from the pop up menu. Then move the line until it is more or less in the middle of the screen, separating it in two sections of the same size.
  2. Select UV/Image Editor on the right screen as shown in the picture.
  3. On the left screen, where your armour is, do the following:
For objects or parts of the armour with simple shapes
  • in Edit Mode select the faces of the armour that you want to paint togheter.
  • select the menu option Mesh -> UVUnwrap and you'll see a pop up window like the one shown in the UVUnwrap window picture. Select the option to generate the UV maps that works better for you. I usually select Unwrap or Project from View but you can try the different options and see which one fits your needs. If you use Project from View first move the armour until you see all the faces you've selected as you want them to be projected in the UV map because this option will paint them as they are shown on the screen.
For objects or parts of the armour with complex shapes
Mark a seam
UV map generated using seams

In armours or clothes shapes are usually complex and to paint them it is better to create UV maps of parts of each piece of cloth. Imagine this process as the cuts you'll make to a real shirt to extend the cloth completely on a table to paint it.

To subdivide the object into parts, you have to create a series of cuts or seams in the object (like the seams in real clothes). To mark these seams:

  • In Edit mode select the edges that define a line. Take into account that this line wil be where two parts of the texture will join, so there will be little discontinuities in the painting along it. For this reason it is convenient that you mark the seams in places where in real life clothes already have seams or in places that will be hidden most of the time in game like the lower part of the arms.
  • Select the menu option Mesh -> Edges -> Mark Seam (see picture Mark a seam. You'll see that the line of vertices you selected turns into a dark orange colour.
  • Keep on creating seams in your armour until all pieces of it are completely delimited by seams.
  • Open the menu option Mesh -> UVUnwrap and select the Unwrap option. Blender will generate automatically a UV map similar to the one shown in picture UV map generated using seams.

Once you have generated all the UV maps for your armour save a file with the UV map image. You will use this file you are saving as a pattern to paint the armour textures later. To save this UV map image on the right screen select the menu option UVs -> Scripts -> Save UV Face Layout and press OK. Select the folder and enter the name of the file where you want to save your UV map on the pop up window.

Create the textures and the normal maps in GIMP

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 textures and normal maps following the same steps.

Normal map window

Next step is to paint the textures: to do this you can use a program like GIMP. You can immport the UV map image file you saved earlier into GIMP and use it as a pattern to paint the textures: this way you will know at any time what part of the sword you are painting.

Once you've painted the armour textures save them as dds as this is the image format that the game requires. If the images don't have transparent parts you can save them with DTX1 compression. If they have transparency, saved them as DTX3 or DTX5. Make sure that the Generate mipmaps flag is marked when you save the textures.

Once you've painted the textures you'll have to create the normal maps that are the image files that will give your sword a sense of volume. You can create the normal map from the texture you've just painted, 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 _msn.dds extension and choose the DTX5 compression. Make sure that the Generate mipmaps flag is selected when saving it.
Note: If your textures look too shiny in game and 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.

Reduce the amount of polygons of the mesh

Reducing the polygon count

If you are like me it is likely that the armour you've build until now has a big amount of polygins, what translates into a big nif file and worse performance in game.

You can reduce the number of polygons using the Decimate modifier but that will destroy any UV map you've generated, so the best thing is to use the Poly Reducer script:

  1. In Edit mode select all the vertices of your mesh
  2. Select the menu option Mesh -> Scripts -> Poly Reducer
  3. A window will pop up with the default values Blender has for reducing the polygons. Try first with these values and if you see that the reduction has been too great, reload your mesh and try it again with a lower value of the parameter Poly Reduce (by default the script reduces the number of polygons by half).
  4. Press OK and wait until Blender finishes the calculations.
  5. Look at the result and if it is fines, save the blend file.

You can apply the Poly reducer script as many times as you want to your mesh, but usually after 2 or 3 applications the mesh looses its original shape and looks bad.

Add weights to the armour

This is a very important step and is what differentiates creating armours and outfits of creating any other object for the game, as only the pieces of clothing require being weighted. The weights you are going to add to the meshes is what makes that clothes in game move with the body of the character.

Each part of the armour has weights relative to the bones of the skeleton of the character. In general terms, the weight will be bigger for close bones and zero for bones that are far from that part of the armour. For example, a skirt or a pair of trousers will have zero weight with respect to the bones of the arms or hands, but will have bigger weights with respect to the bones of the legs.

These are the three main methods of assigning weights to armours, from the easiest to the most complex one:

  • Completely copy all the weights from another mesh
  • Partially copy the weights from another mesh
  • Paint the weights by hand
Completely copy all the weights from another mesh
Deleting existing weights
Bone Weight Copy script
Bone Weight Copy script parameters

This is the easiest way of adding weights to an armour and luckily, in most cases, it works well and there is no need to use any other method. The steps to follow are:

  1. In Object mode select the object you are going to add the weights to (your armour) and on the Vertex Groups tab press the Delete button as many times as needed until there is no weight assigned to the object (see picture Deleting existing weights).
  2. In Edit mode select all the vertices of your object. To do this press the A key (if you had any vertex selected, when pressing A for the first time it will be deselected, then press A again and all vertices will be selected).
  3. Go back to Object mode and select your object first, and then select the object you are going to use as the source of the weights (to select two objects at the same time press the Shift key). You can use as a source the body you are creating the armour for, or another armour that is made for the same body you are using. Take into account that each body has slightly different weights.
  4. Select the menu option Object -> Scripts -> Bone Weight Copy (see picture Bone Weight Copy script).
  5. A window will pop up showing the default parameters for the script (see picture Bone Weight Copy script parameters). Put quality to 3 as a maximum: you don't need more quality and for Fallout meshes a higher quality value often makes the script to end in error.
  6. Press the OK button and wait a long time until the script has finished copying the weights, and then save the changes. If your armour has a lot of polygons, it will take longer for the script to copy all the weights, so if you are planning to reduce the polygon count, do that before copying the weights.
  7. If your armour is made of more than one object, repeat the process for each part of the armour, one by one.
Copy partially the weights from another mesh

Sometimes you will need to copy the weights from a source only to part of your armour. If, for example, you try your armour in game and see that part of it moves odd you can try fixing it by modifying the weights of that part of the armour unsing this method. To use it follow these steps:

  1. Don't delete any of the existing weights of your armour
  2. In Edit mode select only the vertices of the area of your armour whose weights you want to modify
  3. Go back to Object mode and select your object first, and then select the object you are going to use as the source of the weights (to select two objects at the same time press the Shift key). You can use as a source the body you are creating the armour for, or another armour that is made for the same body you are using. Take into account that each body has slightly different weights.
  4. Select the menu option Object -> Scripts -> Bone Weight Copy (see picture Bone Weight Copy script).
  5. A window will pop up showing the default parameters for the script (see picture Bone Weight Copy script parameters). Put quality to 3 and press the button Update Selected.
  6. Press the OK button and wait until the script has finished copying the weights, and then save the changes. The script will finish sooner than with the previous method because it only has to modify the weights of part of your armour.
Paint the weights by hand

This is the most difficult and arduous method for assigning weights to an object and usually it is only required to give the finishing touches to the armour, and only when none of the two previous methods have worked completely.

Weight Paint: Colour codes for weights

Painting weights by hand

To paint weights by hand (see picture Painting weights by hand):

  1. In Object mode select the object whose weights you want to modify.
  2. Go to Weight Paint mode:
    1. You'll see that your object shows now several colours, as shown in picture Painting weights by hand.
    2. These colours are the weights that each area has with respect to the bone you have selected in the Vertex Groups tab. The weights go from red that represents a weight of 100% to dark blue that represents a weight of 0% (see picture Weight Paint: Colour codes for weights). For example, in the picture the weights shown on the shirt are its weights with respect to the Bip01 Spine2.
  3. On the lower part, on the Paint tab, there are the brush controls. The most important are:
    1. Weight: modifying this value you will be painting higher or lower weights (1.00 means 100%, 0.90 means 90%, and so on).
    2. Opacity: indicates if the brush is completely opaque which means that with one stroke you will change completely the weight of the area you are painting, or translucent which means that with each stroke you only modify the existing weights a little.
    3. Size: if the brush is very big you'll be modifying the weights of a big area of the mesh with one stroke.
  4. You'll see that the cursor on the screen has the shape of a brush. To modify the weights of your armour simply select the bone whose weights you want to modify on the Vertex Groups area and paint with the brush on your armour.
  5. If you want to modify the weights of more than one bone you will have to repeat the process for each bone, selecting it in the Vertex Groups area.
Note: Growlf has released this utility: Growlfs TES5 Blender Animation Chain that contains some of the vanilla animations and a full skeleton. This utility makes it faster to paint the weights by hand, to refine them, as you can see the results of changing the weights immediately in Blender without having to export the mesh and test it in game. I absolutely recommend it.

Fix the dismemberment weights

Vertex groups

Right now Blender cannot copy the dismemberment data correctly for Skyrim meshes, so you'll have to do that part manually, but it is not too difficult.

Skyrim armour meshes use three body parts:

  • BP_TORSO: covers the whole body except the arms (from below the elbows to the wrist) and the legs (from below the knees to the ankles)
  • BP_RIGHTARM: covers the arms (from below the elbows to the wrist) and the hands
  • BP_LEFTLEG: covers the legs (from below the knees to the ankles) and the feet

To work with these body parts look at the Vertex groups your armour has after you've assigned all the weights to it, as shown in picture Vertex groups. You will probably have already a BP_TORSO vertex group, but it will contain all the vertices of your mesh. If you want to assign some of the vertices to other dismemberment part:

  • In Edit mode select the vertices you want to remove from the BP_TORSO vertex group.
  • Click on the Remove button in the Vertex Groups area.

If you need to create the BP_LEFTLEG or the BP_RIGHTARM vertex groups:

  • Click on New and give a name to the group you've just created (BP_LEFTLEG or BP_RIGHTARM).
  • Put the Weight of the group to 1.000.

Then, to assign some vertices to those newly created Vertex groups:

  • In Edit Mode select the vertices you want to add to the BP_LEFTLEG vertex group
  • Select the BP_LEFTLEG vertex group from the dropdwon list
  • Click on the Assign button.
  • Repeat the process for the BP_RIGHTARM vertex group

Go to Part 2 of the tutorial

Go to Creating an armour for Skyrim. Part 2

References