From the Fallout4 CreationKit Wiki
Jump to navigation Jump to search

Papyrus: Light Script

A Light form represents a light source. These can be: placeable objects, like some of the workshop lights; inventory items, like the torches in Skyrim; or invisible light emitters placed in the Creation Kit.

Editor Dialog[edit | edit source]

Light Editor.png
  • ID: The editor ID that this form uses in the Creation Kit.
  • Name: The name shown for this object when it is displayed in an in-game UI.
  • Model: The 3D model that this light uses. Lights do not require a 3D model.
  • Off by default: Indicates whether the emitter actually casts light by default.
  • Sound:
  • Add Destruction Data:

  • Type: The type of light.
    • NonShadow Box: Usually referred to as Rectangular Light but seems to be not yet implemented, falls back to a regular Omnidirectional light. (For maximum compatibility you better not use it until it becomes officially supported.)
    • NonShadow Spotlight: This emitter casts light in a cone but does not cast a shadow.
    • Omnidirectional: This emitter casts light in all directions but does not cast a shadow.
    • Shadow Hemisphere: This emitter casts light and shadows in a hemispherical shape. See Notes below for more Information.
    • Shadow Omnidirectional: This emitter casts light and shadows in all directions. See Notes below for more Information.
    • Shadow Spotlight: This emitter casts light and shadows in a cone. See Notes below for more Information.
  • FOV: This seems to be exclusively used by Spotlights to determine the cone-radius of the Spotlight.
  • Falloff Exponent: Increases the intensity of the light near the light emitter source. Can be used to achieve an Inverse Square Falloff.
  • Radius: The default radius for the light. Individual references can have their radii changed in the Creation Kit.
  • Near Clip: Controls the shadow bias of shadow-casting lights, the default value (7.2174) needs tweaking in most cases. If this value exceeds the Radius value, the light will disappear.
  • Volumetric Intensity: Should control the intensity of God Rays, but tests have shown no difference, neither ingame nor in the CK.
  • Color: The color of the light cast by this emitter. (Keep in mind RGB values not sRGB)
    • Fade: The intensity of the light.
    • Gobo: A texture file through which the light will be filtered. See Wikipedia for information on how this works. Unreal Engine users know this as Light Functions or IES Light profiles.
  • Flicker Effect: These options can add a flickering or pulsing effect to the light.
    • Flicker: If selected, the light's brightness will fluctuate in an unpredictable manner.
    • Pulse: If selected, the light's brightness will fluctuate in a regular pattern.
    • None: If selected, the light's brightness will remain constant.
    • Period:
    • Intensity Amplitude:
    • Movement Amplitude:

  • Flags:
    • Portal-strict:
    • Obstacle: Whether the game should check the light's model for NAVCUT data and apply it.
    • Specular: Whether this light should contribute to the Specular channel or not. See Notes for more information.
    • Random Anim Start:
    • Ignore Roughness: Whether this light should contribute to the roughness channel or not. See Notes for more information.
    • No Rim Lighting: Whether this light should cast a subtle Rim Light or not. See Notes for more information.
    • Volumetric Light: Whether this light should cast Volumetric rays (GodRays) or not. See Notes for more information.
    • Ambient Only: Whether this light acts as an Ambient Light or not. These lights have a special behaviour. see Notes for more Information.
  • Keywords: A list of keywords that signal information to other game systems.

  • This light can be carried: If checked, the light can be held by NPCs and stored in containers. The data in this section pertains to how the light is treated as an item.
    • Inventory image: Not used.
    • Message Icon: Not used.
    • Weight: The light's weight as an item.
    • Value: The light's value as an item.
    • Time: The amount of time that this emitter remains lit. In Skyrim, this was used to limit the duration a torch remained lit.
    • Preview Transform: A Transform applied to this light when its model is shown in the inventory menus.

  • God Rays: If "Volumetric Light" is checked here you HAVE TO choose the God Ray profile it should use.
    • Near Clip: This controls the clipping of the ray effect from the origin of the light source. Useful for things like hanging lights.
  • Lens Flare: The Lens Flare effect the light should use.
  • Attenuation Settings:
    • Constant:
    • Scalar:
    • Exponent: Increases the lights intensity towards the maximum radius of the light. A value of 100 would give you a light with no falloff. See Notes for more information.
    • Attenuation Only: This basically allows you to use the light as a "Fill Light" (Does not contribute to effects like Specular, Roughness, Rim Lighting and Self-Shadowing).

Notes[edit | edit source]

  • "Shadow Hemisphere" Lights are cheaper than "Shadow Omnidirectional" Lights and you should consider using them if the case allows it.
  • The engine treats Shadow Omnidirectional lights as two Shadow Hemisphere lights stitched together; these emitters may have a visible "seam" of light that cuts through the shadows. Try to place these lights to cover up that seam.
  • Spotlights are super useful in a lot of cases due to their flexible nature. You have control over their FOV, Radius, Exp Falloff, Channel contribution etc. plus Shadow casting is also cheaper compared to "Shadow Omnidirectional" Lights. Never neglect them just because you're not creating a hanging lamp or a search-light.
  • Ambient lights work on a Black to White basis. A fully white light (Color setting) does practically nothing, a fully black light however cancels out all Ambient Light that has been set in either the corresponding "Lighting Template" or inside the Cells "Lighting" tab (Found in Cell View - {Your cell name} - Right Click - Edit - Lighting). But they can also be used to shift the ambient color in certain areas, for instance the Player Home in PreWar Sanctuary has a brownish ambient color inside while the outside uses a blueish ambient color.
  • By checking the "Attenuation Only" flag you can technically create a Fill-Light. Fill lights are often used to simulate bounce lights or to artificially brighten dark areas. Best used with low Fade values but higher Exponent values, consider using LightBoxes to prevent the light from bleeding through walls.
  • Even though Volumetric Lights add a lot of flavor to a light, don't forget that they are really expensive! Use them sparsely and avoid crossing rays from different light sources since it can cause artifacts and increases render cost.
  • As with any ObjectReference base form, lights can be spawned at run-time by Papyrus scripts. However, it is impossible to set the fade (brightness) or radius of a created light.

See Also[edit | edit source]