MGSV Modding Wiki

View My GitHub Profile

NVG Filter

Categories:RenderingGuides

Contents Contents:
  1. Night vision goggles
  2. Parasite goggles
  3. Modifying filter
  4. Removing the filter completely
  5. Mod example

Night vision goggles

NVG filter is applied on equipping night vision goggles. Highlights destructibles and living beings. It is made of two parts: noise filter and LUT.

NVG offNVG on

Parasite goggles

Parasite goggles (exe name) or TDG (Thermal imaging infection detector, game name) are equipped only during mission 43 (SHINING LIGHTS). They hightlight neck area (how?) and make everything darker a bit. Equipping them in regular missions does not apply filter - there is a specific flag check in tpp::gm::player::impl::ActionCoreImpl::UpdateEffectAndBatteryAboutGoggle. Apparently NVG entity parameters (see below) do not affect parasite goggles (needs checking).

Parasite goggles, mission 43

Modifying filter

You have several approaches:

  • edit .fox2 entity properties
  • edit LUT

Entity properties

Need examples!

Properties are defined in chunk0/Assets/tpp/pack/collectible/common/col_common_tpp_fpkd/Assets/tpp/level_asset/weapon/NightVisions.fox2

TppNightVisionParam
name type
owner EntityHandle
enable bool
colorCorrectionLUT Path
exposureCompensation float
switchOnCompensation float
switchOnEffectTime float
switchOffCompensation float
switchOffEffectTime float
tonemapThreshold float
tonemapRange float
TppNvgFilterNoise
name type
name String
dataSet EntityHandle
visibility bool
scale float
offset float
cutScale float
cutOffset float
isForceVisible bool
color Color
radialSlope float
radialShift float

LUT

LUT path for NVG is /texture0/Assets/tpp/effect/gr_pic/lut/common_nvg_a_FILTERLUT.ftex, loaded by NightVisions.fox2 (see above).

Parasite goggles use /texture3/Assets/tpp/effect/gr_pic/lut/common_wvg_a_FILTERLUT.ftex, which is loaded by chunk3/Assets/tpp/pack/location/mbqf/pack_common/mbqf_common_fpkd/Assets/tpp/level/location/mtbs/block_large/mtbs_qrntnFacility_effect.fox2

See FILTERLUT Texture Guide for more info on LUTs.

Removing the filter completely

You need to patch the exe.

Function tpp::gm::player::impl::FilterEffectControllerImpl::SetEnableNVGFilter, replace 0x0f, 0x85 with 0x48, 0x90 at:

  • debugger (attached): 0x140af9e43

or

  • hex editor (file offset): 0x00af9243

Result:

NVG without filter

Mod example

Thermal Vision Goggles