NifSkope Comprehensive Guide

From the Oblivion ConstructionSet Wiki
Revision as of 11:29, 26 October 2011 by imported>Ethatron (→‎Gloss Texture: not Glow Texture)
Jump to navigation Jump to search


Introduction

The purpose of this guide is to explain and walk you through the ins and outs of working in NifSkope. This guide should continue to be updated as new releases of the NifSkope tool is released. The guide should remain centered around the TES:Oblivion modding community by providing information and tutorials on creating mods for TES:Oblivion. Areas that need more information are noted throughout the guide so editing is encouraged if you have useful and correct information to add.

NIF Files and Installing NifSkope


What’s a NIF file?

Let’s start simple. A .nif file [example: dagger.nif] is created by the GameBryo Essentials Toolkit when the developer saves their final version of a game object. This object can be anything from a rock to a human head to a stone wall. GameBryo is the Game Engine that was used to create TES:Oblivion as well as TES:Morrowind before it.

These files are then compressed into a .bsa file by our good friends at Bethesda Softworks. The core need by Modders to make new meshes and textures or edit existing ones is to have the ability to edit these NIF files. That is where NifSkope comes in.

NifSkope is a .nif viewer/editor available free from the NIFTools team. They have created this program to enable us to view and edit Net Immerse Files (NIF).

Downloading and Installing NifSkope

Now that we know what a NIF file is lets go get the NifSkope program.

  • The most recent version of NifSkope and other information can be found at this page at the NifTools site.


  • The most recent version is listed at the top of the list
  • Windows users will use: ‘nifskope-x.x.x-windows.exe’, where x is version numbers.
  • Save the file to your Desktop.
  • Now go to your desktop and double-click the icon ‘nifskope-x.x.x-windows’
  • Follow the prompts and install NifSkope to your computer’s hard drive.
  • If you have problems with installation, please refer to the NifTools Forum.

Opening NifSkope for the First Time

Okay, so now we have NifSkope installed. Lets open it and see what’s inside.

  • Start -> All Programs -> NifTools -> NifSkope, NifSkope

Okay now we are in. First thing we need to do is tell NifSkope where the files we want to mod are.

  • Click: Render menu -> Settings…

This window controls NifSkope’s render window. You'll most likely never use 90% of the controls in here. We'll go into more detail on these later, so for now, all we are concerned with is the Auto Detect and Custom groups.

  • Auto Detect: Click ‘Oblivion’

You should have seen a file path appear in the Custom group. This file path should point to where you installed your TES:Oblivion game and then the /Data directory. If it doesn’t, then follow the instructions below. Otherwise click the small ‘X’ in the upper right and continue on to the next topic.

If the auto detect did not follow the correct path double click on the path it did provide. If it did not provide a path click the ‘Folder’ button. Either way enter the following:

  • C:/Program Files/Bethesda Softworks/Oblivion/Data

NOTE: This assumes that you installed the game into your C Drive, Program Files directory. If you are unsure of where you installed the game go to: Start, All Programs, Bethesda Softworks, Oblivion and right click on the ‘Oblivion’ icon and select ‘Properties’. In the ‘Target’ field you will find the install directory.

User Interface Overview

Now we will explore the user interface including all the buttons and menu items. Some of these you will always use and others never. But it is a good idea to at least understand what they all do.

The Main Window

NifSkope is amazingly intuitive and easy to navigate. The user interface is divided into the three primary (default) windows:

Render Window
  • The window on your right is the render window. This is where you will see the model your currently working on in 3D space. You can rotate, zoom, and pan in here. The blue line is your Z Axis; the red line is your X Axis; and the green line is your Y axis.
Block List
  • The window on your left is the block list window. This window displays the guts of your NIF file. This is where you will be editing and adding to the list of Ni data blocks (guts). The Ni data blocks are listed in a tree format much like a directory window. But we will get more into that later.
Block Details
  • The window at the top is the block details window. This window displays all the commands and instructions contained within each of the Ni data blocks. Editing or adding commands and instructions is how you create all types of effects on your meshes and textures.


There are also two non-default windows available to you. Let's go ahead and activate them so we can see what they offer us.

  • Click: View menu -> KFM
  • Click: View menu -> Reference Browser


KFM
  • This window displays the animation data contained within .kfm file types. KF and KFM files are file types used to 'pin' animations to models. This is an advanced topic which there is currently only limited information available on. Further information needed

NOTE: This doesn't mean that it isn't possible to create or edit animations. There has been talk on forums of the possibility of adding animations using Blender. If anyone has further information on this topic please add.

Reference Browser
  • This browser will display descriptions of all the data strings contained within the selected block in the Block List window. It will also display descriptions on commands and instructions on selected items in the Block Details window. This is very useful but should only be opened when needed.


Close the KFM and Reference Browser windows using the same method used to open them or just click the 'X' in the upper right of each window.

Menu Items

NifSkope contains five menu drop downs. Some are obvious (Save, About, ect.) and some not so obvious (Optimize, Sanitize, ect.). We will explore these in more detail below so first lets open a NIF file.

  • Click: File menu -> Load
  • Browse to your Oblivion install directory, then Data/meshes/weapons/iron
  • Click to highlight: battleaxe.nif
  • Click: Open


You may need to extract the .nif and .dds files from the .BSA archive files to access them, please refer to the BSA_Unpacker_Tutorial


You now have the iron battleaxe open. The iron battleaxe will be our NIF file used in the next few sections so if you need to come back to a section later just reopen it and start from where you left off.

File, View, & Render Menus

Now that you have a NIF file opened you will see the three default windows mentioned earlier are now populated. We will walk through the functionality of each of them later. For now, lets start with the menus at the top of the screen. Go ahead and try each of the menu items as they're explained. This will give you some good real time experience with their functionality.

File
  • Load: Loads a NIF file from the selected file path.
  • Save: Saves the NIF file to the selected file path.
  • Import, 3DS: Imports an AutoDesk 3DS Max file.
  • Import, OBJ: Imports a .obj (Object) mesh file.
  • Auto Sanitize Before Save: NifSkope will run all the 'Sanitize' scripts on your NIF file prior to saving if this is check marked.
  • New Window: Opens another fresh window of NifSkope.
  • Reload XML: Reloads only the NIF file's XML code.
  • Reload XML + Nif: Includes the NIF data in the XML reload. Basically a complete reload of the currently opened NIF file. Use this if your in a situation where you deleted something you didn't mean to.
  • XML Checker: Use this to check for XML code errors in NIF files. Use the window to select a directory and associated block. NifSkope will check all NIF files in the selected directory or errors and display the results. The XML Checker can be used not only to find errors in nifs, but to find all nifs in a specified folder, which contain a specified block (use Block Match, uncheck 'report errors only')
  • Resource Files: Used to find files within .BSA files, for example textures, which haven't been extracted. Further explanation/functionality needed.
  • Quit: Closes NifSkope. Beware! There isn't an auto save or a prompt to save your file first before closing.
View
  • Block List: Toggles window on/off.
  • Block Details: Toggles window on/off.
  • KFM: Toggles window on/off.
  • Reference Browser: Toggles window on/off.
  • Toolbars, Load Save: Toggles toolbar on/off.
  • Toolbars, View: Toggles toolbar on/off.
  • Toolbars, Animation: Toggles toolbar on/off.
  • Block List Options, Hierarchy: Changes the block list window to display Ni data blocks in an expanding tree format.
  • Block List Options, List: Changes the block list window to display Ni data blocks in a top down list format.
Render
  • Top: Positions the render view camera on the Z Axis (Blue Line).
  • Front: Positions the render view camera on the Y Axis (Green Line).
  • Side: Positions the render view camera on the X Axis (Red Line).
  • Walk: Enables walk mode. Use the W,S,A, and D key on the keyboard to pan and zoom the image in the render window.
  • User: Restores the render window camera position to the last 'Saved User View'.
  • Flip: Positions the render view camera in the opposite orientation. If viewing the +Z axis, clicking this will position the camera on the -Z axis.
  • Perspective: Switches the render window to an orthographic projection in normal view mode.
  • Save User View: Saves the current camera position. Restore by pressing 'User'.
  • Draw Axis: Toggles the X,Y,and Z axis image on/off.
  • Draw Nodes: Toggles the node images (like scene root) on/off.
  • Draw Havok: Toggles the havok meshes on/off.
  • Draw Furniture: Toggles the furniture animation markers on/off.
  • Show Hidden: Show hidden meshes contained in the NIF file on/off.
  • Show Stats: Show selected Ni block data in the render window on/off.


Render Window Settings

The render window settings control the search path, rendering, and lighting of the render window. These controls will make dramatic changes to the way your model is rendered and should be used sparingly. Let's walk through each of the setting options available to you.

Auto Detect
  • Pressing one of the buttons will cause NifSkope to seek out and find the directory your texture files are located in for the game named on the button; then adds the result to the list of search paths.
Custom
  • Add Folder: Adds a new folder to the list of search paths.
  • Remove Folder: Removes the highlighted folder from the list of search paths.
  • Move Up: Moves the highlighted folder up in the search list.
  • Folder: Opens a directory browser and will change the highlighted folder to the new folder that is selected.
  • Look for Alternatives: If check marked, NifSkope will search for an alternative texture file if the corresponding .dds file is not found.
Render
  • Anti Aliasing: Enables your graphic card's anti aliasing feature in the render window.
  • Textures: Enables the rendering of mesh textures in the render window.
  • Shaders: Enables the rendering of shader effects in the render window.
Up Axis
  • Sets the render windows Positive Height axis. Meaning that by default the Z axis is up in height. Please add information on how this will affect saved NIF files.
Culling
  • Cull Non Textured: If checked, NifSkope will not display meshes that do not contain an associated texture.
  • Cull Nodes by Name: If checked, NifSkope will not display Nodes containing the suffixes listed in the text box.
Light
  • Changes the render window ambient, diffuse, and specular light color. Selecting and rotating the triangle via the outer circle sets the hue and selecting inside the triangle and dragging the small white circle sets the shade.
Frontal
  • Check marking this locks the light source to the camera position. Unchecking this locks the light source to the location specified in the 'Position' group.

NOTE: Use this to get a better look at how your model will appear in the game.

Position
  • Sets the light source's position if 'Frontal' is unchecked.
Presets
  • Sunny Day: emulates the lighting effect of a sunny day.
  • Dark Night: emulates the lighting effect of night.

NOTE: Again, use these to get a better look at how your model will appear in the game.

Colors
  • Changes the render window background, foreground, and highlight color. Selecting and rotating the triangle via the outer circle sets the hue and selecting inside the triangle and dragging the small white circle sets the shade. The sliders will adjust the transparency of the foreground and highlight objects.

NOTE: Foreground will change the hue and transparency of your bones and scene root nodes.


Spells Menu

Spells are scripts used by NifSkope to perform various functions on your opened NIF file. They perform very useful and permanent (no undo button) changes which enable you to configure a NIF file for use by the GameBryo Game Engine. They will save you lots of time when editing/creating NIF files so it is important that you know what each of them do. We will now walk through each of these spells and explain their function:

Animation
  • Attach .KF: Attaches animations to the opened NIF file. More explanation needed.
Block
  • Insert: Allows you to insert a new Ni Block into the Block List.

NOTE: Remember: The new Ni Block will be fresh. Meaning it will not contain any command or instruction data. Copy and pasting Ni Blocks from another NIF is generally a better way to add new ones. Use sparingly.

  • Remove by ID: Removes all Ni Blocks that contain the specified suffix. [Example: ^NiBS will delete all Ni Blocks with the suffix 'NiBS']. This is primarily used to prepare NIF files for import into external editors like Blender.

NOTE: We will get into what Blender is later in this guide.

Optimize
  • Combine Properties: Combines Ni Block properties that contain the same Block Data. [Example: Two different NiTriShape blocks both contain the same material property. But each material property has a different Block number. Running this script will convert them to the same block number.
  • Split Properties: This spell is the opposite of Combine Properties. When run, it will assign a unique block number to each property regardless if they are the same.
  • Remove Bogus Nodes: This spell will remove NiNodes from your Block List that do not contain any Ni Blocks or Ni Data.
  • Strippify All TriShapes: This spell will convert all NiTriShape block to NiTriStrips blocks.

NOTE: This is a very useful spell when creating weapons as weapon shape data is contained in NiTriStrips blocks as opposed to NiTriShape blocks like armor.

Sanitize

NOTE: All of these spells will run automatically if the 'Auto Sanitize Before Save' selection under the file menu is check marked.

  • Adjust Link Arrays: This spell will reorder and removed empty links in your array data. Arrays [example: children] are data contained inside Ni blocks that list one or more links to other Ni blocks.
  • Adjust Texture Sources: Replaces / with \\ in texture paths and automatically sets texture format options for Oblivion NIF files. [Example Pixel Layout to 6, Use Mipmaps to 1, etc.]
  • Reorder Havok Blocks: This spell places imported or edited Havok blocks like collision data blocks to the correct hierarchy order.
  • Check Links: This spell checks the NIF file's data block links for errors, and then displays any resulting errors in a prompt window.
Batch
  • Make All Skin Partitions: This handy spell will automatically create NiSkinPartition blocks for all Ni shape blocks containing armature bones. NiSkinPartition blocks are found in NIF files containing movement transforming meshes like body parts, armor, and clothing.
  • Update All Tangent Spaces: This handy spell will automatically update/create all the 'Tangent space (binormal & tangent vectors)' extra data blocks.


NOTE: Skin partitions, armature bones, and tangent space blocks will be explained in more detail later in the guide. For now, just remember where these spells are located and what the spell will do to your NIF file.


About Menu

Use the about menu to check the version number of NifSkope and Qt.

Toolbar Buttons

Now we will focus our attention to the toolbar buttons. This section of the guide will explain what the command is for each button; rather then re-explain all the same functions we went through in the menu section.

Load Save
  • This toolbar has buttons to load and save your NIF file. It also displays the file path for each.
View
  • This toolbar allows you to quickly switch between render window views and walk mode.
Animation
  • Play Button: Plays the animation embedded in the NIF file. You will see the animation play in the render window.
  • Slider Bar: Allows you to quickly move to a specific time in the animation play cycle.
  • Loop Button: Toggles the animation play loop on/off. If on, the animation will continue to play until the play button is pressed again. Turn off to play the animation only once.
  • Switch Button: The button name implies that it switches the play slider between animations when multiple animations are present. Confirmation needed that this is correct - use discussion page please
  • Pull Down Menu: This menu implies that it shows a list of the current animations contained in the NIF file when multiple animations are present. Confirmation needed that this is correct - use discussion page please


Once you feel you have a general understanding of all the user interfaces, menu items, and toolbar buttons you are ready to proceed to the next section.

The Render Window

The render window is where your model is displayed in 3D space. The model is fixed on three axis: X, Y, and Z axis and the point where these three axis meet is X0,Y0,Z0 in 3D space. Each axis is assigned a color: X Red, Y Green, and Z Blue. Each axis also has an arrow head which points in the positive direction. All of this will be important when trying to debug the location of a model in the game environment.

Meshes & Textures

You should still have the battleaxe.nif file open. If not, open it now. You should see the 3D model of the iron battleaxe in the render window. Before we get into any more detailed information it's important that you understand what you're actually looking at. The battleaxe you see is actually a hollow mesh with a texture map skinned over the top of it.

Below are links to great Wikipedia articles on Polygonal Meshes and Texture Maps. It's highly recommended that you read these articles to get a better understanding of these two concepts. So get yourself a beverage of choice, click on the links, and read. Continue on with the guide when you're done.

Orienting the Model

You can orient the model by rotating, panning, or zooming. In this section we'll try each of these. We will also learn about selecting meshes in the render window, setting 'Save User View', and Walk Mode. Try each of these as we go through them.

The Basics

Zooming
  • Place your cursor over the render window and rotate your mouse's center scroll wheel to zoom in and out.
Panning
  • Place your cursor over the render window then press and hold down the center mouse button to pan the view.
Rotating
  • Place your cursor over the render window and then press and hold the left mouse button to rotate the view.

Save User View

This function allows you to save an orientation of the model so you can quickly return to it again later. Let's try it:

  • Orient the model to your liking.
  • Click: Render menu -> Save User View

Now the current orientation of the model in the render window has been saved.

  • Press the Z Axis View (Blue - View from above) toolbar button on the toolbar.
  • Now press the Restore User View (Lt Gray - Restore..) toolbar button on the toolbar.

The model is now reoriented back to the view that you saved!

NOTE: Get familiar with using the toolbars. They will save you time over using the menus. There are 'hot keys' for many commands in NifSkope. For example you can press CTRL+F9 to Save User View.

Selecting Meshes

You can select a model's mesh directly in the render window. This is useful when adding/editing models that contain more then one mesh since you can pick a specific mesh visually.

Our battleaxe is made up of two separate meshes: the handle and the blades. Place your mouse cursor over the render window and follow along.

  • Click on the blade portion of the battleaxe with your left mouse button.

Notice how the blades become outlined with white lines. The white lines are showing you the mesh beneath the texture map. Now look over to the Block List window and expand '0 NiNode Battleaxe'.

Notice how the 10 NiTriStrip Battleaxe:0 is highlighted. NifSkope has highlighted this section of the block list because you've selected its associated mesh in the Render Window. Now go back to the Render Window and select the handle. The highlight moves to 16 NiTriStrip Battleaxe:1 because block #16 contains the data pertaining to the handle mesh.

  • Right click on the blades portion of the battleaxe model.

Not only does the highlight move back to block #10 but a menu will appear. This is the 'Model Editing Menu'. For now, just remember how to open the menu. We'll get into more detail on this menu's options further in the guide.

Walk Mode

The primary use of this mode is to give the perception of 'walking' near to the model in the render window. When this mode is active you will no longer have the ability to rotate the model. The view will be fixed parallel to the perceived ground plane that will be present in the game environment. Meaning if the Z axis is up, your view will be locked on the Y axis plane. Let's try this:

  • Click: Render menu -> Settings... -> Up Axis, set this to Z.
  • Close the Render Settings menu.
  • Press the 'Enable Walk Mode' (Dk Gray) toolbar button.
  • Hold your mouse over the Render Window.
  • Press and hold the center mouse button to 'walk' the model around the viewport.
  • Press and hold the left mouse button to move the model around the viewport.
  • Rotate the center mouse wheel button to zoom in and out.

Notice how the model rotates as you walk around it. This gives the perception of being a fixed object in 3D space and is how the model will appear when a player is walking near your object in the game environment.

Try this example:

  • Click: Open on the toolbar menu
  • Go to: Data\meshes\architecture\skingrad
  • Open: skhousemiddle01.nif
  • Click: Render menu -> Settings... -> Frontal, uncheck
  • Position -> Declination: -80, Planar Angle: 45
  • Click: Presents -> Dark Night
  • Close the Render Settings Window.

Now place your mouse cursor over the render window and walk left and right across the model. This will give the perception of walking past this Skingrad house at the dead of night with the moon overhead.

Play around with orienting the model of this house using both 'Save User View' and Walk Mode. Proceed on with the guide when you're ready to continue.

Now lets get our render setting back to default:

  • Click: Render menu -> Settings... -> Check: Frontal
  • Click: Presents -> Sunny Day
  • Close the Render Settings Window.
  • Reopen your iron battleaxe model. [Data\meshes\weapons\iron\battleaxe.nif]

Scene Root Node

All NIF files start with a Scene Root Node (0 NiNode). This is the location of X0,Y0,Z0 in 3D space. Everything in the game environment is positioned based on the location of its associated Scene Root Node. You cannot move the Scene Root Node, but can move the associated model in relation to it. This enables you to position the model to a specific location in reference to other objects in the game environment.

  • Click: Z Axis View button on the toolbar.
  • Expand the 0 NiNode Battleaxe block in the Block List Window.

In the render window look at the point where the three axis meet. Zoom in to get a good look at the blue 'X' with a yellow square in the middle. The yellow square is your Scene Root. It will appear when you select the 0 NiNode block.

  • Select block 1 BSX Flags in the Block List Window.

Notice how the scene root Node disappears but the blue 'X' remains to show you where the zero point is. It is very important to remember this when you are importing a mesh into an existing NIF file. Improper positioning of the mesh can cause many types of problems when loading a new NIF in the game environment. Especially those dealing with animations, examples: drawing a sword from a scabbard or pulling an arrow from a quiver.

NOTE: A scabbard is the sleeve attached to your belt from where you draw your sword. A quiver is the pouch that holds all your arrows. It's worn like a shoulder pack.

Flags & Flag Blocks

Flags are used to tell the game engine that it needs to set special variables to the loaded model. These variables can be anything from havok data to special animation sequences. Flags are contained within various block types and must be set to specific numerical values for the NIF to run properly in the game environment.

NOTE: Flags are an advanced topic which there is only limited information available on. This section is likely to be updated often by the modding community as new information becomes available.

BSX Flags

BSX flags tell the game engine what type of object this is. You will find BSX flags on all world objects but never on character models, nor clothing and armor because they replace a section or sections of the base character model when equipped. All world objects must have an associated BSX Flag.

NOTE: Clothing and armor are special cases since it is both necessary to replace a section of the character model, and be able to place the object in the game environment. You will notice that all clothing and armor contain two NIF files: example shirt.nif & shirt_gnd.nif. The _gnd version of the clothing or armor model is used as the world object and so has a BSX Flag.

In the Block List Window:

  • Click to highlight: 1 BSX Flags BSX

Now look at the Block Details Window -> Flags -> Value column

You'll see the number '3' in this column. This value tells the game engine that this is a weapon model. The game engine will now set certain animation and collision variables to this model pertaining to weapons. Examples are the animations played when striking rocks or walls with a weapon vs. striking an NPC.

Extra String Data: Prn

Extra data blocks are required to tell the game engine additional information about your model. In the case of a weapon model the Prn Block tells the game engine where your weapon model is going to be placed on the character model.

NOTE: Don't confuse this with the weapon type pull down menu in the Construction Set when creating new weapons. That section tells the game engine what animation to play. The Prn block tells the game engine where to place the model. [Example: You cannot have a side mounted weapon set as 'Blade 2-Hand']

In the Block List Window:

  • Click to highlight: 2 NiStringExtraData Prn

Look at the Block Details window -> String Data -> Value column

"BackWeapon" is listed here. This tells the game engine that this weapon is a back mounted weapon. The game engine will place this weapon's scene root at the 'BackWeapon' location on the character model.

NOTE: In some instances you will find a Prn Block without an associated BSX Flag block. In this case the Prn Block is only telling the game engine where to place the object on the character model.

NOTE: See the Glossary section for a list of BSX Flags and Prn Strings.

Extra String Data: UPB Block

The UPB block specifies physics in terms of several principal variables. Since this data applies to the fundamentals of physics it is implied that the game engine's physics processing is affected by these variables. UPB is not the primary section of the NIF that sets the models physics. Each mesh contained in the NIF files has specific physics defined. See the Physics section for more information. The variables are:

Collision Groups
  • The effects of changing this value are unknown. Needs explanation. See Key2.nif
Mass
  • The name implies: Specifies the objects mass greater or lesser then the model geometry. Still experimenting with this. Needs confirmation. See Key2.nif
Ellasticity
  • Spelled incorrectly, it increases or decreases the objects elasticity. Elasticity sets the amount of springiness or amount the object will recover from being under strain. A rock has low elasticity and a rubber band has high elasticity.
Friction
  • Specifies an increase or decrease in the base value of friction. Friction will cause and object laying on a slope to slide or stop sliding. Glass has low friction and sandpaper has high friction. It is not known what a coefficient of friction value of zero specifies (glass or sandpaper?).
Unyielding
  • The effects of changing this value are unknown. Needs explanation.
Simulation Geometry
  • The effects of changing this value are unknown. Needs explanation.
Proxy Geometry
  • The effects of changing this value are unknown. Needs explanation.
Use Display Proxy
  • The effects of changing this value are unknown. Needs explanation.
Display Children
  • The effects of changing this value are unknown. Needs explanation.
Disable Collisions
  • The name implies that it disables the objects collision data. Needs confirmation.
Inactive
  • The effects of changing this value are unknown. Needs explanation.
Display Proxy
  • The name implies that the object will display a proxy of some sort if the proxy name is specified. Needs explanation.

Collision Blocks

These block types are used to define your model's collision data. Without collision data the model would be able to pass directly through solid objects. The collision data tells the game engine where the solid mass of your model resides and prevents this defined area from passing through other solid objects in the game environment.

Look at the Block List window:

  • Expand 0 NiNode Battleaxe
  • Expand 9 bhkCollisionObject
  • Expand 8 bhkRigidBody
  • Expand 7 bhkListShape
  • Expand 6 bhkConvexTransformShape

What these blocks tell the game engine is that this model contains a rigid body collision object. The collision objects are defined as various shapes: Capsule, Box, or Mesh (Are there others?). In this guide we will only be discussing capsule and box shapes. Creating and/or editing meshes are outside the scope of this guide.

bhkCapsuleShape

Look in the render window; notice the orange lines surrounding the battleaxe's handle? That is the collision object 'capsule'. You can edit the collision object using the Block Details window. Let's try that now.

  • Click to highlight: 4 bhkCapsuleShape
  • Look at the Block Details List.

What you're seeing in the Block Details is a list of the data contained in this collision object. Since this object's base shape is a capsule you have the radius and locations of the capsule's beginning and end.

  • Double-Click: Block Details -> Radius -> Value (0.3000)
  • Highlight the value 0.3000
  • Type in: 1.5000
  • Hit Enter on the keyboard

Now look at the render window. The capsule radius has increased! Don't forget to change the values for Radius 1 and Radius 2 to 1.5000 also. Now we will change the location of the capsule's beginning and end.

  • Double-Click: Block Details -> First Point -> Value
  • Enter: X 1.0000 Y -5.0000 Z 0.0000
  • Hit Enter on the keyboard
  • Double-Click: Block Details -> Second Point -> Value
  • Enter: X -1.0000 Y 5.0000 Z 0.0000
  • Hit Enter on the keyboard

Now look at the render window. The capsule is on an angle and longer then before! Use this method to adjust the shape and location of a collision capsule to fit a new or edited mesh. Go ahead and play with the radius and point values. Then continue on with the guide when you're ready.

bhkBoxShape

This type of collision object creates a box around your model or section of your model. Notice how the developer used a box shape around the blades and a capsule around the handle. Combinations of collision object shapes can produce a more life like experience for the player. Let's look at the box shape in more detail.

  • Click to highlight: 5 bhkBoxShape
  • Block Details window -> Dimensions

The X,Y,Z coordinates here adjust the overall size of the box shape. Each in relation to its length, width, and thickness.

  • Double-Click: Dimensions -> Value
  • Enter: X 5.0000 Y 5.0000 Z 2.0000
  • Press Enter on the keyboard

Notice how the box shape has grown in size! Use this method to fit a collision box around a new or edited mesh. Now let's adjust the location of our box shape.

  • In the Block List window:
  • Click to highlight: 6 bhkConvexTransformShape
  • In the Block Details window:
  • Right-Click: Transform row -> Transform, Edit

The Transform Editor window opens. This window allows you to adjust transform data for this collision object. There are three sections:

Translation
  • Adjusts the location of the object in relation to the model's scene root.
Rotation
  • Rotates the object in relation to the model's scene root.
Scale
  • Scales the object from the size defined in the object's Dimensions Value.

NOTE: Capsule shapes can reside as children directly in the bhkListShape block. Box shapes however must reside as children to a parent bhkConvexTransformShape.

Go ahead and adjust each of these setting and see the resulting change to the box shape in the render window. It's important that you understand how the box shape is affected by each of the transform variables. Once you have a good understanding of these variables continue on with the guide.

Physics Detail

Modern game engines have the ability to simulate various principles of Physics. This is in effort to give a more life-like feel to the game environment. But this also complicates things in terms of both game development and Modding. In this section we will walk through the physics data contained in the NIF file as well as explain the need for careful adjustment of these values.

NOTE: It is intended to keep this section as simple as possible. Physics is a very complex subject which cannot be explained in this guide. Links are provided on each of the physics properties for readers who want to find more information on the topic. But the intent of this guide is to give the reader a basic concept behind each of the variables contained in NifSkope and leave the physics lesson to a College Professor.

  • File menu -> Open: Data\meshes\weapons\iron\claymore.nif
  • Expand: 0 NiNode Claymore
  • Expand: 8 bhkCollisionObject
  • Click to highlight: 7 bhkRigidBody

The iron claymore is a rigid body mass. To better understand why physics variables are required you should first understand what a Rigid Body is. Since the claymore model is a rigid body it is necessary for the bhkRigidBody block to tell the game engine how the claymore will react to its environment.

Layer
  • Sets the objects current layer. It's assumed that this is used by the developers while working in GameBryo. Doesn't appear to serve much other purpose but it's recommended that the proper layer be specified.
Col Filter
  • Specifies if this object is linked to other objects and appears to combine the collision data.
Layer Copy
  • Likely used in GameBryo when coping collision objects to other layers. Not used otherwise. Set this to the same value as Layer.
Layer Copy
  • Likely a variable in GameBryo that determines if the Collision Filter was copied to the new layer along with the collision object. Not used otherwise.
Translation
  • Moves the collision object by the specified amount along the X, Y, or Z axis in relation to the object's scene root.
Rotation
  • Rotates the collision object by the specified amount along the Y, P, or R axis in relation to the object's scene root.
Linear Velocity
  • The rate or change in rate at which this object is moving along a straight line when accelerated. This specifies a direction (the line) in X,Y, and Z of the object's Linear Velocity when accelerated. Default is zero which does not alter the direction of acceleration (i.e. you throw it straight, it goes straight). This is one of the two required properties in Linear Velocity, the other being speed.
Angular Velocity
  • The direction and speed of which this object is rotating when accelerated. This specifies a direction (the direction) in X,Y, and Z of the object's Angular Velocity when accelerated. Default is zero which does not alter the direction of rotation (the Right Hand Rule). This is one of the two required properties in Angular Velocity, the other being speed.
Inertia
  • This list of variables defines how the objects mass is distributed across the model. It appears to specify 12 equally distributed points along the models centerline from bottom to center to top. Applying all the inertia to one section can make the object react top or bottom heavy.
Center
  • NifSkope: …used to relocated the object's center of mass.
Mass
  • A numerical value of the object's mass. It is assumed that this has some relationship to weight but how or in what way is unknown. It's advised to find an object of similar cubic size and apply that objects mass value to your object.
Linear Damping
  • Reduces the amount of linear motion when an object is accelerated. It is noted by NifSkope that a value too low will cause the object to be set in a fixed (non-moving) state.
Angular Damping
  • Reduces the amount of angular motion when an object is accelerated.
Friction
  • Specifies the objects friction in a numerical value. It's assumed that this numerical value has some relationship to an object's coefficient of static friction. But how or if is unknown. It's advised to find an object with similar friction characteristics and copy the value into your objects friction value. For example, you wouldn't assign the friction value of a shield made of bone with the friction value of a shield made of glass.
Restitution
  • This variable sets the object's coefficient of restitution in a numerical value. It is unknown how the value affects the resulting coefficient of restitution in applying elasticity or inelasticity. For example a tennis ball has a coefficient value of 0.71 while a steel ball bearing has a value of 0.60. It is advised to use a value found on a similar object.

NOTE: Do not confuse Restitution with Elasticity; they are two completely separate principles. It's understood that restitution is the measure of how an object gives back what was gained during an impact whereas elasticity is a measure of how an object deforms while under strain.

Max Linear Velocity
  • As the name implies, this value specifies the maximum velocity the object can obtain when accelerated linearly. Increasing or decreasing this has dramatic effects on the life-like feel of game objects.
Max Angular Velocity
  • As the name implies, this value specifies the maximum velocity the object can obtain when accelerated in a spin. Increasing or decreasing this has dramatic effects on the life-like feel of game objects.

NOTE: If when your object is dropped it appears to spin out of control this is usually a sign that the Max Angular Velocity and/or Max Linear Velocity has been altered or is incorrect for the object's mass.

Penetration Depth
  • This variable makes a dramatic difference in the life-like appearance of stabbing an object. The collision box will prevent your object from passing through other rigid objects, but increasing this value changes that for stabbing animations.

NOTE: Use sparingly! While it does look impressive to impale a foe completely through its body during a fight the same effect will be applied to other rigid objects like a stone wall. This could defeat the life-like feel for your weapon.

Motion System
  • GameBryo has several types of motion systems available to the developer. This value defines which of the motion systems is used on your object. It is generally good advice not to change this value. See other similar objects when defining this value.
Quality Type
  • This defines the quality of motion during animations. It is assumed that this is to preserve processor speed when rendering animations. It's generally good advice not to change this value. See other similar objects when defining this value.
Num Constraints
  • Defines how many bhkConstraint nodes are bound to your object. Use the array update to add constraints.
Constraints
  • This is where the constraint nodes are listed. bhkConstraint nodes are used to add constraints to your collision object. Works well on bound weapons that limit the player's actions.

Materials

Data pertaining to the object's material type is defined as part of the bhkCollisionObject block. Since a game object can be made of several types of materials the actual material definition is located both in the bhkShape nodes.

  • File menu -> Open: Data\meshes\weapons\iron\claymore.nif
  • Expand: 0 NiNode Claymore
  • Expand: 8 bhkCollisionObject
  • Expand: 7 bhkRigidBody
  • Expand: 6 bhkListShape

First we will look at the root 6 bhkListShape node so click to highlight this. Notice data block 'Material'. The iron claymore is HAV_MAT_METAL. This will apply sound and animations to your object pertaining to a metal object. You will hear the metallic cling when striking something hard and see the dust/partial animations.

The material specified in the root node is the objects overall material type or better explained as the material group which the object is assigned. I.E. even if you have a glass weapon with a wooden handle, your object's material would be: HAV_MAT_GLASS. The root node defines how the object reacts to other objects. The specified material under each of the bhkShape nodes defines how your object will react when collided by other objects. Let's look at that now.

Click to highlight 4 bhkCapsuleShape. Notice the first data block 'Material' is defined HAV_MAT_METAL same as the root node. This is because that section of the claymore is made of metal and should play the metallic sound and animations when struck by something. If you change this to HAV_MAT_WOOD the object would play a wooden thud sound and wood slivers and dust animations when struck by another object.

While it's not necessary to define different material types to different sections of your object it does give a more life-like experience to the player. Weapons are not a good example of this because the player will seldom, if ever; strike a weapon with a weapon. But it is very important to define proper materials on world objects that contain different material types.

  • See the Glossary for a list of Material Types

Shape Blocks

There are two primary shape blocks contained within NIF files. These are NiTriStrips and NiTriShape. They both define the shape of the mesh and the location of the texture map but each has a specific use in the game engine. It's important that the correct shape block is used when creating a new game object.

NiTriStrips

NifSkope defines NiTriStrips as, "A shape node that refers to data organized into strips of triangles.". The shape node being NiTriStripsData.

  • Expand 0 NiNode BattleAxe
  • Expand 10 NiTriStrips BattleAxe:0

In this block contains all the mesh, material, and texture map information necessary to render the model correctly in the game environment. Later we will break down each of these data nodes to better understand their purpose.

NiTriShape

NifSkope defines NiTriShape as, “A shape node that refers to a singular triangle data.”. It is assumed that this is necessary to enable the mesh to conform to movements made by the associated actor. Meaning: NiTriShape data blocks are found on objects that are worn by an actor in the game environment. As the actor moves (i.e. swings a sword) the mesh around the actor must move along with him/her. And as such must conform to this movement; whereas an object such as a longsword does not need to conform to the actors movements.

  • Click: File menu -> New Window
  • Make the new window active on your desktop.
  • Click: Load on the toolbar.
  • Go to: /Data/meshes/armor/iron/m
  • Double-Click: boots.nif
  • Expand 0 NiNode Scene Root
  • Expand 1 NiTriShape Foot

Just as a NiTriStrips block, it contains all the mesh, material, and texture map information necessary to render the model correctly in the game environment. But notice the additional data node NiSkinInstance. This node is used to define what armature bones are associated with this object. For now, just remember where it’s located. We will get more into armature bones later in the guide.

  • Go ahead close the NifSkope window with the boots.nif file. But leave the battleaxe.nif window open as we will need it for the next section.

Shape Block Details

You now have a basic understanding of the Block Details window, and understand that you can edit the information contained within the Data Blocks shown in the Block List. You also have a basic understanding of what the different Data Blocks and Nodes do. So now let’s get into more detail on the Nodes each Shape Block contains.

If you haven’t done so already:

  • Expand 0 NiNode BattleAxe
  • Expand 10 NiTriStrips BattleAxe:0

Tangent Space (binormal & tangent vectors)

It’s important to know what tangent space is, but this article cannot explain it better then what is already available to you on Wikipedia. Follow the link and read this Wikipedia article on Tangent Vectors. This data array defines the model's tangent vectors, and is required for your model to display properly in the game environment.

The tangent space binormals and vectors must be updated anytime a new mesh is imported into NifSkope. Luckly the NifTools Team has provided a tangent space update script for you.

  • Right Mouse Click: 11 Tangent Space (binormal & tangent vectors)
  • Select: Block -> Remove

Block 11 has now been deleted from your Block List. That’s okay, we will now add it back.

  • Right Mouse Click: 10 NiTriStrips BattleAxe:0
  • Select: Mesh -> Update Tangent Space

Block 11 Tangent Space (binormal & tangent vectors) has been created for the NiTriStrips BattleAxe:0. When updating the tangent space it isn’t necessary to first delete the existing one but is recommended as a reminder.

NiMaterialProperty

This block contains all the data necessary for the game engine to simulate the properties of a specified material type. For example, glass if very reflective and smooth as opposed to a rock which is dull and coarse. The material type will greatly affect the way your model renders in the game environment.

Oblivion already contains several ‘pre-made’ material types for almost every type of material used in the game. Just copying and pasting material data from one NIF to another is a great time saver. But it’s important to know what each of the parameters contained in this block do to become a more skilled modder and tweak the setting to achieve custom look to your model.

  • Click to highlight: 12 NiMaterialProperty 6 – Default
  • Look at the Block Details window
Name
  • This defines the name of the material property. There are several pre-set names that the developers used for their material properties. There have been discussions that suggest the name of the material affects certain visual effects the game engine will apply to the model when rendered in the game environment. Needs confirmation/explanation if true.
Num Extra Data List
  • The quantity of extra data strings assigned to this material property. To add extra data strings see section: Adding Extra Data Strings.
Extra Data List
  • List of extra data strings added to the material property. UPB is an example of an extra data string. Extra data strings are not typically applied to material property nodes.
Controller
  • Specifies the block number for the NiTimeController. The time controller is used to specify the amount of time (and other variables) between sequences of colors defined within multiple material property nodes. They are typically used on candles to give the perception of flickering. This is an advanced topic which is outside the scope of this guide.
Ambient Color
  • Defined as: existing or present on all sides. The ambient color is radiant from all sides of the model equally. The color is specified in HTML Notation in the value column.
Diffuse Color
  • Defined as: not concentrated or localized. The diffuse color will blend into the colors currently in the texture equally like a tinted film. The color is specified in HTML Notation in the value column.
Specular Color
  • Defined as: of, relating to, or having the qualities of a mirror. The specular color is emitted from the reflective surfaces of the model. The color is specified in HTML Notation in the value column.
Emissive Color
  • Defined as: an act or instance of emitting. When in direct light or darkness, it's the color emitting from the model's surface like a glow. The color is specified in HTML Notation in the value column.
Glossiness
  • A numerical value of gloss effect applied to the model. The higher the value the greater the gloss effect is applied. Most general objects in Oblivion possess a base value of 10.
Alpha
  • Specifies the material's level of alpha/transparency in a numerical value. A value of 1 means the object is not transparent. A decrease in the value from 1 increases the object's alpha/transparency. This floating variable requires the node NiAlphaController and NiAlphaProperty to correctly render transparency in the game environment. It is used on objects such as ghost models and glass. We will go into more detail on applying Alpha Channel later in the guide.

Changing Colors in NiMaterialProperty

There are two ways to change the color value for Ambient, Diffuse, Specular, and Emissive Color contained in the material property node.

Menu Method

  • Right Click: Ambient Color in the Block Details window
  • Select: Color

What you see in front of you is the NifSkope color chooser window. There is an outer ring which defines the color hue. The triangle defines the shade. The shade can also produce black or white at the extremes. Let's give it a try:

  • Notice the white circle inside the outer ring. Select it with your Left Mouse Button and rotate it around the outer ring. This changes the hue.
  • Now select the white circle inside the triangle with your Left Mouse Button and drag it around inside the triangle. This changes the shade of the hue you selected in the previous step.
  • Click: ok

Now look at the Value column of the Ambient Color row. Notice how the cell is highlighted in the color you have chosen. Also look at your render window and notice how the model of the battleaxe has changed to show the ambient color you chose.

HTML Notation Method

Look at the Value cell for the row Ambient Color and notice the #ffffff text that is there. This is the HTML Notation for white. You can change this value by:

  • Double-Click: #ffffff in the Value cell of the Ambient Color row.

You now see three text boxes: Red, Green, and Blue specified by the first letter of each. The value 1 means that the associated color is at its minimum shade. The value of 0 means the associated color is at its maximum shade. Meaning, a primary color will become darker as the value approaches 0. For example, if you enter 0 for each of the primary colors you will end up with black. You can use variations of 0 - 1 in each of the primary colors to produce a specific hue and shade of your liking.

NiTexturingProperty

This data block contains all the information pertaining to the model's different types of image maps. The texture map is what gives your model color and definition and the most common type of map. Maps can also create visual effects on your model like a glowing appearance or artificial 3D. This section we will go over the basic concepts behind the different variables.

Num Extra Data List
  • The quantity of extra data strings assigned to this material property. To add extra data strings see section: Adding Extra Data Strings.
Extra Data List
  • List of extra data strings added to the material property. UPB is an example of an extra data string. Extra data strings are not typically applied to texture property nodes.
Controller
  • Specifies the block number for a NiTimeController. The time controller is used to specify the amount of time (and other variables) between sequences of textures defined within alpha property nodes. In the case of textures, it gives the perception of transparency like used on ghosts. We will go into more detail on applying Alpha Channel later in the guide.
Apply Mode
  • Defines how the texture will be applied to the model. There are preset ways the game engine can render the texture applied to the model to give it different appearances. Each apply mode is customized for a particular purpose. See the Glossary for more information on the various apply modes.
Texture Count
  • NifSkope: Number of textures. Always 7… No further information available on why this must be 7 or what this variable actually controls. Example, it's obviously telling the game engine that this object can have up to 7 textures: Base, Dark, Detail, Gloss, Glow, Bump Map, and Decal. But not all objects contain each of these and none contain all 7. Needs further explanation?

Texture Types

The next seven variables will determine what types of texture maps have been created for this mesh. A value of yes means the game engine will search for that texture type. Later in the guide we will go into more detail on each of the different types of texture maps. The variables contained within each of these sections are the same so this guide will only explain them once.

Source
  • Specifies the Block number containing the texture file path.
Clamp Mode
  • Determines how the texture is applied onto the mesh. Don't confuse this with Apply Mode. Clamp Mode effects how the texture is wrapped around the mesh surface and will also affect the appearance of stretching on the pixels. Typically, you want to wrap a texture onto the mesh in both directions.
Filter Mode
  • This sets the way the mipmaps will be rendered when looking at an object from a distance. Since there are only a set number of mipmaps (typically 9 in Oblivion) it is necessary for the game engine to blend two mipmaps together to produce the image at every possible distance. Tri-linear filtering is the most commonly used in Oblivion and should be your default.
UV Set
  • NifSkope: The texture coordinate set in NiGeometryData that this texture slot will use. Nothing else is known about this variable. Needs further explanation
Has Texture Transform
  • NifSkope: Determines whether or not the texture's coordinates are transformed. Nothing else is known about this variable. Needs further explanation

NiSourceTexture

This data node contains the file path to the mesh's texture map. There several variables that need to be defined that pertain to the texture map. Some examples are the use of mipmaps and alpha channel. This section we will go over the basic concepts behind the different variables.

Num Extra Data List
  • The quantity of extra data strings assigned to this material property. To add extra data strings see section: Adding Extra Data Strings.
Extra Data List
  • List of extra data strings added to the material property. UPB is an example of an extra data string. Extra data strings are not typically applied to texture property nodes.
Controller
  • Specifies the block number for a NiTimeController. The time controller is used to specify the amount of time (and other variables) between sequences of textures defined within alpha property nodes. In the case of textures, it gives the perception of transparency like used on ghosts. We will go into more detail on applying Alpha Channel later in the guide.
Use External
  • Defines whether the texture is contained in an external image file, such as a DDS file, or whether it is written into the NIF file itself, with the color values contained in a NiPixelData object.
File Name
  • The file path to the texture map.
Unknown Link
  • Appears to be asking for a link to an NiObject such as bhkCollisionObject. Needs further explanation
Pixel Layout
  • Defines the way the image will be stored. For example: Grayscale, 8-Bit, 16-Bit. For use in Oblivion, this variable is always set to 6.
Use Mipmaps
  • Specifies if mipmaps are used. Mipmaps are generally always included in Oblivion textures so this setting is typically: MIP_FMT_YES. Use MIP_FMT_NO to disable the use of mipmaps. We will go into more detail on mipmaps later in the guide.
Alpha Format
  • Used when a NiAlphaProperty node is preset in the Block List to define an Alpha Channel/Transparency. Otherwise this is set to either ALPHA_NONE or ALPHA_DEFULT. We will go into more detail on applying Alpha Channel later in the guide.
Unknown Byte/Byte 2
  • Unknown variables. Recommend to set as 1. Needs further explanation

Importing Meshes and Textures

You now have a basic understanding of what is contained in a NIF file from the Blocks to Block data. Now we will focus our attention on how to edit a NIF file. In this section we will learn how to perform the following:

  • Import an existing mesh
  • Import a new mesh
  • Import an existing texture
  • Import a new texture
  • Import existing Material Properties
  • Renaming a NIF file
  • Saving a NIF File
  • Saving a New Texture File

Open your battleaxe.nif file if you haven't done so already.

Importing An Existing Mesh

One of the most fundamental tasks to modding any game is the ability to add new meshes. NifSkope makes this a very simple task.

  • Expand: 0 NiNode BattleAxe
  • Right-Click: 16 NiTriStrips BattleAxe:1
  • Select: Block -> Remove Branch

NOTE: You might have noticed a selection in the editing menu for Remove. This option will remove only the currently selected node and not all the children below it. Remove Branch, however, will remove both the currently selected node and any children below it.

You have successfully deleted 16 NiTriStrips BattleAxe:1 and you will notice that the battleaxe's handle is missing from the model in the render window. Now lets import a new mesh to replace it.

  • File menu -> New Window
  • Toolbar -> Click: Load
  • Open: Data\meshes\weapons\daedric\battleaxe.nif
  • Expand: 0 NiNode BattleAxe
  • Right-Click: 16 NiTriStrips BattleAxe:1
  • Select: Block -> Copy Branch

NOTE: Same applies for copy as with remove. Copy Branch will not only copy the selected node but also all of the children below it.

  • Now activate the NifSkope window with your handless iron battleaxe.
  • Right-Click: 0 NiNode BattleAxe
  • Select: Block -> Paste Branch

You've done it! The iron battleaxe has been modded to add the daedric handle. Now be very careful not to save this file over your existing iron battle axe or the change will be permanent. You can go ahead and close the other window with the daedric battleaxe, but leave this modded iron battleaxe open as we'll be using it in the next few sections.

Importing A New Mesh

You now know how to import existing meshes from other NIF files. This section is an example of how to import an entirely new mesh like those created using Blender.

If you already have Blender and have created a mesh, you are welcome to use it in place of the one provided.

  • Click here and download the new mesh NIF file I've created for you.
  • Save the NIF file to your desktop.

If you don't have the modded battleaxe.nif file from the previous section open go ahead and open it now.

  • File menu -> New Window
  • Toolbar -> Load
  • Open: Desktop\newmesh.nif

Now you are in the mesh file I created for you. One thing to point out is that Blender can only export NIF files to the 20.0.0.4 version. Oblivion, however, uses the 20.0.0.5 version of NIF files. The process explained in the next few steps is referred to as the Blender workaround or sometimes even the NifSkope dance.

Now activate your modded iron battleaxe NifSkope window. What we will do now is import the older 20.0.0.4 NiTriShape into our newer 20.0.0.5 NifSkope window. This will enable the Oblivion game engine to use the new mesh. First we need to remove the old battleaxe blades from our modded iron battleaxe. Activate that window now.

  • Right-Click: 10 NiTriStrips BattleAxe:0
  • Select: Block -> Remove Branch

We have successfully removed the old battleaxe blades and are ready to import the new ones. Go back and activate the newmesh.nif window.

  • Expand: 0 NiNode newmesh
  • Right-Click: 1 NiTriShape BattleAxe:0
  • Select: Block -> Copy Branch

Return to the modded iron battleaxe window.

  • Right-Click: 0 NiNode BattleAxe
  • Select: Block -> Paste Branch
  • At the warning prompt Select: Continue

Now you will notice that the new blades have been imported into 16 NiTriShape and the blades are visible in the render window. We must now convert the new mesh into a NiTriStrips Block for use as a weapon.

  • Right-Click: 16 NiTriShape BattleAxe:0
  • Select: Mesh -> Strippify
  • Expand: 16 NiTriStrips BattleAxe:0

Notice that the mesh data block as also converted from 17 NiTriShapeData to 17 NiTriStripsData (you can go back to the newmesh.nif file to see this). But we are still missing a very important data block: NiBinaryExtraData Tangent space (binormal & tangent vectors). We must now add that data block to our new NiTriStrips block.

  • Right-Click: 16 NiTriShape BattleAxe:0
  • Select: Mesh -> Update Tangent Space

Node 17 NiBinaryExtraData Tangent space (binormal & tangent vectors) has been added! But we are not finished yet. Because this was a new mesh created from Blender it is important that we ensure the normals are correctly faced and smoothed. Otherwise we could encounter problems with the way the texture map appears in the game environment. Lets do that now.

  • Right-Click: 16 NiTriShape BattleAxe:0
  • Select: Mesh -> Face Normals
  • Right-Click: 16 NiTriShape BattleAxe:0
  • Select: Mesh -> Smooth Normals -> Click, Smooth

You have now successfully imported a new mesh into this NIF file! If you haven't done so already, now is a good time to save your modded iron battleaxe. We will be using this modded iron battleaxe for the next few sections. You can go ahead and close the newmesh.nif window.

  • Toolbar -> Save
  • Save In: -> Desktop
  • Name: mybattleaxe.nif

Importing An Existing Texture

Oblivion come stocked with countless pre-made textures from walls to human faces. All base textures will work on all meshes but the results might not appear as expected. We will try to add and existing texture to better explain why this is.

  • Expand: 0 NiNode BattleAxe
  • Expand: 10 NiTriStrips BattleAxe:1
  • Expand: 12 NiTexturingProperty

Notice the file path present in the value cell of 13 NiSourceTexture. It isn't necessary to use the Block Details window to change the base texture file path. You can edit the file path directly in the Block List window by double-clicking on it.

  • Double-Click: 13 NiSourceTexture -> Value Cell
  • Enter: textures\weapons\ironclaymore.dds

Now notice the handle in the render window and how it looks all scattered and broken up. The blade portion of the texture map is all split up across the handle and the grip is on the blade section of the battleaxe. The texture map didn't start with the claymore's handle on the bottom of the battleaxe and end with the claymore's blade tip at the top of the battleaxe. There's an important reason for this. It's called the UV Map. See The UV Map section for more detail.

So let's import the texture that is meant to be applied to this mesh.

  • Double-Click: 13 NiSourceTexture -> Value Cell
  • Enter: textures\weapons\DaedricBattleAxe.dds

Use this method to apply the correct texture map to an imported existing NiTriShape or NiTriStrips Block.

Importing A New Texture

You now know how to import existing textures from other NIF files. This section is an example of how to import an entirely new texture like those created using GIMP GNU Image Manipulation Program.

If you already have GIMP and have created a new texture, you are welcome to use it in place of the one provided.

  • Click here and download the new texture DDS file I've created for you.
  • Save the DDS file to: Oblivion\Data\textures\weapons

If you don't have the modded battleaxe.nif file from the previous section open go ahead and open it now.

NOTE: There isn't an associated normal map for the provided DDS file since this section is meant to provide only the steps on how to import a new texture into NifSkope. For more information on creating Normal Maps go here: Quality_Normal_Maps. Or any of the other normal mapping articles available on this Wiki.

The steps to importing a new texture are the same as importing an existing one except we will be applying it to our new mesh.

  • Double-Click: 20 NiSourceTexture -> Value Cell
  • Enter: textures\weapons\newtexture.dds

Now notice the battleaxe's blades in the render window. The new texture has been applied. Go ahead and save your file as mybattleaxe.nif.


The UV Map

The UV Map tells the rendering software coordinates for each of the mesh's vertices in a flattened state. Each vertex is assigned a coordinate either in the U or V axis which corresponds to a particular location on the texture map image.

The texture map doesn't properly conform to the model's geometry because the iron battleaxe's UV coordinates don't place the vertices in the correct location on the iron claymore's texture map. And so you end up with what you see. To correct this issue you would need to create a new UV Map for the battleaxe's handle that provides the proper UV coordinates for its vertices on ironclaymore.dds. Blender and GIMP are freeware programs that can help perform this function but are outside the scope of this guide.

Texture Types

NifSkope outlines seven different types of textures available to apply to your object. This section will offer brief explanations of these textures and how they affect your object's appearance. When available, links to more information will be provided.

Texture data blocks are located within the NiTexturingProperty block. Click to select this block and follow along.

Base Texture

Simply put, the base texture is your primary texture map which gives the mesh color. This texture is in the form of a .dds file and saved to the Data/textures/ directory. Without a base texture the object will appear white in the Render Window.

Dark Texture

It's currently suspected that _hl.dds files are dark texture files. They are used in hair models. Needs further clarification.

Detail Texture

It's currently suspected that this texture file is used to creating fine detail as needed on hair textures. Could be _hh.dds. Needs further clarification

Gloss Texture

This texture applies a specified gloss amount to specific sections of a model defined by the texture file. The texture file is a grayscale representation of the original texture map. Gloss is applied by a displacement method: black representing no gloss and white representing full gloss.

Gloss texture files must be saved as _gl.dds i.e. myweapon_gl.dds

Glow Texture

This texture applies a specified glow amount to specific sections of a model defined by the texture file. The texture file contains gradients of the desired glow color within a representation of the original texture map. Glow is applied by a displacement method: black representing no glow and gradient toward the designed color, up to white, representing brighter glow.

Glow texture files must be saved as _g.dds i.e. myweapon_g.dds

NOTE: Do not confuse a glow texture with the emissive color defined in the material property node. Emissive colors will radiate from the object on all surfaces. A glow texture will only emit gradients of the desired color at the locations drawn in the glow texture file.

Bump Map Texture

Assumption is it adds 3D detail using a Bump Map. If you've done this successfully please update this section with a description how this affects the rendered object. Please do not add tutorials here.

Decal Textures

Assumption is it adds textures to the object like stickers. If you've done this successfully please update this section with a description how this affects the rendered object. Please do not add tutorials here.

Scabbards

This section will explain what the scabbard (Scb) NiNode is and the basic concept of creating one.

  • Click: Load on the toolbar.
  • Open: Data\meshes\weapons\iron\dagger.nif
  • Expand: 0 NiNode Dagger
  • Expand: 9 NiNode Scb
  • Expand: 11 NiTriStrips Scb:0

Here you will notice that the main difference between the battleaxe.nif and dagger.nif is the addition of a second NiNode called Scb. This NiNode contains the scabbard data including a UPB Block and its own complete NiTriStrips Block. Now look at the render window and notice the textured mesh covering the blade. Click on this mesh to select it. Notice how 11 NiTriStrips becomes highlighted. You've selected the dagger's scabbard.

The reason the scabbard has its own NiNode is because it's actually a completely separate object from the dagger. This is necessary because the scabbard must remain fixed to the characters hip when the player activates the ready weapon animation (pull dagger from scabbard). And as such, the scabbard contains its own scene root.

Now you might be wondering, "Well, then how does it know where to place the scabbard on the character's model?" That's answered simply by looking at the placement of the Scb NiNode in the tree. It's placed under the parent block 0 NiNode Dagger which contains the necessary BSX Flags and Prn data to tell the game engine to place it at the character's sideweapon location (explained earlier in the guide).

Because the scabbard is a separate object you can make it anything you want. Make it a human head or maybe a tree. Doesn't seem very realistic but it's all possible. So the steps to create a scabbard are:

  • Import a NiTriStrips block with the mesh you want to use.
  • Parent it to its own NiNode
  • Add the necessary UPB data block. TIP: It's best to copy and paste it from the location you got the NiTriStrips block.
  • Then parent the NiNode Scb you created to the weapon's 0 NiNode

Scabbards Are Only the Beginning

You now know what a scabbard is and understand how to create one. But what many people might not understand is that you now know how to add fixed objects to a character model.

Notice how the Prn block specified the sideweapon location? You can change the Prn block to specify any armature bone on the character model. Now, if you don't specify the sideweapon location for a scabbard the character won't pull the weapon during its ready weapon animation. But, you can use this concept to add additional meshes to the character's model without needing to equip them via the construction set.

For example: say we wanted to force a bound samurai flag on the character's back when they equip our new samurai sword. All we would need to do is add the necessary Prn block and correctly position the flag model's scene root at the armature bone we specify (i.e. Bip01 Spine). Now when the weapon is equipped by the player the game engine will render the samurai flag and fix it to the character's Bip01 Spine bone while still allowing the player to choose any type of cuirass they want.

Glossary

NPC

Means: Non Playable Character

  • Any of the countless characters/actors in the game world.

BSX Flags

  • 1 Enable Animations
  • 2 Enable Collision
  • 4 Is Skeleton Nif (?)
  • 8 Unidentified Flag (Hinged?)
  • 16 FlameNodes Present
  • 32 EditorMarkers Present

Add these binary flag values to create multiple effects - i.e. Typically lights are defined by 19 = 1 (Animations) + 2 (Collision) + 16 (FlameNode Present)

Prn Strings

  • SideWeapon [Dagger/Long Sword/Mace]
  • BackWeapon [Battleaxe/Claymore/Staff]
  • Quiver [Arrows]
  • Any Armature Bone [Bip01 L Hand, ect.]
  • Torch [Needs further information]
  • Weapon [Needs further information]

Apply Modes

  • APPLY_REPLACE
  • APPLY_DECAL
  • APPY_MODULATE
  • APPY_HILIGHT
  • APPY_HILIGHT2

Alpha Format

  • ALPHA_NONE
  • ALPHA_BINARY
  • ALPHA_SMOOTH
  • ALPHA_DEFULT

Use Mipmaps

  • MIP_FMT_NO [Texture source does not use mipmaps]
  • MIP_FMT_YES [Texture source uses mipmaps]

Material Types

  • HAV_MAT_STONE
  • HAV_MAT_CLOTH
  • HAV_MAT_DIRT
  • HAV_MAT_GLASS
  • HAV_MAT_GRASS
  • HAV_MAT_METAL
  • HAV_MAT_ORGANIC
  • HAV_MAT_SKIN
  • HAV_MAT_WATER
  • HAV_MAT_WOOD
  • HAV_MAT_HEAVY STONE
  • HAV_MAT_HEAVY METAL
  • HAV_MAT_HEAVY WOOD
  • HAV_MAT_CHAIN
  • HAV_MAT_SNOW
  • HAV_MAT_STONE STAIRS
  • HAV_MAT_CLOTH STAIRS
  • HAV_MAT_DIRT STAIRS
  • HAV_MAT_GLASS STAIRS
  • HAV_MAT_GRASS STAIRS
  • HAV_MAT_METAL STAIRS
  • HAV_MAT_ORGANIC STAIRS
  • HAV_MAT_SKIN STAIRS
  • HAV_MAT_WATER STAIRS
  • HAV_MAT_WOOD STAIRS
  • HAV_MAT_HEAVY STONE STAIRS
  • HAV_MAT_HEAVY METAL STAIRS
  • HAV_MAT_HEAVY WOOD STAIRS
  • HAV_MAT_CHAIN STAIRS
  • HAV_MAT_SNOW STAIRS
  • HAV_MAT_ELEVATOR

WORK IN PROGRESS. SEE DISCUSSION PAGE.