Working With Nifs 101 : An Introduction

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

A guide to the many aspects of using custom graphics in Oblivion[edit | edit source]

-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, inaccuracies, 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![edit | edit source]

First off, head to the NifTools Site and grab the latest copy of Nifskope. The current version as I write this, is 0.9.6 (new version is 0.9.8). Second, If you're a modeller, they 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.

-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 the 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[edit | edit source]

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.


See also[edit | edit source]

This guide is part of a series:

Working With Nifs 101 : An Introduction

Working With Nifs 101 : Basic Use

Working With Nifs 101 : Copy and Paste

Working With Nifs 201 : Meshes, Data, and you

Working With Nifs 201 : Practical Use

Working With Nifs 301 : A Checklist

Working With Nifs 301 : Nodes Breakdown

Working With Nifs 301 : Properties Breakdown

Working With Nifs 401 : Particles!


NifSkope Alchemy - This is my first guide, it's a little shorter and is a little quicker and easier to digest than the others.