Docs

Guides

Lighting and performance

Shadow cost, close-up shadow quality, glow values, Nanite, instancing and candle flicker for the Pagoda Lantern & Railing Kit.

Shadowed point lights are the main cost#

Every BP_MarketLantern casts real shadows by default, and all 28 lanterns in the demo maps keep them on. Keep bCastShadows on for every lantern a player can walk up to.

Turning it off switches the Blueprint to its downward no-shadow light (see Market lantern). Nothing can then light the roof from inside, the lantern throws no shadows on the ground and the roof soffit stays unlit. Use it only for lanterns 15–20 m or more from the camera.

Measure the saving in your own scene with stat gpu (ShadowDepths).

Close-ups under the eaves#

Virtual Shadow Maps soften the lantern's shadows with a small number of samples per pixel. Seen from directly below a lit lantern (about 1 m under the eaves), the soffit and rafters show fine speckle and stippled shadow edges.

For cinematics or close-up shots, raise these two console variables. The gallery images use 16 and 16:

text
r.Shadow.Virtual.SMRT.RayCountLocal 16
r.Shadow.Virtual.SMRT.SamplesPerRayLocal 16

This reduces the grain but does not remove it, so avoid holding a camera right under the eaves.

The paper-lantern lights in the railing tool never cast shadows and are capped at 16 per actor.

Glow values#

The defaults are tuned for dusk exposure (EV ≈ 2.6) and hold from street distance down to about 1 m.

  • The market-lantern paper (GlowStrength 28 at 1800 lm) reads as lit paper, with its fibre and a falloff from the flame to the pane corners. At eye height 1.8 m from a lantern, 0.16 % of the pane pixels are at or above 240 on all three channels, and 0.07 % at 1 m.
  • The hanging paper lanterns (GlowStrength / LanternGlow 3) read as lit red paper even in a 2 m close-up.

For a brighter look, raise them. In daylight set them to 0 or turn the lights off, as L_Demo_Day does. All gallery images use the defaults.

Nanite#

Nanite is Unreal's virtualised geometry system. The lantern housing, paper lantern, rope swag and all rope-lashed railing pieces are Nanite. Where Nanite is not available the engine draws the fallback meshes listed on the Contents page. The low-poly parts (rails, balusters, plain post, diffuser, demo meshes) are ordinary meshes.

Instancing#

The railing tool draws each piece type with one Instanced Static Mesh component per actor, so a long run costs a handful of draw calls.

Candle flicker#

Candle flicker is a light function. It costs little but is visible only while the light is on.