BhkRigidBody

From GECK
Jump to: navigation, search

bhkRigidBody and bhkRigidBodyT are NIF blocks that control how collision and physics act in various different ways. The only difference between the two is bhkRigidBodyT supports translations, a form of XYZ offset/rotation.

Settings

  • Layer: The Collision layer used which can have various different effects.
  • Flags and Part Number: Used for actors, should be 0 for most meshes.
Body Part Part Number
Other 0
Head 1
Body 2
Spine1 3
Spine2 4
LUpperArm 5
LForeArm 6
LHand 7
LThigh 8
LCalf 9
LFoot 10
RUpperArm 11
RForeArm 12
RHand 13
RThigh 14
RCalf 15
RFoot 16
Tail 17
Shield 18
Quiver 19
Weapon 20
PonyTail 21
Wing 22
Pack 23
Chain 24
AddonHead 25
AddonChest 26
AddonArm 27
AddonLeg 28
Null 29 - 31
  • Broad Phase Type: The Broad Phase is a calculation step Havok performs in order to get an idea of what objects are likely to collide without processing every potential combination unnecessarily. Collision objects have specific types in order to differentiate their functions.
Type Description
BROAD_PHASE_INVALID
BROAD_PHASE_ENTITY Used by most NIFs.
BROAD_PHASE_PHANTOM Used by NIFs that detect actors such as traps or water. Objects with this Broad Phase type are not supposed to move around much.
BROAD_PHASE_BORDER Intended to monitor objects leaving a Havok broad phase. Almost certainly an engine only flag and should not be used in NIFs.
  • Collision Response:
Type Description
RESPONSE_INVALID
RESPONSE_SIMPLE_CONTACT Used by most NIFs.
RESPONSE_REPORTING
RESPONSE_NONE
  • Process Contact Callback Delay: Determines how frequently the body should process contact events in (presumably Havok simulation) frames. (65535 for most NIFs)
  • Havok Filter Copy:
    • Layer: Should usually be set to the same layer as the other.
    • Flags and Part Number: Used for actors, should usually be set to same setting as the other.
  • Translation: XYZ translation of the collision body, value is only used on bhkRigidBodyT blocks.
  • Rotation: XYZ rotation of the collision body, value is only used on bhkRigidBodyT blocks.
  • Linear Velocity: Initial linear velocity of the object.
  • Angular Velocity: Initial angular velocity of the object.
  • Inertia Tensor: A set of values that represent the proportional distribution of mass. All values should be 0s on statics.
  • Center: XYZ values that set the center of mass. Used for physics.
  • Mass: How heavy the object is, the higher the value the heavier the object is. A value of 0 means the object has infinite mass which is normally used for statics. A value over 100 will prevent the player from Havok grabbing the object which is defined by the Grab Max Weight Settings.
  • Linear Damping: Determines the rate of the object's linear velocity decay. (0.100000 on most NIFs)
  • Angular Damping: Determines the rate of the object's angular velocity decay. (0.050000 on most NIFs)
  • Friction: Determines how resistant the object is to being slid against other objects. (0.400000 on most NIFs)
  • Restitution: Determines how bouncy the object is. if it is not 0.0 the object will need extra CPU. Partially broken in New Vegas. (0.400000 on most NIFs)
  • Max Linear Velocity: The maximum speed an object can reach. (1068.000000 on most NIFs)
  • Max Angular Velocity: Max speed the object can spin / turn. Reducing this too far below the common value can cause the object to sink into other objects. (31.570000 on most NIFs)
  • Penetration Depth: Serves as a general guideline for Havok for how much it allows penetration on the object. Lower values decrease clipping and decrease performance when the object is moving, higher values increase performance but allow more penetration to occur. The Motion Quality type increases the effect this setting has. This setting also works on statics, useful for preventing the player or other actors from getting stuck in an object. (0.100000 on most static NIFs, 0.150000 on most movables and nonessential statics)
  • Motion System: The motion system used for Havok physics.
Type Description
MO_SYS_INVALID Behaves as a immovable static, shouldn't be used.
MO_SYS_DYNAMIC
MO_SYS_SPHERE_INERTIA Used for most spherical physics objects.
MO_SYS_BOX_INERTIA Used for the vast majority of physics objects of most collision shapes.
MO_SYS_KEYFRAMED Used for most actors and animated statics like doors.
MO_SYS_FIXED Object will not move. Should be used for immovable objects like statics.
MO_SYS_THIN_BOX Increases physics stability for objects that have thin collision at the cost of the object being unable to receive impact force from projectiles.
MO_SYS_CHARACTER Meant to be used for implementations of actor movement not used by Bethesda, don't use.
  • Deactivator Type: Controls whether or not the physics object gets put into an inactive "rest" state after some time on the ground.
Type Description
DEACTIVATOR_INVALID Appears to be a fall-back mode for non-standard settings.
DEACTIVATOR_NEVER Used by statics or physics objects you want to never stop moving.
DEACTIVATOR_SPATIAL Used by most physics objects.
  • Solver Deactivation: Controls how aggressively the engine will stop an object from moving while on the ground. The higher the setting the quicker the object will stop moving. More aggressive values can stop an object that is clipping into the ground or another object from moving.
Type Description
SOLVER_DEACTIVATION_INVALID Solver deactivation is completely disabled.
SOLVER_DEACTIVATION_OFF Object won't stop moving until either friction or damping causes it to lose all speed. Also the setting commonly set on statics.
SOLVER_DEACTIVATION_LOW Average amount of deactivation, used by most physics objects.
SOLVER_DEACTIVATION_MEDIUM Fast deactivation, can cause noticeable stuttering.
SOLVER_DEACTIVATION_HIGH Faster deactivation, will cause noticeable stuttering.
SOLVER_DEACTIVATION_MAX
  • Motion Quality: Dictates how Havok should try to resolve collision penetrations.
Type Description
MO_QUAL_INVALID Appears to be a fall-back mode for non-standard settings.
MO_QUAL_FIXED Should be used for immovable objects.
MO_QUAL_KEYFRAMED Used for most actors and animated statics like doors.
MO_QUAL_DEBRIS Used for most physics objects.
MO_QUAL_MOVING Better at keeping the object from clipping into geometry. Increased Penetration Depth effect.
MO_QUAL_CRITICAL Aggressively tries to prevent the object from clipping or leaving the world. Maximum Penetration Depth effect.
MO_QUAL_BULLET Use this for very fast objects.
MO_QUAL_USER
MO_QUAL_CHARACTER Meant to be used for implementations of actor movement not used by Bethesda, don't use.
MO_QUAL_KEYFRAMED_REPORT Identical to KEYFRAMED but reports certain Time Of Impact interactions for either internal or debugging purposes.
  • Body Flags: Set to 1 if you want the collision to be affected by wind from weather.

Notes

  • The "Stabilized" Motion System settings as seen in NifSkope do not actually exist in the version of Havok that NV uses and will instead behave as "MO_SYS_INVALID" if set.
  • Restitution works as intended in Fallout 3, but was partially broken in New Vegas. Bounces only semi-consistently work with boxy collision objects with large flat surfaces and acute angles, and spherical collision almost never bounces.

See Also