NiVisController

From GECK
Jump to: navigation, search

NiVisController is a controller that hides and unhides NiAVObjects over time. As a binary toggle, it takes a NiBoolInterpolator with a NiBoolData to handle the time and value.

A NiVisController in a NiControllerManager used to hide particles on MegatonGateHouse01.nif
  • NiVisControllers are more performant than simply reducing an object's alpha value to 0, as an object that is hidden by one is not rendered by the game where as a fully invisible object wastes time drawing polygons that aren't visible, and could also negatively affect rendering other alpha'd objects in the scene.
A typical weapon example, BBGun01.nif

It is set up no differently than other controllers, however there is a caveat to using them for weapons.

  • They're one of the few controllers actually required on weapon NIFs as the objects don't seem to be hidden by default when specified by a .KF file. Their start time is always set to -0.033333 in vanilla weapons.

Things you would potentially want to hide, but are not limited to:

  • Magazines and other ammo related objects when not in a reload animation
  • VFX that you aren't using at that time
  • Fruit or vegetables on picked plants
  • Destroyed parts of an object for scripted sequences