Difference between revisions of "NifSkope Comprehensive Guide"
Added physics section, added materials section, added texture section, various minor updates
imported>Chuey (Added physics section, some minor updates to the format and grammer) |
imported>Chuey (Added physics section, added materials section, added texture section, various minor updates) |
||
|
::* Reload XML: Reloads only the NIF file's XML code.
::* Reload XML + Nif: Includes the NIF data in the XML reload. Basically a complete reload of the currently opened NIF file. Use this if your in a situation where you deleted something you didn't mean to.
::* XML Checker: Use this to check for XML code errors in NIF files. Use the window to select a directory and associated block. NifSkope will check all NIF files in the selected directory or errors and display the results.
::* Resource Files: Used to find files within .BSA files, for example textures, which haven't been extracted. ''Further explanation/functionality needed.''
::* Quit: Closes NifSkope. Beware! There isn't an auto save or a prompt to save your file first before closing.
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 affected by each of the transform variables. Once you have a good understanding of these variables continue on with the guide.
== ''Physics Detail''' ==
Modern game engines have the ability to simulate various principles of [http://en.wikipedia.org/wiki/Physics Physics]. This is in effort to give a more life-like feel to the game environment. But this also complicates things in terms of both game development and [http://en.wikipedia.org/wiki/Modding Modding]. In this section we will walk through the physics data contained in the NIF file as well as explain the need for careful adjustment of these values.
<blockquote>'''NOTE:''' It is intended to keep this section as simple as possible. Physics is a very complex subject which cannot be explained in this guide. Links are provided on each of the physics properties for readers who want to find more information on the topic. But the intent of this guide is to give the reader a basic concept behind each of the variables contained in NifSkope and leave the physics lessen to a College Professor. </blockquote>
:* File menu -> Open: Data\meshes\weapons\iron\claymore.nif
:* Expand: 0 NiNode Claymore
:* Expand: 8 bhkCollisionObject
:* Click to highlight: 7 bhkRigidBody
The iron claymore is a rigid body mass. To better understand why physics variables are required you should first understand what a [http://en.wikipedia.org/wiki/Rigid_body Rigid Body] is. Since the claymore model is a rigid body it is necessary for the bhkRigidBody block to tell the game engine how the claymore will react to its environment.
: ''' Layer '''
::* Set's the objects current layer. It's assumed that this is used by the developers while working in GameBryo. Doesn't appear to serve much other purpose but it's recommended that the proper layer be specified.
: ''' Col Filter '''
::* Specifies if this object is linked to other objects and appears to combine the collision data.
: ''' Layer Copy '''
::* Likely used in GameBryo when coping collision objects to other layers. Not used otherwise. Set this to the same value as Layer.
: ''' Layer Copy '''
::* Likely a variable in GameBryo that determines if the Collision Filter was copied to the new layer along with the collision object. Not used otherwise.
: ''' Translation '''
::* Moves the collision object by the specified amount along the X, Y, or Z axis in relation to the object's scene root.
: ''' Rotation '''
::* Rotates the collision object by the specified amount along the Y, P, or R axis in relation to the object's scene root.
: ''' [http://en.wikipedia.org/wiki/Linear Linear] [http://en.wikipedia.org/wiki/Velocity Velocity] '''
::* The rate or change in rate at which this object is moving along a straight line when accelerated. This specifies a direction (the line) in X,Y, and Z of the object's Linear Velocity when accelerated. Default is zero which does not alter the direction of acceleration (i.e. you throw it straight, it goes straight). This is one of the two required properties in Linear Velocity, the other being speed.
: ''' [http://en.wikipedia.org/wiki/Angular_velocity Angular Velocity] '''
::* The direction and speed of which this object is rotating when accelerated. This specifies a direction (the direction) in X,Y, and Z of the object's Angular Velocity when accelerated. Default is zero which does not alter the direction of rotation (the Right Hand Rule). This is one of the two required properties in Angular Velocity, the other being speed.
: ''' [http://en.wikipedia.org/wiki/Inertia Inertia] '''
::* This list of variables defines how the objects mass is distributed across the model. It appears to specify 12 equally distributed points along the models centerline from bottom to center to top. Applying all the inertia to one section can make the object react top or bottom heavy.
: ''' Center '''
::* NifSkope: …used to relocated the object's center of mass.
: ''' [http://en.wikipedia.org/wiki/Mass Mass] '''
::* A numerical value of the object's mass. It is assumed that this has some relationship to weight but how or in what way is unknown. It's advised to find an object of similar cubic size and apply that objects mass value to your object.
: ''' Linear Damping '''
::* Reduces the amount of linear motion when an object is accelerated. It is noted by NifSkope that a value too low will cause the object to be set in a fixed (non-moving) state.
: ''' Angular Damping '''
::* Reduces the amount of angular motion when an object is accelerated.
: ''' [http://en.wikipedia.org/wiki/Friction Friction] '''
::* Specifies the objects friction in a numerical value. It's assumed that this numerical value has some relationship to an object's coefficient of static friction. But how or if is unknown. It's advised to find an object with similar friction characteristics and copy the value into your objects friction value. For example, you wouldn't assign the friction value of a shield made of bone with the friction value of a shield made of glass.
: ''' Restitution '''
::* This variable sets the object's coefficient of restitution in a numerical value. It is unknown how the value affects the resulting coefficient of restitution in applying elasticity or inelasticity. For example a tennis ball has a coefficient value of 0.71 while a steel ball bearing has a value of 0.60. It is advised to use a value found on a similar object.
::<blockquote>'''NOTE:''' Do not confuse Restitution with Elasticity; they are two completely separate principles. It's understood that restitution is the measure of how an object gives back what was gained during an impact whereas elasticity is a measure of how an object deforms while under strain. '''
: ''' Max Linear Velocity '''
::* As the name implies, this value specifies the maximum velocity the object can obtain when accelerated linearly. Increasing or decreasing this has dramatic effects on the life-like feel of game objects.
: ''' Max Angular Velocity '''
::* As the name implies, this value specifies the maximum velocity the object can obtain when accelerated in a spin. Increasing or decreasing this has dramatic effects on the life-like feel of game objects.
::<blockquote>'''NOTE:''' If when your object is dropped it appears to spin out of control this is usually a sign that the Max Angular Velocity and/or Max Linear Velocity has been altered or is incorrect for the object's mass. '''
: ''' Penetration Depth '''
::* This variable makes a dramatic difference in the life-like appearance of stabbing an object. The collision box will prevent your object from passing through other rigid objects, but increasing this value changes that for stabbing animations.
::<blockquote>'''NOTE:''' Use sparingly! While it does look impressive to impale a foe completely through its body during a fight the same effect will be applied to other rigid objects like a stone wall. This could defeat the life-like feel for you weapon. '''
: ''' Motion System '''
::* GameBryo has several types of motion systems available to the developer. This value defines which of the motion systems is used on your object. It is generally good advice not to change this value. See other similar objects when defining this value.
: ''' Quality Type '''
::* This defines the quality of motion during animations. It is assumed that this is to preserve processor speed when rendering animations. It's generally good advice not to change this value. See other similar objects when defining this value.
: ''' Num Constraints '''
::* Defines how many bhkConstraint nodes are bound to your object. Use the array update to add constraints.
: ''' Constraints '''
::* This is where the constraint nodes are listed. bhkConstraint nodes are used to add constraints to your collision object. Works well on bound weapons that limit the player's actions.
== '''Materials'' ==
Data pertaining to the object's material type is defined as part of the bhkCollisionObject block. Since a game object can be made of several types of materials the actual material definition is located both in the bhkShape nodes.
:* File menu -> Open: Data\meshes\weapons\iron\claymore.nif
:* Expand: 0 NiNode Claymore
:* Expand: 8 bhkCollisionObject
:* Expand: 7 bhkRigidBody
:* Expand: 6 bhkListShape
First we will look at the root 6 bhkListShape node so click to highlight this. Notice data block 'Material'. The iron claymore is HAV_MAT_METAL. This will apply sound and animations to your object pertaining to a metal object. You will hear the metallic cling when striking something hard and see the dust/partial animations.
The material specified in the root node is the objects overall material type or better explained as the material group which the object is assigned. I.E. even if you have a glass weapon with a wooden handle, your object's material would be: HAV_MAT_GLASS. The root node defines how the object reacts to other objects. The specified material under each of the bhkShape nodes defines how your object will react when collided by other objects. Let's look at that now.
Click to highlight 4 bhkCapsuleShape. Notice the first data block 'Material' is defined HAV_MAT_METAL same as the root node. This is because that section of the claymore is made of metal and should play the metallic sound and animations when struck by something. If you change this to HAV_MAT_WOOD the object would play a wooden thud sound and wood slivers and dust animations when struck by another object.
While it's not necessary to define different material types to different sections of your object it does give a more life-like experience to the player. Weapons are not a good example of this because the player will seldom, if ever; strike a weapon with a weapon. But it is very important to define proper materials on world objects that contain different material types.
:* See the Glossary for a list of Material Types
== '''Shape Blocks''' ==
The texture map doesn't properly conform to the model's geometry because the iron battleaxe's UV coordinates don't place the vertices in the correct location on the iron claymore's texture map. And so you end up with what you see. To correct this issue you would need to create a new UV Map for the battleaxe's handle that provides the proper UV coordinates for its vertices on ironclaymore.dds. Blender and GIMP are freeware programs that can help perform this function but are outside the scope of this guide.
= '''
NifSkope outlines seven different types of textures available to apply to your object. This section will offer brief explanations of these textures and how they affect your object's appearance. When available, links to more information will be provided.
Texture data blocks are located within the NiTexturingProperty block. Click to select this block and follow along.
== '''Base Texture''' ==
Simply put, the base texture is your primary texture map which gives the mesh color. This texture is in the form of a .dds file and saved to the Data/textures/ directory. Without a base texture the object will appear white in the Render Window.
== '''Dark Texture''' ==
It's currently suspected that _hl.dds files are dark texture files. They are used in hair models. Needs further clarification.
It's currently suspected that this texture file is used to creating fine detail as needed on hair textures. Could be _hh.dds. Needs further clarification
== '''Gloss Texture''' ==
This texture applies a specified gloss amount to specific sections of a model defined by the texture file. The texture file is a grayscale representation of the original texture map. Gloss is applied by a displacement method: black representing no gloss and white representing full gloss.
Glow texture files must be saved as _gl.dds i.e. myweapon_gl.dds
This texture applies a specified glow amount to specific sections of a model defined by the texture file. The texture file contains gradients of the desired glow color within a representation of the original texture map. Glow is applied by a displacement method: black representing no glow and gradient toward the designed color, up to white, representing brighter glow.
Glow texture files must be saved as _g.dds i.e. myweapon_g.dds
<blockquote>'''NOTE:''' Do not confuse a glow texture with the emissive color defined in the material property node. Emissive colors will radiate from the object on all surfaces. A glow texture will only emit gradients of the desired color at the locations drawn in the glow texture file. </blockquote>
== '''Bump Map Texture''' ==
Assumption is it adds 3D detail using a Bump Map. If you've done this successfully please update this section with a description how this affects the rendered object. Please do not add tutorials here.
== '''Decal Textures''' ==
Assumption is it adds textures to the object like stickers. If you've done this successfully please update this section with a description how this affects the rendered object. Please do not add tutorials here.
= '''Scabbards''' =
* APPLY_DECAL
* APPY_MODULATE
* APPY_HILIGHT
* APPY_HILIGHT2
== '''Alpha Format''' ==
* MIP_FMT_NO [Texture source does not use mipmaps]
* MIP_FMT_YES [Texture source uses mipmaps]
== '''Material Types''' ==
* HAV_MAT_STONE
* HAV_MAT_CLOTH
* HAV_MAT_DIRT
* HAV_MAT_GLASS
* HAV_MAT_GRASS
* HAV_MAT_METAL
* HAV_MAT_ORGANIC
* HAV_MAT_SKIN
* HAV_MAT_WATER
* HAV_MAT_WOOD
* HAV_MAT_HEAVY STONE
* HAV_MAT_HEAVY METAL
* HAV_MAT_HEAVY WOOD
* HAV_MAT_CHAIN
* HAV_MAT_SNOW
* HAV_MAT_STONE STAIRS
* HAV_MAT_CLOTH STAIRS
* HAV_MAT_DIRT STAIRS
* HAV_MAT_GLASS STAIRS
* HAV_MAT_GRASS STAIRS
* HAV_MAT_METAL STAIRS
* HAV_MAT_ORGANIC STAIRS
* HAV_MAT_SKIN STAIRS
* HAV_MAT_WATER STAIRS
* HAV_MAT_WOOD STAIRS
* HAV_MAT_HEAVY STONE STAIRS
* HAV_MAT_HEAVY METAL STAIRS
* HAV_MAT_HEAVY WOOD STAIRS
* HAV_MAT_CHAIN STAIRS
* HAV_MAT_SNOW STAIRS
* HAV_MAT_ELEVATOR
'''WORK IN PROGRESS. SEE DISCUSSION PAGE.'''
| |||