Difference between revisions of "NifSkope Comprehensive Guide"

Jump to navigation Jump to search
12,544 bytes added ,  16:14, 25 July 2007
Joined Section 2 back with the origional article. Intention is to keep as one article so it is easier to find information within the article and easier to edit by the community.
imported>Chuey
(Moved heading 5 to section 2)
imported>Chuey
(Joined Section 2 back with the origional article. Intention is to keep as one article so it is easier to find information within the article and easier to edit by the community.)
* Reopen your iron battleaxe model. [Data\meshes\weapons\iron\battleaxe.nif]
 
== Scene Root Node ==
The Guide Continues On Here: [[NifSkope_Comprehensive_Guide_Section2]]
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 it's 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.
 
<blockquote>'''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 warn like a shoulder pack. </blockquote>
 
== '''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.
 
<blockquote>'''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.</blockquote>
 
=== '''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, clothing, or armor. Clothing and armor because it replaces a section or sections of the base character model when equipped. All world objects must have an associated BSX Flag.
 
<blockquote>'''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.</blockquote>
 
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.'' Confirmation needed that this example is correct.''
 
=== '''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.
 
<blockquote>'''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']</blockquote>
 
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.
 
<blockquote>'''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.</blockquote>
<blockquote>'''NOTE:''' See the Glossary section for a list of BSX Flags and Prn Strings.</blockquote>
 
== Extra String Data: UPB Block ==
The UPB block specifies the models 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 effected by these variables. 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 know at what coefficient of friction a 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. Lets 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 your 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. Lets 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 it's 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 lets 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.
 
<blockquote>'''NOTE:''' Capsule shapes can reside as children directly in the bhkListShape block. Box shapes however must reside as children to a parent bhkConvexTransformShape.</blockquote>
 
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 effected by each of the transform variables. Once you have a good understanding of these variables continue on with the guide.
 
== '''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
* Expand 13 NiTexturingProperty
 
In this block contains all the mesh, material, and texture map information necessary to render the model correctly in the game environment. We will break down each of these data nodes to better understand their purpose.
 
: 11 NiBinaryExtraData Tangent space (binormal & tangent vectors)
::* First it is important to know what tangent space is. Follow the link and read this Wikipedia article on [http://en.wikipedia.org/wiki/Tangent_vectors Tangent Vectors]. This data array defines the model's tangent vectors. This data node is required for your model to display properly in the game environment.
 
 
= '''Glossary''' =
== NPC ==
Means: '''N'''on '''P'''layable '''C'''haracter
* Any of the countless characters/actors in the game world.
 
== '''BSX Flags''' ==
* 1 Magic Effects/Menu Animations
* 2 General World Objects
* 3 Inventory Objects [Weapons/Ingredients/Clutter]
* 10 Rock/Stone Objects [Landscaping/Statues]
* 11 Clothing/Fabric Objects [Pants/Boots/Cloth]
* 19 Lighting Objects [Wall Sconce/Candle/Chandelier]
* 33 Candle Flame
* 35 Fire/Smoke
* 46 Traps
 
== '''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'']
 
 
WORK IN PROGRESS. SEE DISCUSSION PAGE.
Anonymous user

Navigation menu