NifSkope/Working With Nifs 101 : An Introduction

From NifTools
Revision as of 20:47, 20 June 2007 by Wz (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


A guide to the many aspects of using custom graphics in Gamebryo-based games

-Introduction and Groundwork-

In these guides, I will try to compile as much I have learned about creating custom graphics for Oblivion. Textures, Meshes, and the tools used will be covered, some in less detail than others. There are a lot of guides here on the cs wiki, It may be easier to look up a more specialized guide if you need a quick fix!

I'm a total scatterbrain, and I've jumped back and forth in writing this into the wee hours. There may still be gaps, innacuracies, fallacies, coffee stains or things just not there. If you feel something needs changed, added or removed, seek me out at the elder scrolls forums (throttlekitty)

In these guides, I jump in and out of step-by-steps and infodumping, because I'm really not good at writing this sort of thing. At times, this might be a hard read- my apologies.

First up, the tools!

First off, the main Niftools Site always the latest copy of Nifskope. The current version as I write this, is 0.9.6. Second, If you're a 3d modeller, We also offer importers/exporters for Blender, 3dsMax and Maya.

Nifskope can import the .OBJ format into a .nif file, if you are not using one of these modelling apps, you can still use .obj export if available.

Other tools of the trade are entirely up to you. A 2d image editor is a must for working with textures.

GIMP is a free alternative to photoshop and boasts a fine feature set.

nVidia offers a Normal map plugin, and a .dds converter for Adobe Photoshop as well as many other goodies.

ATI\AMD Offers The Compressonator, a .dds manipulator application, as well as their own goodies.

IrfanView is a sleek, compact and fast image viewer and more. Very handy for previewing or managing large numbers of images. It also has a .dds loader!

-This is not a modelling guide, but I do have a troubleshooting section!-

So, on to .nifs! First off, what is a .nif file? This description is jacked directly from another NifTools page:

"Nif files seem to be state-saves of the game engine in action. A game engine is based around efficiently displaying a scene-graph representation of the game world. This scene graph is composed of various nodes which hold geometry, control animation, etc. If you want to save the state of the engine at a specific moment, each node would have to write the information it contains to a file in such a way that the entire graph could be re-created. That's what the Nif file is. The scene graph is descended and, as each node is visited, it writes itself out to a file. On load, the reverse happens."

A rather long answer and it might glaze your eyes over- but this bit is important! It's easier to think of a single .nif as a "model" but it is much more. So, you have the World Scene (root) All things at some point, trace back to here. In Oblivion, the cell you're currently in is root. A .nif for a house is attached, which also has collision nodes where collision models are linked. An Actor's root node is also attached to the World, who in turn has a node for a weapon. A longsword is attached to this node, which also has a scabbard node which links back to the actor when the weapon is unsheathed. Somewhere in the distance, a billboard node is attached, with a tree image attached to that. If you are going to be doing effects/animation/alterations in nifskope, you will need to know the parent<->child relationships between different nodes, properties, and data that float around. Some nodes can have a Property which affects how that node acts; and in most cases, its children. I will detail on the various nodes in a later article.

Another object of note: The Gamebryo engine will expect many .nifs to be in a certain structure in a lot of cases, and doesn't handle incorrect settings well. Expect crashes! Ex: Putting havok nodes in the wrong order. Success often comes through long, boring work, I can't count how many hours I've spent changing a single value, and checking the results in-game.

Also, neither Niflib and NifSkope are complete in all ways, You may encounter areas that are still "unknowns". Nifskope will still write these values, but we may not fully understand what exactly a given value does. On the display side, Note that Nifskope does have a set of shaders, they don't all follow the exact pipeline that Oblivion does.

Typos or other bad data edits on your behalf can also cause crashes. Ex: Linking an AlphaProperty to a trishape's Extra Data List. Always re-check your work! So anwyay, back to the hierarchy.

Typically, a structure would look something like:

0 - root node
-1 -bsx data
-2 - prn data
-3 - controller manager (for animation, vision control, or extra..)
--3a - controller lists, data and links
-4 collision data
--4a more collision data and links
-5 and on - meshes
--5a mesh data and properties
-6 and on - particles
--6a,b,c,d, more particle data and stuff
-7 and on - bone nodes

Not every .nif has all of these things present, but that's the general order of things. Also, Oblivion can use v20.0.0.4 and v20.0.0.5 nifs.

So, move onward to the guides, and get cracking!

Addendum 1

Sometimes, you may feel that working with Nifskope is difficult, or that you are taking "the long route" towards a final file. It is an interface for working with data that lays somewhere between using a full-bore 3d modelling application and using a hex-editor to make changes to the data. Nifskope takes the raw data, and arranges it into a manner in which we as people can easily read.

The panel to the left has a link to our forum, should you ever find a bug, or need help, or just want to say hello!

see also

This guide is part of a series:

NifSkope/Working With Nifs 101 : An Introduction

NifSkope/Working With Nifs 101 : Basic Use

NifSkope/Working With Nifs 101 : Copy and Paste

NifSkope/Working With Nifs 201 : Meshes, Data, and you

NifSkope/Working With Nifs 201 : Practical Use

NifSkope/Working With Nifs 301 : A Checklist

NifSkope/Working With Nifs 301 : Nodes Breakdown

NifSkope/Working With Nifs 301 : Properties Breakdown

NifSkope/Working With Nifs 401 : Particles!


Well, me (throttlekitty), for one. :) I wrote this mostly by myself! I've done lots of testing and reseach, and gone through many crashes in the process, and I have written this from my own experiences. But I've certainly had help along the way.

Everyone whom I've worked with, people who have helped me, and people I have helped are part of this guide! I've a terrible memory so don't be offended if I've forgotten names, so here goes, in no particular order:

Bethesda and NetImmerse: Without them, we'd have no nifs, no game or their ilk to toy with!

Niftools: For figuring out how .nif files work, their ongoing support, the exporters, Nifskope, and great wisdoms! m444x, Shon, Brandano, amorilia, entim, tazpn and wz! Thanks guys!

From the Elder Scrolls forums in general: I've learned so much from so many people in many ways. Darknel, mmmpld, xdarkstarx, RedFeather1975, EdgeofForever, phoenixamon, ClayFI, ModelMan, Hayly, lowell, JOG, CuteUnit, Nicoroshi, JDFan, MadMole, Ghogiel, Razorwing, xmarksthespot, Qarl, NorrabMaster, and so many others...

Personal tools