Lit Translucency

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.

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).

Per-Pixel Translucent Lighting

In the deferred renderer, the new forward shading functionality can now 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