NifSkoping Morrowind

At the time of writing this v 0.9.6 is the latest version.
5-10-07 updated to v 0.9.7
December 2007, updated some info on V1.0
Some of the UI may have changed since the time of writing this

Setting up NifSkope

Views


Make sure your block list and block details are checked in the view options.
I set my block list to hierarchy most of the time. This helps give a visual of how the blocks are linked to each other.

Render Options


-Draw axis-shows the center of the mesh, this is where the pivot point will be in the CS and scripted rotates in game, and also where weapons and body parts will attach themselves to the biped skeleton of NPC actors. This also shows the X Y Z directions.

-Draw Nodes- Shows the position of each node in 3D relation to the center axis and parented node and the links between the nodes

-Show Hidden- shows hidden trishapes, usually collision and creature shadows that don't show up in game

-Draw Havok- Oblivion collision shapes

-Draw Furniture- Oblivion furniture markers for sitting/ sleeping animations

Textutre Folders


NifSkope can't render textures on meshes if it doesn't know where to find them. The texture folder can be set in the render settings.

You can set multiple texture folders with NifSkope.

my morrowind folders are set as this

C:/Program Files/Bethesda Softworks/Morrowind/Data Files/Textures
C:/Program Files/Bethesda Softworks/Morrowind/Data Files
D:/Data Files/Textures


The first folder is set for textures not in a subfolder, and the second is set to render textures in a subfolder
The third folder is my copied data files from the morrowind CS disk to my D: drive partition, though it could also be the cd-rom drive. I have my tribunal and bloodmoon files copied into the D: drive folder as well, but they could be copied to seperate folders and just add them to nifskope. Bethesda didn't use subfolders for textures so you won't need to add the root folder for those.


I think NifSkope will render textures if they are in the same folder with the nif, I don't usually do it this way, I suggest setting texture folders

Also in the render>settings, there is a check box to render textures

Baked in textures (textures included in the nif) no longer render in newer versions of NifSkope. Some earlier versions allow you to import textures to NiPixelData blocks or extract textures to TGA format

Using NifSkope

Nifskope can do many things, Always refer to working meshes for reference and settings.

The arrow keys and W A S D will move the render view around the mesh, left click and mouse also rotates view, and scroll wheel zooms.
Clicking on the mesh can select trishape branches, the wireframe will highlight and so will the block in the block list, the block details will show in it's window
Double clicking on settings in the block details lets you change settings

To make new blocks, in the block list, right click, select Block>Insert, and select the type of block to insert.

Linking Blocks

Everything must be linked to the parent node whether directly or indirectly, any loose blocks won't function in game and may cause errors. The 'parent' node will be a NiNode, block number 0.
It is a generic node object for grouping. It will be the 'parent' to all other blocks in the mesh. You can have multiple blocks and nodes linked to the node, and multiple blocks and nodes linked to those. They are linked in the children array of the node.

There will be other types of blocks that aren't linked to in the children list. These will be linked to according to block type.

Node Block Details

The block details for nodes you will use most of the time are:

-String-
Name of node for organization and for biped animation.

-Extra Data-
Input block number to ExtraStringData block, mostly used for animation and particles, most meshes won't need anything here.
Editor markers and non-collision meshes will also use this.

-Controller-
Input block number of animation controller, static meshes won't use this

-Flags-
special settings assigned by number variable, used to hide mesh or set shadow. Right click brings up flag menu, collision settings should be set to triangle, though seem to have no effect.

-Translation-
The x, y ,z coordinates of the node in relation to the center axis or parented node, affects all children of node.

-Rotation-
The rotation of the node in relation to the center axis or parented node, affects all children of node

-Scale-
The scale of the node, will affect all children and controllers of node.
Game engine overrides settings of the 'root' node

-Num properties-
The number of properties in the properties array.

-Properties-
The array assigns blocks by number to the node.

-Bounding Box-
Used for creature collision. Does not render in Nifskope.

-Num of Children-
The number of child blocks assigned to the node

-Children-
The array assigns blocks by number to the node, usually other nodes or trishapes branch.


You do not want to set the translation, rotation, or scale of the root parent node, It's best to leave it's translation and rotation settings at 0 and scale at 1.0. Change the settings of it's children or link a child node in between them

Linking

To link a child node or other block, In the block details, you must first set the number of children, then right click on children and select update array. Then input the block number you want parented to your node.

If creating a new node, you can right click on the node you want to be the parent, select attach node, and select the type of node. It will automatically update the array and link the new node.

Properties are linked to in the same manner, set the number of properties and update the array, then input the block number of the property. Selecting attach property works the same way as attach node.

Extra Data and Animation controllers are linked by block number in the node block details.

Trishapes blocks must have a TriShapesData and a Material Property to be visible in Morrowind. I refer to it as the 'Trishapes branch' but thats not an official name. Most of the time it will also have a Texturing Property with an external texture file path (NiSourceTexture) or sometimes pixel data block. The block named NiTriShape has the object settings, and the triShapeData the mesh data itself. The block details for the TriShape block must have the block number for the triShapeData, and the material and texturing properties listed in the properties array. Different Trishapes can share the same material property and texture source.

 

Retexturing

 

Material Property

Setting the colors in the material property can change the color of the mesh, and how it reflects light

Usually the settings are Ambient and Diffuse are white, and Specular and Emissive are black.

Changing Texture Source

If your mesh uses an external texture source and you wish to retexture it, just input the filename of your new texture in the NiSourceTexture block attached to the NiTriShape you wish to re-texture.
If you are using a sub folder in your textures folder, you must include the texture folder in the file path, example:

textures/subfolder/texturefile.dds 

Otherwise if you have your texture in the root texture folder, all you need is the texture filename.

If the mesh you are retexturing has an internal texture, aka baked texture, you can change it to use an external texture by changing the NiSourceTexture setting Use External to 1, and input the file path as I just mentioned. Then to save loading times and file space, remove the pixel data block from the mesh.

NEW to v1, you can drag and drop texture files from windows explorer directly onto the render window!

In windows explorer Left click on the texture file you wish to use and hold it down, drag the mouse pointer over the render window onto the part of the mesh you want retextured, the texture will show up on that part, when the correct part is retextured release the mouse button.
If the texture is located in a directory or subfolder that you have assigned in the render options the path gets set properly, otherwise it uses the entire file path.

Baked textures

NifSkope now renders baked textures again (since 1.0.13) but does not import or export them. I've been using v0.6.0 to do this. You don't have to uninstall v 0.9.7 to use v 0.6.0 they play nicely together for the most part. Texture directory and block details must be reset, but dual installation is simple. Download the .zip file version and place the nifskope.exe and mingwm10.dll into it's own folder, and just run the exe to use it. It's probably not a good idea to run both versions at the same time.

To export a NiPixelData to a TGA image file, right click on the NiTexture Source and select Texture>Export
To import a texture, choose a NiTextureSource with an external texture file and select Texture>pack

Export Texture Template

Right Click on the NiTrishape block, and select Texture>Export Template.

Flip Texture Map

Right click on the NiTriShapeData block and select Mesh>Flip UV. There are 3 options for the direction you wish to flip.

Edit UV map

Right click on a NiTrishape branch to select Texture>Edit UV
This pops up window which allows you select vertex points on the texture map and move them. Make sure you have your highlight color set different from the foreground color in the render settings

Transparency and Transparent Textures

To make a mesh transparent or use transparent textures, it must have have an Alpha Property.

Make a new NiAlphaProperty block. For Morrowind set the flag in the alpha property to 237. In your NiTrishape block, set the number of properties, update the array, and select the NiAlphaProperty's block number in the array.
You can also right click on the NiTrishape, select Node>attach Property, and then NiAlphaProperty. It will update the array, link itself, and set the flag to 237 all by itself.

Now If you use a transparent texture it will be transparent. You can make the mesh translucent by setting the alpha float in the Material Property. 0 is completely invisible, 0.5 is half opacity, and 1.0 is solid.

The standard flag of 237 isn't quite the best for overlapping alpha faces. Trees are a good example of a mesh where leaves with alpha textures may overlap. I have found that using 4845 works a lot better.
You can try different settings, right clicking on the NiAlphaProperty brings up a menu with different settings to try

Glowmaps

Right Click on the NiTexturingProperty, select texture>Add Glow Map. Select your glow map texture in the new NiSourceTexture that attached itself

Environment maps

To add an environment map effect, you will need an environment map texture. It should look like something as reflected in a sphere (for use as a sphere map, which is the default) but it could really be anything that has colour variation in it (flat colour will not work). The easy way is documented at Advanced Texture Settings in Blender; if you want to do it in NifSkope:

That's it! You shouldn't need to play with the "unknown" floats (PS2K etc.) - if you view your mesh in SceneImmerse, TESCS etc. it should have a nice "shiny" effect which changes as you rotate the mesh/camera.

Mesh Editing

 

Collision

Setting the flag on your node and trishape will use it's triangles as collision detection, however many meshes will use a RootCollisionNode, a specific Morrowind node. The trishape parented to this node will be hidden with collision enabled. It is especially useful for steps and tree branches which otherwise could let actors become stuck due to the odd shapes with opposite sided faces. Thats my guess anyways.

To make a mesh without collision you need to add a NiStringExtraData block to the root node's extra data list. In the string Data simply input: NCO

Moving and Scaling

Moving the position of a node or trishape branch, is pretty straight forward. In the translation, set the x, y, and z setting to move it along the 3D axis.

If a trishape is parented to a rotated node, the x y and z may be off from the center mesh axis. For instance if the node is rotated 180 degrees on the x or y, the trishape will be upside down, so giving it a positive Z translation will actually move downwards instead up upwards. You can usually just input the same translation settings for each trishape if you need to keep a multiple part mesh intact but want to move the whole thing. However if the trishapes don't have the same pivot point, rotating them can screw things up. The pivot point of the mesh can't be changed with NifSkope, as far as I know, but an easy fix is assign all the trishapes to a node, and rotate the node. Rotating the trishape does not change the translation direction. Likewise, rotating a node, does not change it's own translation direction, only on it's children.

Setting the scale is as easy as doing it in the Construction Set. Again, different pivot points and translations can break multipart meshes up, the fix is the same, assign them to a node and scale the node.

To repeat what I typed earlier, don't change the settings of the root parent node. keep it centered and scaled at 1.0
The game engine overrides the settings of the root node, if necessary, link a child node and change it's settings

Scaling Vertices
A new feature is the ability to scale the vertices of a trishape, this is not the scale setting of the nif, rather a spell in nifskope that mathematically scales the vetices in the trishape data. The advantage of this is it allows non-uniform scaling.

Right click on a NiTrishape and select Tranform>Scale Vertices. In the menu that pops up, enter a number for each x y and z axis , then click on Scale.

Creating a dual-wield (offhand) weapon

A shield can use a modified weapon mesh to appear as an offhand or parrying weapon. The exact settings vary with each mesh, but in general, the mesh should be moved approximately -12 units on the X axis, -2 units on the Z axis, and rotated 180 degrees on the P axis. Since the base node cannot have any transformations, either apply them to the NiTriShape(s), or to child NiNodes.

Copying Branches and Blocks

Right click on a block and select Block. You can copy just one block, or the whole branch of children nodes and properties attached to that block. With 2 windows of nifskope open, you can copy blocks or branches from one NIF to another. Right click in the block list to paste, or paste branch. You can also paste over blocks. You can combine 2 meshes by selecting the root parent node of one mesh, and copy branch the whole mesh into the other. If you paste the branch onto a node, it auto-links the branch to the node.

Exporting and Importing OBJ and 3DS

OBJ and 3DS are 3D model formats. You can only export to OBJ, but can import both 3DS and OBJ. Options are in the top menu bar under File. NifSkope will import the file and setup a new trishapes branch. If you import an OBJ and it has a material file in the same folder, NifSkope will create the material and texture source in the trishape branch.

Vertex Coloring

In the block details of the NiTrishapeData block, click on the No on the line Has Vertex Colors. It should now say Yes. Then right click on Vertex Colors and select Update Array. Now click the plus left of the vertex colors to expand the array. clicking on the vertices in the list should highlight the vertex selected. Once you've selected the vertex you want colored, click the color wheel and set the color, or input color hex number. If it's a high poly mesh, good luck.
Note, if the mesh has a Vertex Color Property you will need to remove it for the vertex colors to work.

Moving Vertices

You're better off importing the mesh into a modeling program if you need to edit it. Blender is free so theres no excuse for not having one. However there may be some cases, such as a skinned mesh, where the importing may complicate things, so editing the vertices would be easier. Select the TriShapeData block and scroll down the block details list to the vertex list. Expand the array the vertices will highlight in the render window. Set your highlight color different than the foreground color in your render settings or you'll have a hard time seeing which is selected. Once selecting the vertex you want moved, set the x y z translation. This is relative to the mesh data pivot point, which was set in the model program that built the mesh.
With morph animated meshes you will have to edit the morph vectors also, if it's high poly, good luck.

Animating Nodes

Heres where the fun begins. Remember the translation and rotation settings from earlier? Well thats how animations are made. A KeyFrame Controller sets different rotations and/or translations to a node according to the timer. You can even animate scale. If a Controller has rotate, translation, or scale keys, they keys override the settings of the node.
I'm no animation expert, but I will try to share what little knowledge I have.

The method I will be using makes a self-contained animated mesh, it won't have a xmesh.nif or xmesh.kf file with it, and cannot be be scripted with playgroups. It simply loops it's animation no matter what. Not unlike how particle emmiters are usually used.

Refer to act_sotha_dicer.NIF located in the data files/meshes/i folder on the tribunal CD for an example.

Link the trishapes branches you want animated to each their own node. If the trishape has the pivot point already where you want it, set the trishape translation to 0 0 0. If not, Set the translation and rotation of the Trishape Details so when you rotate your node the trishape pivots properly. If you aren't going to use rotation keys then don't worry about it.

Create a BsAnimationNode. set the flag to 106. Add a NiKeyframeController and link it to the controller of the BSAnimationNode. Create a KeyframeData block. In the KeyframeController block, set the flag to 8, active cycle, Frequency to 1.0, keep the start time 0 and input a stop time. Set the Data to the block number of the KeyFrameData block you just created, and the target to a node with a trishape branch. You are now ready to input the keyframe data

Set the number of rotation, translation, or scale keys, and update the arrays. For key type, I use Quadratic Keys for translations, and linear keys for rotations. I'm not sure what is best. On your keys, the first key in each array should start with the float time 0.00 and the last key should be the stop time you set in the keyframe controller. The keys float times will be set in increments from 0.00 to the stop time of the animation loop.
You want to have the same settings in the first key, as the last, so the loop doesn't 'skip' when it starts over.

Note, you can also Clamp the animation on body parts and equipped items to the base animation of NPC actors. It is limited and is different for 1st person view, and beast races. Refer to the animation files for keyframe timing.

 

http://niftools.sourceforge.net/wiki/Morrowind/NifSkope_Alchemy

 

Back to Main Page