Lit Translucency

Explanation of how translucent surfaces are lit and cast shadows including self-shadows.

Choose your operating system:

Windows

macOS

Linux

Translucent effects generally fall into a few categories: volumetric, volumetric but dense enough to have normal information, and surfaces. Different lighting techniques are needed for each of these, so a material must specify the Translucency Lighting Mode that should be used.

Lit translucency gets most of its lighting through a series of cascaded volume textures oriented around the view frustum. This allows lighting to be known in a single forward pass for any point inside the volumes, but has the downside that the volume texture is fairly low resolution, and can only cover a limited depth range from the viewer.

The volume is configured through cvars that can be set differently based on the scalability level:

  • r.TranslucencyLightingVolumeDim, which defaults to 64. Raising this by a factor of 2 increases the cost to light volume by a factor of 8.

  • r.TranslucencyLightingVolumeInnerDistance, which defaults to 1500. Raising this increases lighting volume coverage but reduces effective resolution.

  • r.TranslucencyLightingVolumeOuterDistance, which defaults to 5000. Raising this increases lighting volume coverage but reduces effective resolution.

Shadowed direct lighting from all movable light types is injected into the translucency lighting volume. Light functions are also taken into account.

Lit Translucency

Translucent materials receive diffuse GI from the Indirect Lighting Cache . Only one lighting sample is interpolated, at the center of the object's bounds. There is only one sample taken for the whole object, even if it is a large particle system. The indirect lighting interpolates over time if the bounds center changes, so it does not pop.

LitTrans_IDLC_spheres.png

The left sphere is lit translucency using the Indirect Lighting Cache , the right sphere is opaque with baked lighting from Lightmass.

Volumetric effects

Casting Shadows & Self-Shadowing

Translucency can cast shadows onto the opaque world and onto itself and other lit translucency Actors. This is implemented with Fourier Opacity maps, which do a great job for shadowing from blobby volumes, but have severe ringing artifacts with more opaque translucent surfaces. Translucency self shadowing goes through the lighting volume for point and spot lights, so it is often not visible due to low resolution unless the effect is very large and dense. Directional lights however do translucent self shadowing per-pixel, and get much higher quality. Directional lights also have subsurface shading for lit materials using the subsurface shading model.

Translucent self-shadowing uses per-object shadows, which means that it needs user specified fixed particle system bounds and they need to be correct. The easiest way to set this up is to author your particle movement, then right-click on the 'show bounds' button on the Cascade toolbar, which will pop up a dialog that allows you to generate fixed bounds. Very large self-shadowing particle systems will get reduced shadowmap resolution, since the shadowmap is stretched to cover the system bounds. Verify that your bounds are reasonable by enabling Show Bounds, which can be found under Show -> Advanced -> Bounds. Then select the emitter in the editor and it will draw the bounding box and sphere.

Translucent Particle Self-Shadowing

Translucent Particle Self-Shadowing

Static shadowing

Translucency can receive static shadowing from stationary lights through a special static shadow depth map generated by Lightmass at lighting build time.

Translucent Surfaces

Reflection Captures

TLM_Surface materials receive image based reflections (specular GI) from the reflection captures placed in the level. Unlike opaque materials, only one reflection capture's cubemap is applied (no blending) which currently causes a pop if the object moves closer to another reflection capture. The cubemap is also applied as if it lies at infinity, instead of nearby, which can cause artifacts on large flat surfaces.

LitTrans_reflSpheres.png

The left sphere is translucent, the right is opaque, and they are both setup as metals, which means 100% of the lighting comes from specular.

Per-Pixel Translucent Lighting

In the deferred renderer, the Forward Shading functionality can be used on translucent surfaces to get specular highlights from multiple lights and image-based reflections from parallax-corrected reflection captures.

To enable Per-Pixel Translucent Lighting set the Lighting Mode to Surface ForwardShading and then make sure that Screen Space Reflections are enabled.

PerPixel_TransLighting_Settings.png

Thin Translucency

The Thin Translucent Shading Model and its material output expression enables you to accurately represent physically based transparent materials, such as tinted or colored transparent materials that accurately respond to lighting and shading. The transparent material is able to display white specular highlights and properly tint the background in a single pass.

Standard Translucent Shading Model

Thin Translucent Shading Model

Enable Thin Transparency output in your materials by setting the following in the Material Details panel:

Click image for full size.

  • Blend Mode: Translucent

  • Shading Model: Thin Translucent

  • Lighting Mode: Surface ForwardShading

In the Material Graph, you'll want to use the Thin Translucent Material output expression node to control the color transmittance of the transparency.

Limitations

  • Lit translucent surfaces are missing direct specular.

  • Lit translucent surfaces get all their direct lighting through the translucency volume lighting texture, which causes them to be lower resolution than needed for most surface materials (glass, water).

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss