Vertex Lighting Plugin Documentation

Complete documentation on the Vertex Lighting plugin for Unreal Engine

View project on GitHub

The icon of the Vertex Lighting Plugin


Supported Engine Versions


📑Limitations

  • Vertex Lighting does not work on landscapes.

How to Download and Install

  1. Download the Plugin
    • Get the plugin from the GitHub Releases page or by downloading the source code.
  2. Install the Plugin
    • Place the plugin folder into your project’s Plugins directory. (Create a Plugins folder if it doesn’t already exist.)
  3. Enable the Plugin
    • The plugin should be enabled by default. However, double-check that it is enabled in the Plugins menu within Unreal Engine.

    The Vertex Lighting Plugin being enabled


How to Use

  1. Set Up the Plugin
    • In the Content Browser, navigate to the Vertex Lighting Plugin directory.
    • Drag and drop the VertexLighting_Manager into your level. A guide image for the VertexLighting_Manager location in the folder
  2. Configure Materials
    • Locate the VertexLights_MaterialFunction in the Logic folder within the Vertex Lighting Plugin directory. A guide image for the materialfunction location in the folder
    • Open the materials you want to use and multiply your base color/texture (Input A) with the VertexLights_MaterialFunction (Input B). A guide image for the materialfunction in a material
    • Connect the result of the multiplication to the Base Color and/or Emissive Color of your material.
  3. Add Lights
    • Place a VertexLighting_Light or VertexLighting_Light_Animated actor into your level to add lights. A guide image for the VertexLighting_Light and VertexLighting_Light_Animated location in the folder

Demo Level

The plugin includes a demo level showcasing multiple vertex lighting configurations. Experiment with the light settings to get a feel for their functionality and effects. The icon of the VertexLighting_Manager


Plugin Components

VertexLighting_Manager

The VertexLighting_Manager is essential for vertex lighting functionality.

[📑IMPORTANT] Ensure only one manager is present per level.

[‼️CAUTION] Only up to 256 vertex lights can be registered at the same time, without easy and simple modifications.

The icon of the VertexLighting_Manager

Default Settings:

Day Night Cycle:
  • UseDayNightCycleAmbientColor: Enables ambient color changes according to the day-night cycle.
    • Default: False Type: Boolean
  • StartingTime: Defines the initial time of day using a 24-hour format.
    • Default: 07:00 Type: Time Structure [Integer:Integer]
  • DayNightCycleColorCurve: Defines the color transitions for the day-night cycle.
    • Default: “VertextLighting_ExampleDayNightCycle_ColorCurve” Type: Curve Linear Color
  • SecondsPerMinuteInGame: Specifies how many real-world seconds equate to one in-game minute.
    • Default: 0.01s Type: Float Range: 0.0-Infinite
  • TickRate DayNightCycle: Time interval between day-night cycle updates. Set to 0.0 to disable updates.
    • Default: 0.25s Type: Float Range: 0.0-Infinite
Time Events:
  • Call OnMinute: Enables the event dispatcher that triggers when the time updates by one minute.
    • Default: False Type: Boolean
  • Call OnHour: Enables the event dispatcher that triggers when the time updates by one hour.
    • Default: False Type: Boolean
Ambient:
  • Ambient Color: Default environmental color.
    • Default: Hex sRGB - 7C7C7CFF Type: Linear Color
  • SunNormalInfluence: Controls how directional the vertex light sunlight should be, on a percentage basis. 0% makes the sunlight completely non-directional, while 100% makes it fully directional.
    • Default: 0% Type: Float Range: 0.0-100.0
Skybox:
  • ChangeSkyboxColorWithDayNightCycle: Adjusts the linked skybox actor’s overall color based on the DayNightCycleColorCurve and time. The linked skybox actor must inherit the VertexLighting_Skybox_Interface for this function to work.
    • Default: True Type: Boolean
  • Skybox Actor: Specifies the linked skybox actor.
    • Default: None Type: Actor
Tickrate:
  • Light Update Tickrate: Time interval between light updates. Set to 0.0 to disable updates.
    • Default: 0.1s Type: Float Range: 0.0-Infinite
Debug:
  • ShowCombinedVertexLightInfo: Enables debug information about the active vertex lights.
    • Default: True Type: Boolean
  • ShowCombinedVertexLightInfo: Enables debug information about the exact day-night cycle time.
    • Default: True Type: Boolean

Sun Direction:

The sun’s direction is controlled by the rotation of the VertexLighting_Manager and is visually represented by a yellow arrow originating from the manager.

Image of the yellow arrow originating from the manager

In-Editor Events:

  • Draw All Preview Lights: Displays all vertex lights in the editor.
  • Unregister All Preview Lights: Stops displaying vertex lights in the editor.

VertexLighting_Light

The VertexLighting_Light adds a static or dynamic vertex light to your scene.

[🗒️NOTE] VertexLighting_Light is not considered relevant for Level Bounds.

The icon of the VertexLighting_Light

Default Settings:

  • Light Color: Color of the light.
    • Default: Hex sRGB - FFFFFFFF Type: Linear Color

[⚠️WARNING] Overridden by color curves for VertexLighting_Light_Animated.

  • Brightness: Light intensity.
    • Default: 10x Type: Float Range: 0.0-100.0

[⚠️WARNING] Overridden by color curves for VertexLighting_Light_Animated.

  • Influence Radius: Radius of the light’s influence.
    • Default: 300cm Type: Float Range: 0.0-Infinite
  • Influence to Normal: Controls how directional the vertex light should be, on a percentage basis. 0% makes the light completely non-directional, while 100% makes it fully directional.
    • Default: 0% Type: Float Range: 0.0-100.0
  • Render Distance: Maximum render distance for the light.
    • Default: 10,000cm Type: Float Range: 0.0-10,000.0
  • Is Movable Light: Makes the light’s position dynamic during updates.
    • Default: False Type: Boolean
  • Should Turn On In Range: Determines if the light activates when the player is nearby.
    • Default: True Type: Boolean

Editor Settings:

  • Show Render Distance: Displays the render distance sphere in the editor.
    • Default: False Type: Boolean

VertexLighting_Light_Animated

The VertexLighting_Light_Animated adds a static or dynamic vertex light with a color curve to your scene.

[🗒️NOTE] The VertexLighting_Light_Animated inherits from VertexLighting_Light.

The icon of the VertexLighting_Light_Animated

Animated Light Settings:

  • Color Curve: Defines the color animation curve.
    • Default: “VertexLighting_ExampleColorCurve” Type: Curve Linear Color
  • Start Position: Starting point of the color curve.
    • Default: 0.0s Type: Float
  • Start at Random Position: Starts the curve at a random timestamp.
    • Default: False Type: Boolean
  • Is Looping: Determines if the animation repeats. If False, the light is destroyed after playback.
    • Default: True Type: Boolean
  • Play Rate: Speed of the animation playback.
    • Default: 100% Type: Float
  • Should Update No Tick Rate: Forces updates for animated lights even when tick rate updates are disabled.
    • Default: False Type: Boolean

Other Components

VertexLights_MaterialFunction

Default Settings:

  • WorldPosition (Optional): Allows manual override of the world position. Defaults to the Absolute World Position.
    • Default: Absolute World Position Type: Vector3
  • VertexBasedNormals (Optional): Input for normals interpolated per vertex.
    • Default: VertexNormalWS Type: Vector3

Color Curve

VertexLighting_Light_Animated uses a color curve for its Light Color and Brightness

Color Channels:

  • R Channel: Defines the red color
  • G Channel: Defines the green color
  • B Channel: Defines the blue color
  • A Channel: Defines the brightness

Modifying maximum registered vertex lights

To adjust the maximum number of vertex lights that can be registered at the same time:

  • Locate the ‘VertexLightData_RenderTarget’ render texture in the Content Browser.
    • Path: VertexLightingPlugin/Content/Logic/TextureRenderTarget/VertexLightData_RenderTarget
  • Open the texture file.
  • Find the ‘Size X’ setting.
    • This setting controls the maximum number of registered vertex lights.
  • The default value is 256. Adjust as needed.
    • Do not modify the ‘Size Y’ setting.

Troubleshooting

I can’t see any vertex lights

Ensure the following:

  • A single VertexLighting_Manager is present in the level.
  • You have placed VertexLighting_Light or VertexLighting_Light_Animated actors in your level instead of regular lights.
  • The VertexLights_MaterialFunction is properly multiplied with your material’s texture.
  • The model has sufficient vertices within the light’s influence range. Vertex lights only illuminate vertices, so ensure your model has enough for visible effects.
  • You are not trying to light a landscape.

Crash: AnimSequenceBase error

  • Make sure you have the Animation Compression Library plugin, made by Epic Games, enabled.

Credit

[🗒️NOTE] Portions of this project are based and improved upon on the vertex lighting implementation originally created by EvilReFlex, shared via Discord.