<edit>
I have uploaded a slightly updated version of the tutorial to the niftools wiki.
http://www.niftools.org/wiki/index.php/NifSkoping_MorrowindAny updates will be added there.
</edit>
Everyone keeps asking me for a tutorial, I don't know if I'm the right person for the job, but I will try.
So far this is a very very rough draft, I was sleepy when I typed it so there grammar and spelling mistakes, and general confusion. It's not meant to be the tutorial to end all tutorials or anything, but with help from others it might turn out actually useful. I don't aim to cover any Oblivion or other game specific uses, this is focussed on Morrowind.
I would appreciate feedback, help, additions, revisions, corrections, etc.
I haven't done any pictures, I will assume the reader can use the graphic user interface and drive operating system known as Windows, and at the very least can manually install a mod with meshes and textures.

okay, here it is,
At the time of writing this v 0.9.6 is the latest version.
ContentsSetting up Nifskope
Using Nifskope
Linking Blocks
Retexturing
-Material Property
-Changing texture source
-Export texture template
-Flip texture map
-Transparency and transparent textures
-Glowmaps
Mesh Editing
-Collision
-Moving and Scaling
-Copying Branches and Blocks
-Exporting/importing OBJ
-Vertex coloring
-Moving vertices
-Animating Nodes
Setting up nifskopeViewsMake 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 FoldersNifskope 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. I have 4 folders set most of the time, the texture folder in my morrowind installation, the data folder in my Oblivion installation, the data files copied from my CS disk and expansions, and the data files extracted from my Oblivion BSA file.
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
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 nifskopeNifskope 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 BlocksEverything 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 DetailsThe block details for nodes you will use most of the time are:
-
String- name of node for organization.
-
Extra Data- input block number to ExtraStringData block, mostly used for animation and particles, most meshes won't need anything here
-
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 collision. Right click brings up flag menu, usually.
-
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.
-
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.
-
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
LinkingTo 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.
RetexturingMaterial PropertySetting the colors in the material property can change the color of the mesh, and how it reflects light
Changing Texture SourceIf 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 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.
Export Texture TemplateRight Click on the NiTrishape block, and select Texture>Export Template.
Flip texture mapRight click on the NiTriShapeData block and select Mesh>Flip UV. There are 3 options for the direction you wish to flip.
Transparency and transparent texturesTo 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.
GlowmapsRight Click on the NiTexturingProperty, select texture>Add Glow Map. Select your glow map texture in the new NiSourceTexture that attached itself
Mesh Editing
CollisionSetting 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.
Moving and ScalingMoving 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 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 settings, 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
Copying Branches and BlocksRight 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 OBJOBJ is a 3D model format. You can import and export OBJs with nifskope by right clicking on a NiTriShape block and selecting OBJ> then import or export. Importing an OBJ will overwrite the trishape Data.
Vertex coloringIn 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, It's not the best display but it's better than nothing. 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.
Moving verticesYou'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. Sometimes it's easier to see the selected vertex from the opposite side of the mesh, rotating often. 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 NodesHeres 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.