Difference between revisions of "User:Qazaaq/NIF Format Notes"

324 bytes added ,  08:21, 21 December 2008
some minor changes
imported>Qazaaq
(other collision shapes)
imported>Qazaaq
(some minor changes)
 
Line 2: Line 2:


== General ==
== General ==
*Every NIF starts with a BSFadeNode block, very similar to NiNodes.
*All NIFs start with a BSFadeNode block, very similar to NiNodes. Exceptions:
**cameras
**master particle systems
**lod meshes
*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.
*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.


Line 25: Line 28:
== Collision ==
== Collision ==
=== All collision ===
=== All collision ===
*'''Layer''' and '''Response'''(?) is controlled by bhkRigidBody.
*'''Layer''' and '''Response'''(always(?) set to RESPONSE_SIMPLE_CONTACT) is controlled by bhkRigidBody.
*Use bhkRigidBodyT instead of bhkRididBody to apply translation to the collision shape.
*Use bhkRigidBodyT instead of bhkRididBody to apply a transformation to a collision object.
*Use bhkTransformShape to apply a transformation to a collision shape
=== Primitive collision shapes ===
=== Primitive collision shapes ===
*Hardly ever used. Convex and Mopp shapes are much more common even for shapes like boxes.
*Hardly ever used. Convex and Mopp shapes are much more common even for shapes like boxes.
Line 35: Line 39:
       +- bhkXXXShape
       +- bhkXXXShape
==== Notes ====
==== Notes ====
*Used shapes:
*Used shapes (should be possible to use it with all shapes):
**Box
**Box
*Shape contains shape and '''material''' data.
*Shape contains shape and '''material''' data.
Line 62: Line 66:
*'''Material''' is controlled by the bhkMoppBvTreeShape block.
*'''Material''' is controlled by the bhkMoppBvTreeShape block.
*bhkPackedNiTriStripsShape and bhkPackedNiTriStripsData only contain data about the collision shape.
*bhkPackedNiTriStripsShape and bhkPackedNiTriStripsData only contain data about the collision shape.
*bhkPackedNiTriStripsData contains '''layer'' and '''material''' of subshapes.


=== Uncompressed collision shapes ===
=== Uncompressed collision shapes ===
Line 80: Line 85:
  +- bhkSPCollisionObject
  +- bhkSPCollisionObject
     +- bhkSimpleShapePhantom
     +- bhkSimpleShapePhantom
       +- bhkXXXShape
       +- [bhkXXXShape, bhkConvexVerticesShape]
==== Notes ====
==== Notes ====
*bhkSimpleShapePhantom controls the '''layer''':
*bhkSimpleShapePhantom controls the '''layer''':
Anonymous user