This is the documentation for Enlighten.
Mesh destruction
When you remove a large static mesh actor with Contribute Lightmap or Contribute Probe lighting mode from the world, the Enlighten lighting doesn't respond until you run the precompute.
To simulate the effect of removing the actor in-game without running the precompute, use the Enlighten Transmittance property. As you increase the transmittance, more indirect light appears to pass through the actor. This is useful when the actor is destructible (UE4 documentation). The effect works best for an actor with a short distance between opposite sides, such as a thin wall or curtains.
You can change the transmittance in-game using a Blueprint function. For example, you might modify the transmittance at the same time as triggering a separate destruction animation. With a Blueprint, you can simultaneously hide the intact mesh, set its transmittance value to one (full) to simulate indirect light passing through it, and show a destroyed version of the mesh while triggering its destruction animation.
The Enlighten Transmittance value has a range between zero and one. When the value is greater than 0
, a proportion of the indirect light arriving at one side of the mesh is emitted at the opposite side. This gives an illusion of indirect light passing through the space occupied by a mesh. When the Enlighten Transmittance value is 1
, all the indirect light that arrives at one side of a mesh is emitted from the opposite side. When the value is less than 1
, the light emitted from the opposite side takes on a proportion of the albedo color of the surface at the point of emission.
While a mesh is being destroyed through an animation that breaks it into fragments, to create an illusion of indirect light passing between the fragments, blend the transmittance between 0
and 1
.
Modifying Enlighten Transmittance while your game is running increases the amount of Enlighten computation required. We recommend you only use Enable Dynamic Transmittance for meshes whose Enlighten Transmittance property you want to modify while the game is running.
Set transmittance for a static mesh actor
- In Details > Enlighten, enable Enable Dynamic Transmittance.
This enables modifications to the Enlighten Transmittance property while the game is running. When this is disabled, changes have no effect. - /wiki/spaces/SDK309/pages/161743422.
- In Details > Enlighten, set the Enlighten Transmittance. This is the proportion of indirect transmitted light through the mesh. You can change this while the game is running using a Blueprint.
Enlighten Transmittance properties are visible when the Lighting Mode is either Contribute Lightmap or Contribute Probe.
Control transmittance using a Blueprint
To control the Enlighten Transmittance value of a Static Mesh Component while the game is running, use the Blueprint function Set Enlighten Dynamic Transmittance.
The Enlighten Transmittance value doesn't change the effect of direct lighting and shadows for the mesh.
Control the light probe resolution
To compute the lighting for meshes with Enable Dynamic Transmittance enabled, Enlighten samples from probes around the mesh. During the precompute, Enlighten automatically generates probes around the mesh, even when it is lit using lightmaps.
To control the resolution, in Details > Enlighten, use the Enlighten Adaptive Probe Resolution property.