Creating an armour for Fallout 4. Part 2

From Nexus Mods Wiki
Revision as of 17:01, 22 July 2016 by SydneyB (talk | contribs) (Meshes invisible in game: typo)
Jump to: navigation, search

Overview

This is the part 2 of the tutorial for creating an armour or outfit for Fallout 4. You can find the first part of the tutorial here Creating an armour for Fallout 4. Part 1

Cut parts of the body hidden by the armour

Cutting the hidden body parts

Once you've copied all the weights from the body to your armour and set the dismemberment vertext groups select the body in Object mode and go to Edit mode. In Edit mode select all the faces of the body that are completely hidden by the armour or outfit you are creating. Make sure that all the faces you are selecting are completely inside the armour because if you delete a face that is only partially hidden by the armour you'll see a hole in your character's body when using the armour.

This step is optional but it is worth doing it because:

  • you won't have to solve clipping problems because in almost no pose the body will go through the armour
  • the size of the mesh will be smaller, increasing performance
  • Bethesda does it ;)

At this point it may also be wise to combine as many of your objects as you are comfortable with combining, as this will save you from repeating steps in Nifskope later. To do this select the objects you'd like to join and press "Ctrl + J" and click "Join selected meshes."

  • Separating an object is usually easy to do as well. Hover over a vertex on the object you wish to separate and press the "L" key to select all linked vertices. Press "P" and then "Selected" to separate the selected vertices from the object.

Export the armour

Importing a new skeleton
Exporting the armour
Importing a new skeleton - Blender 2.7x
Parent skeleton - Blender 2.7x
Armature modifier - Blender 2.7x
Fallout 3 nif properties
Setting nif properties - Blender 2.7x
Exporting the armour - Blender 2.7x
Importing the armour without skeleton into 3ds Max
Exporting the armour in Fallout 4 format

Now you are ready to export your armour in nif format, that is the one Fallout 4's meshes use. As Blender doesn't support Fallout 4 nif format, yet, you'll have again to use 3ds as a bridge between Blender and Fallout 4:

  • First export the meshes from Blender using Fallout 3 nif format
  • Then import the Fallout 3 nif format into 3ds Max
  • And finally, export the meshes from 3ds Max in Fallout 4 nif format.

Export the armour from Blender as a Fallout 3 nif file

In Blender 2.49

First thing is to import a new skeleton for your armour:

  1. Make sure that on the Blender screen you see all the objects that form the armour, including the parts of the body that are not hidden by the armour, and that you don't see anything that is not going to form part of your armour (like the light or the camera. If you see those objects move them to another Blender layer and set that layer to invisible or Blender will export those objects together with your armour).
  2. Make sure that you have deleted all the skeletons you imported with the parts of the body, as explained at the beginning of this tutorial.
  3. In Object mode select one of the objects that form part of your armour and press the A key twice so as to select all objects of the armour.
  4. Select the menu option File -> Import -> NetImmerse/Gamebyro and select the .nif file of the body you imported before for creating the armour (for example the modified femabody.nif).
  5. In the screen that contains the importing parameters select the option Import Skeleton Only + Parent Selected as shown in picture Importing a new skeleton and press the OK button.

Now you have a skeleton in Blender and it is the parent of all the objects that form your armour.

To export the armour:

  1. In Object mode select the skeleton you've just imported and press A twice to select all parts of the armour and the skeleton.
  2. Press the Ctrl + A keys and select the option Scale and Rotation to ObData from the pop up menu.
  3. Keeping the skeleton and all the parts of your armour selected, select the menu option File -> Export -> NetImmerse/Gamebyro, enter the name of the nif file for your armour (for example MyArmour.nif) and the folder where you want to save it.
  4. Set the exporting parameters as shown in the picture Exporting the armour. 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 -> selected
    5. Export Skin Partition -> selected
  5. Press the OK button and wait until Blender finishes saving the nif file.
In Blender 2.7x

The process is the same as the one explained for Blender 2.49, but things are done a little different here, as parenting an object to a skeleton works differently, and the nifscripts require that you set things manually for each object you are to export.

First thing is to import a new skeleton for your armour:

  1. Make sure that on the Blender screen you see all the objects that form the armour, including the parts of the body that are not hidden by the armour, and that you don't see anything that is not going to form part of your armour (like the light or the camera. If you see those objects move them to another Blender layer and set that layer to invisible or Blender will export those objects together with your armour).
  2. Make sure that you have deleted all the skeletons you imported with the parts of the body, as explained at the beginning of this tutorial.
  3. In Object mode select one of the objects that form part of your armour and press the A key twice so as to select all objects of the armour.
  4. Select the menu option File -> Import -> NetImmerse/Gamebyro and select the .nif file of the body you imported before for creating the armour (for example the modified femabody.nif). Dont press the Import nif button yet!
  5. In the left bottom part of the screen, that contains the importing parameters, select the option Skeleton Only as shown in picture Importing a new skeleton - Blender 2.7x and then press the Import nif button.
  6. In Blender, in Object mode, select one of the objects you want to parte to the skeleton and then the skeleton. Then press Ctrl + P and you'll see a pop up window like the one shown in picture Parent skeleton - Blender 2.7x. Click on Armature deform from the list.
  7. If you've made the skeleton the parent of an object, you will see it linked to the skeleton in the right upper corner of Blender (the little triangles that are displayed at the right of the Scene root object, are the objects parented to the skeleton). Also, you will see that your object has a new Armature modifier as shown in picture Armature modifier - Blender 2.7x.

Now, before exporting the armour, you have to set some parameters manually. As ypou are going to export the nif file in Fallout 3 nif format, the parameters have to be set to the ones used by Fallout 3 nifs. You can check the values of those parameters opening a Fallout 3 mesh in NifSkope, like in picture "Fallout 3 nif properties". Check Version, User version 1, User Version 2 and also the shaders used by armours.

Now, in Blender, for each of the objects that form the armour you are to export (except the skeleton), fill the values in the NifTools Object Panel and Niftools Shader panel as shown in picture Setting nif properties - Blender 2.7x. The settings should be, for Falllout 3:

  • Niftools Object Panel:
  • Note: The nif version has to be written exactly in the same format as it is written in the Skeleton that you've parented to your armour. Check how it it written there and write it in the same format in all the objects that form your armour or the exporting process won't work.
    • Nif Version = 20.2.0.7 or 20.02.00.07
    • User version = 11
    • User version 2 = 34
    • Nif Root Node = NiNode
    • BS Num UV Set = 0
    • UPB = leave this blank
    • BSXFlags = 0
    • Consistency Flag = CT_STATIC
    • Object Flag = 14
    • Nif Long name = enter a name for your object here
  • Niftools Shader Panel:
  • Note: It really doesn't matter what shader you select here as you will have to redo all this in NifSkope once your mesh is in the correct Fallout 4 format. Now you onky have to select some coherent options so the exporting process works.
    • Shader Type = BS Shader PP Lighting Property
    • BS Shader Pp Lighting = SHADER_DEFAULT
    • Select the shaders:
      • Remappable textures
      • Skinned
      • Specular
      • Z Buffer Test

Set these settings for each of the objects that form your armour.

To export the armour:

  1. In Object mode select the skeleton you've just imported and press A twice to select all parts of the armour and the skeleton.
  2. Press the Ctrl + A keys and select the option Rotation&Scale from the pop up menu.
  3. Keeping the skeleton and all the parts of your armour selected, select the menu option File -> Export -> NetImmerse/Gamebyro, enter the name of the nif file for your armour (for example MyArmour.nif) and the folder where you want to save it. Don't press the button Export nif, yet!
  4. Set the exporting parameters in the left bottom section of the window as shown in the picture Exporting the armour - Blender 2.7x. It is important that the parameters are set like this:
    1. Game -> Fallout 3
    2. Process -> Geometry only (nif)
    3. Smoothen Inter-Object Seams -> selected
    4. Flatten Skin -> selected
    5. Skin Partition -> selected
    6. You may also have to increase the number of Max Partition Bones from the default 18 to 50, as the skeleton in Fallout 4 has lots of bones.
  5. Press the Export nif button and wait until Blender finishes saving the nif file.
Note: For some meshes, the exporting script has problems triangulating the faces, so it is a good idea to do that before exporting. To do that, select each object and:
  • In Edit mode, select all vertices (press A to deselect any selected vertex and then press A again to select all of them)
  • Select the menu item Mesh -> Faces -> Triangulate Faces
  • Wait until Blender finishes triangulating all faces of your object, and repeat for the rest of the objects that form your armour.

Use 3ds max to convert the Fallout 3 meshes into Fallout 4 meshes

Now you are going to use 3ds max again as a bridge between Blender and the game.

  1. Import a vanilla Fallout 4 mesh that uses the same skeleton than your armour (for example, the femabody.nif) into 3ds Max (see Importing intro Blender all parts of the body on how to do that
  2. In 3ds Max, delete the meshes and keep only the bones (right click on the meshes and select delete). Make sure that you don't delete any of the bones in the process.
  3. Once you've deleted all the meshes, press Ctrl + A to select all the bones.
  4. Then import the armour you've just exported from Blender as a Fallout 3 format into 3ds Max, but without the skeleton (as you are going to use the one you already have in 3ds Max from the vanilla nif file), as shown in picture Importing the armour without skeleton into 3ds Max.
  5. Once 3ds Max has finished importing your armour, select everyting (meshes and bones) by pressing Ctrl + A
  6. Export your armour with in Fallout 4 format, with the settings shown in picture Exporting the armour in Fallout 4 format.

Adjust the armour in Nifskope

NifSkope Settings
Rename Ninode and Remove BSLightingShaderProperty nodes
Copy and Paste nodes
New BSLightingShaderProperty node
Moving the BSLightingShaderProperty node to its right position
Editting properties
Bounding Sphere set to 0
Segments
XYZ Translation

As the modelling tools are not yet fully adapted to Fallout 4, we need to do several adjustments in NifSkope before we can test the armour mesh in game, but the number of adjustments is minor when compared to what was required for Skyrim :)

First, deactivate two settings in NifSkope as shown in picture NifSkope Settings:

  • Deactivate Auto Sanitize Before Save, under the File menu item.
  • Activate Disable Shading, under the Render menu item (if you don't activate this, you won't see the meshes in NifSkope). You'll have to activate this everytime you enter NifSkope.

Open two windows of NifSkope:

  • In one Nifskope window load your armour nif file (the nif file you've just exported from 3ds max in Fallout 4 format).
  • In the other Nifskope window load a vanilla Fallout 4 nif file that is similar to your armour (for example, load another armour).

In your armour nif file:

  1. Change the name of the NiNode of your armour to match the name of the NiNode of the vanilla nif file (usually you will have to change the name of the NiNode in your armour to Scene Root, as shown in picture Rename Ninode and Remove BSLightingShaderProperty nodes)
  2. Expand all the BSSubIndexTriShape nodes of your mesh and remove all the BSLightingShaderProperty nodes. To do this, right click on each of the BSLightingShaderProperty node and select Block -> Remove Branch from the pop up menu.
  3. Then right click on one of the BSSubIndexTriShape of your armour and select Block -> Copy Branch from the pop up menu.

In the vanilla nif file:

  1. Go to the vanilla nif file, right click on the NiNode and select Block -> Paste Branch from the pop up menu.

Repeat the copy from your armour and paste to the vanilla nif file for all the BSSubIndexTriShape nodes of your armour. Once you've done, save the vanilla nif file with a new name (don't overwrite any nif file from the game!) as this will be your armour nif file now. You can close the window with the armour file you exported from 3ds Max as you are not going to use it anymore.

In the vanilla nif file (that you've renamed, and contains now your armour BSSubIndexTriShape nodes).

  1. Expand one of the BSSubIndexTriShape of the original vanilla outfit, right click on the "BSLightingShaderProperty" and select Block -> Copy Branch from the drop down menu.
  2. Right click on the NiNode and select Block -> Paste Branch. This will create a new BSLightingShaderProperty node as shown in picture New BSLightingShaderProperty node.
  3. Note down the number of the new node you've just added (84 in the example picture)
  4. Select one of the BSSubIndexTriShape of your armour, and browse down in the Block Details until you see the BS Properties property as shown in picture Moving the BSLightingShaderProperty node to its right position.
  5. Expand the BS Properties and in the first value change the None to the number of the node you've added (84 in the example). Now the BSLightingShaderProperty node has moved and is shown under the BSSubIndexTriShape node.
  6. Repeat the process of Copy, Paste and Move BSLightingShaderProperty nodes until all the BSSubIndexTriShape nodes of your armour have one.
Note: if one of the BSSubIndexTriShape nodes of your armour is a body part (where the armour shows the skin), then use for it the BSLightingShaderProperty of a node in the vanilla outfit that also corresponds to the body.

The last part is editting some properties of each of the BSSubIndexTriShape nodes of your armour:

  1. Select one of the BSSubIndexTriShape nodes of your armour and in the Block Details:
    1. Change the value of Unknown Short 1 to 0 and the value of VF5 to 0, as shown in picture Editting properties.
  2. Then scroll down in the Block Details section:
    1. Expand the Bounding Sphere property and set to 0 the Center and Radius values as shown in picture Bounding Sphere set to 0, as clothes / armour don't use a bounding sphere.
    2. Change the value of Num A to 4 and of Num B to 4, too, as shown in picture Segments.
    3. Click on the green arrow at the right side of the Segments property: this will generate the 4 segments you've indicated in the Num A.
    4. Expand the 4 segments you've just generated.
      1. In all the segments, set the value of Unknown Hash to 429496729.
      2. In the last segment, set the value of the Triangle Count to the same number that is displayed in the Num Triangles 2 property that is just above the Num A property (in the example shown in the Segments picture, the value is 5856).

These segments indicate the partitions of the armour that the game uses for dismemberment. Setting Num A and Num B to 4 makes each node of the armour to have only one dismembertment partition, but it is what we can do by now.

Now you can delete all the BSSubIndexTriShape nodes of the vanilla mesh you still have in the nif file. After doing that, your nif file will only contain the BSSubIndexTriShape nodes of your armour, and it is a nif file that works in Fallout 4.

XYZ Translation

You will see that your armour mesh is positioned higher than the vanilla outfit mesh. It doesn't matter, it will work fine in game as the skeleton is in the right position and your armour is rigged to the skeleton. But, if that bothers you, you can move all the BSSubIndexTriShape to the same position the vanilla meshes are:

  1. Select the BSSubIndexTriShape node you want to move
  2. In Block Details change the Translation property values to the ones shown in picture XYZ Translation:
    1. X = 0.0002
    2. Y = 0.8818
    3. Z = -120.8440

Meshes invisible in game

Some people (including me) are experiencing the invisibility bug in Fallout 4: for some reason some custom / modified meshes are invisible in game. It is not yet clear what causes it or how to fix it, but in my experience it is related to the mesh having one or more bones attached to it that actually have no weights.

Go to Fixing Invisible Meshes for Fallout 4 to find a way to fix the invisibility with rigged objects (armours, outfits, etc).

Go to Part 3 of the tutorial

Go to Creating an armour for Fallout 4. Part 3

References