What's Changed With Havok4

From Second Life Wiki
Jump to: navigation, search

Interpenetration Resolution

When objects collide, they can end up "interpenetrating", in a situation where the two objects are "attempting to occupy the same space". Havok4 resolves interpenetration scenarios in a different and generally better way than Havok1.

  • Interpenetration resolution is enabled for all dynamic objects
    • In Havok1 dynamic objects that started penetrating would stop colliding until they ceased to penetrate
    • In Havok4 dynamic objects will be pushed apart when penetrating

Volume Detection

  • Volume detection is now the exact shape of the object instead of the bounding box
  • Uniformly scaled spheres are implicit (roll like spheres instead of faceted blocks)
  • Shapes are quantized
    • The colliding shape may differ slightly from the apparent shape
    • The errors should be smaller than the collision tolerance threshold, and thus not noticeable
    • Shape errors would be most noticeable for large objects if they are noticeable at all

Object Mass

  • llGetMass() will tend to return a larger value when an object is attached
    • Attachment "mass" is estimated using a bounding box for each prim instead of the real shape

Linkability Rules

  • Link rules are different
    • More robust: depend only on primitive position and scale (NOT rotation, cut, shear, twist, taper, or hollow)
    • Larger linkability distances (proportional to sum of scales, rather than the root mean square of the sum)

Avatar Motion

  • Avatar motion will be subtly different
    • Flying/walking diagonal will not result in a speed boost
    • Speed of walking up hills and ramps may be different
    • Steepest hill or ramp that can be navigated may be different
    • Largest step obstacle that can be climbed may be different
    • Speed of walking up stairs may be different
    • Run speed may be different
    • Jump height and horizontal response may be different
    • Acceleration/deceleration is higher when walking and stopping

Energy

  • Energy system thresholds may be different
    • Energy depends on mass of all prims in an object
    • Energy of attachments are always equal to or greater than when non-attached (because of llMass() issue mentioned above)
  • llPushObject() can no longer push arbitrarily hard at long distances
    • The absolute largest push an object can attempt to make is determined by the size of its Energy tank (which is then attenuated based on its current Energy budget and distance^3 as per Havok1 implementation)

Physics Engine Overload And Level Of Detail (LOD)

  • The collision level of detail (LOD) of objects may change when the physics engine lags (this is controlled by the Runtime Collision Control System (RCCS))
    • At the moment there is only one LOD below the highest level: primitives collide like boxes
    • Correct collision shapes will gradually return to normal when the physics engine recovers (at a rate of one prim per physics engine timestep)
    • When objects transition from static to dynamic their LOD will be preemptively dropped and they will collide at the lower LOD until the RCCS automagically raises it
  • Duplicate scripted Actions are collapsed on multi-prim objects.
    • An Action is a behavior that pushes the object around, such as a Vehicle, Buoyancy, or Hover behavior.
    • Making two scripts on one object each producing the same Action (such as llSetBuoyancy()) will result in a single instance of the Action instead of two
    • When two scripts on distinct prims of a multi-prim object try to produce duplicate Actions from two distinct primitives and the prims are then separated in a delink operation then the single Action instance will migrate with the script that first created it; the other piece of the object will have no Action.

Other Misc Changes

  • Vertical simulation extent has been increased from 768m to 4096m (a change that will become visible once an updated viewer version is released, following the Havok4 deploy), however script and UI limitations have not yet been changed accordingly yet.

What Is NOT Changed?

  • Dynamic objects are still limited to 31 primitives
  • Most primitives still have a "collision tolerance" of 0.1 meters (everything except implicit spheres)
  • Spheres with non-uniform scale will collide with faceted geometry
  • Region crossing lag will not be significantly relieved by Havok4 changes
  • llGetCenterOfMass() on attachments fails

Known Bugs

  • There is a resource leak in the simulator that may cause it to crash after an extended uptime
  • Avatars don't always sit in the "right spot"
  • LSL collision() events are broken
  • LSL VolumeDetect feature is broken