Difference between revisions of "User:Qazaaq/NIF Format Notes"
Jump to navigation
Jump to search
imported>Qazaaq (water collision) |
imported>Qazaaq (other collision shapes) |
||
Line 75: | Line 75: | ||
*NiTriStripsShape contains '''material''' data. | *NiTriStripsShape contains '''material''' data. | ||
=== | === Other collision shapes === | ||
==== Location ==== | ==== Location ==== | ||
BSFadeNode | BSFadeNode | ||
+- bhkSPCollisionObject | +- bhkSPCollisionObject | ||
+- | +- bhkSimpleShapePhantom | ||
+- bhkXXXShape | +- bhkXXXShape | ||
==== Notes ==== | ==== Notes ==== | ||
*bhkSimpleShapePhantom controls the | *bhkSimpleShapePhantom controls the '''layer''': | ||
**OL_WATER | |||
**OL_TRIGGER | |||
*last unkown float in bhkSimpleShapePhantom | |||
**-204.0184 in all water NIFs | |||
**0.0 in all triggers |
Revision as of 07:12, 21 December 2008
These are some notes I took while looking at the NIF files and info I got from others. Feel free to comment, discuss and add your own.
General
- Every NIF starts with a BSFadeNode block, very similar to NiNodes.
- All block Values strings (Value column in Block List view) are stored in a Strings array in the header and are referred to with an integer.
Textures
Location
BSFadeNode +- NiTriStrips +- BSShaderPPLightingProperty +- BSShaderTextureSet
Notes
- BSShaderTexturesSet contains the textures (color-, normal- and glowmap) in the Textures array. Size is controlled by the Num Textures variable, this is always 6 even when the last ones aren't used.
- Texture order:
- color map
- normal map + specular map in alpha
- glow map
- parallax map
- reflection/environment map
- environment map mask
- Sometimes, for simple/small objects or animated textures, the old/Oblivion method is used (NiTexturingProperty + NiSourceTexture).
Collision
All collision
- Layer and Response(?) is controlled by bhkRigidBody.
- Use bhkRigidBodyT instead of bhkRididBody to apply translation to the collision shape.
Primitive collision shapes
- Hardly ever used. Convex and Mopp shapes are much more common even for shapes like boxes.
Location
BSFadeNode +- bhkCollisionObject +- bhkRigidBody +- bhkXXXShape
Notes
- Used shapes:
- Box
- Shape contains shape and material data.
Simple collision shapes
These are used for items.
Location
BSFadeNode +- bhkCollisionObject +- bhkRigidBody +- bhkConvexVerticesShape
Notes
- Both shape data and material are controlled by the bhkConvexVerticesShape.
Complex collision shapes
Buildings and other large static objects.
Location
BSFadeNode +- bhkCollisionObject +- bhkRigidBody | +- bhkMoppBvTreeShape | +- bhkPackedNiTriStripsShape | +- hkPackedNiTriStripsData +- BSFadeNode
Notes
- Material is controlled by the bhkMoppBvTreeShape block.
- bhkPackedNiTriStripsShape and bhkPackedNiTriStripsData only contain data about the collision shape.
Uncompressed collision shapes
Used in the following NIFs:
- meshes\clutter\displaycase\displaycase.nif
Location
BSFadeNode +- bhkCollisionObject +- bhkRigidBody +- bhkNiTriStripsShape +- NiTriStripsData
Notes
- NiTriStripsShape contains material data.
Other collision shapes
Location
BSFadeNode +- bhkSPCollisionObject +- bhkSimpleShapePhantom +- bhkXXXShape
Notes
- bhkSimpleShapePhantom controls the layer:
- OL_WATER
- OL_TRIGGER
- last unkown float in bhkSimpleShapePhantom
- -204.0184 in all water NIFs
- 0.0 in all triggers