Settings

  • Project Settings
    • Engine > Rendering >
      • Global Illumination >
        • Dynamic Global Illumination Method : Lumen
      • Reflections >
        • Reflection Method : Lumen
        • Reflection Capture Resolution : 2048
      • Lumen >
        • Use Hardware Raytracing when available : On
      • Hardware Raytracing >
        • Support Hardware Raytracing : On
          • Note! Hardware Ray Tracing requires enabling skin cache. You will be promted to enable skin cache.
            Engine > Rendering > Optimizations > Support Compute Skin Cache
        • Raytraced Shadow : Off / Optional
          • You can override on a per light basis
        • Ray Traced Skyl Light : Off / Optional
          • You can override on a per light basis
      • Software Raytracing >
        • Generate Mesh Distance Fields
      • Default Settings >
        • Auto Exposure : Auto Exposure Histogram
        • Extend default luminance range in Auto Exposure settings : On
          • Allows use to use a more film based range value in the post process volume
      • Optimizations >
        • GBuffer Format : High Precision Normals
          • Same as default except normal are encoded at 16 bits per channel
    • Platforms > Windows >
      • Targeted HRIs >
        • Default RHI : DirectX 12
    • Misc Lighting >
      • Allow Static Lighting : Off (maybe)
        • Note! We might want to turn this off.
        • By doing so it saves us from some static lighting overhead with shader permutations…
        • It will also allow for shader Ambient Occlusion input
        • And allow material bent normals to work with lumen global illumination
        • No more light map build times

Calibrating the scene

It can be nice to use a color calibrator mesh when setting up the lighting. Here is how you add the one that ships with UE5.

  • Add color calibrator asset
    • In the content browser click the settings button (top right side) and enable content > Show Engine Content
    • Select the Engine > Content folder
    • Start typing “sm_color” in the search field
    • Select the “SM_ColorCalibrator” and drag it into the scene
  • Add a neutaral Post Process Volume
    • It can also be nice to add a PPV to create a neutral base, which we then can do artistic overrides to. In thg section PPV - Neutral we add one of these.

Core Light Actors

  • Light actors to add
    • Directional Light
    • Sky Light
    • Sky Atmosphere
    • Volumetric Cloud
    • Exponential Height Fog
  • Post Process Volumes (2)
    • Note! we will add 2 post process volumes in total, one for creating a “neutral” base line and one for “artistic” purposes that will override the neutral PPV.*

PPV - Neutral

The idea here is to create a “neutralizing” baseline post process volume and then do “artistic” post process adjustment on top of that. The neutralizing PPV could also be part of the main level and the “artistisc” PPV could be inside each “look dev lighting” level.

  • Post process volume
    • Post Process Volume Settings >
      • Priority : 0.0
        • This will have the lowest priority and will be overridden by the artistic PPV, in cases where attributs are clashing.
      • Infinite Extend (unbounded) : On
    • Lens > Exposure >
      • Exposure Compensation : 1.0
      • Min EV100 : 0.0
      • Max EV100 : 0.0
        • Note! if you did not set the “Extend default luminance range in Auto Exposure settings” the min and max will be called min / max brightness instead
    • Optional (may vary depending on scene)
      Here we could disable/enable settings that we want to do at the “neutralization” PPV.
      That could fro example be:
      • Disable bloom
        • Bloom >
          • intensity : 0
      • Disable Lens flare
        • Lendfalre >
          • Intensity : 0.0
      • Etc..

Setup Atmosphere

  • Directional Light
    • Transform >
      • Mobility : Movable
    • Light >
      • Indirect Lighting Intensity : 1.0 (default)
        • With this setting you can scale the indirect lighting. Do not use to high values as it might induce flickering and artifacts. A value in the range 1-10 should be ok.
      • Volumetric Scattering Intensity : 1.0 (default)
        • Can be used to control the volumetric scattering from this light.
      • Advanced >
        • Cast Ray Traced Shadows : Enabled
          • This has some artifacts occociated with it. Decide on a level basis is this is somethoing that is acceptable or not
    • Light Shafts >
      • Light Shaft Occlusion : On
      • Light Shaft Bloom : On
      • Bloom Scale : 0.2 (default)
        • Scales the additive color
      • Bloom Threshold : 0.0 (default)
        • Can be useful to control where the light shaft bloom occur. Scene color must be larger than this to create bloom in the light shafts.
      • Bloom Max Brightness : 100.0 (default)
        • After exposure is applied, scene color brightness higher than this value will be scaled to this max value.
    • Distance Field Shadows >
      • Distance Field Shadows : On
        • Note! to use distance
    • Atmosphere and Clouds >
      • Atmosphere Sun Light : On
      • Cast Shadows on Clouds : On
      • Cast Shadow on Atmosphere : On
    • Advanced >
      • Atmosphere Sun Light Index : 0
        • Note! if should be set to 0 if this is our sunlight if this is our moon we should set it to 1
  • Exponential Height Fog
    • Exponential Height Fog Component >
      • Fog Density : set to a value that looks good in the scene
        • Note! as the names implies controls the density
    • Directional Inscattering >
      • Directional Inscattering Exponent : 4.0 (default)
        • Controls the size of the directional inscattering cone, which is used to approximate the inscattering from a directional light. Note: there must be a directional light with bUsedAsAtmosphereSunLight enabled for DirectionalInscattering to be used.
    • Volumetric Fog >
      • Volumetric Fog : On
      • Extinction Scale : 1.0 (default)
        • Scales the extinction amount used by volumetric fog. Values larger than 1 cause fog particles everywhere to absorb more light. Could also be used to tone down the fog with lower values
  • Sky Light
    • Transform >
      • Mobility : Movable
    • Light >
      • Real Time Capture : On
      • Cube Map Resolution: 512
        • We could also use higher values, valus above 4096 my slow down the system
      • Intensity Scale : 1.0 (default)
        • Can be used to boost the intensity but use small values (like 1.5 or so). If real time capture is on a value of 1.0 shoul be fine. We could also control thsi with a PPV
      • Cast Ray Traced Shadows :
        • In my experience enabling this has a very limited effect. Might be a bug or missing something?
    • Distance Field Ambient Occlusion >
      • Occlusion Max Distance : 1000 (default)
        • Max distance the the occlusion of one point will affect another. Higher values increase the cost of Distance Field AO exponentially.
    • Atmosphere and Cloud >
      • Cloud Ambient Occlusion : On
  • Sky Atmosphere
    • Atmosphere - Rayleigh
      • Rayleigh Scattering Scale : 0.0331 (default)
        • Slightly higher values will give a more “sun-setty” tint to it. Note increase by really small amount.
  • Volumetric Cloud

PPV - Artistic

With this PPV we will do more of a look dev, artistic tweaks.

  • Post process volume
    • Post Process Volume Settings >
      • Priority : 1.0
        • This will have the lowest priority and will be overridden by the artistic PPV, in cases where attributs are clashing.
      • Infinite Extend (unbounded) : On
    • Film >
      • Toe
        • Sets dark colors of the tonemapper. Can be used to give the image more or less contrast.
    • Global Illumination >
      • Lumen Global Illumination >
        • Final Gather Quality : 2.0
    • Reflections >
      • Lumen Reflections >
        • Quality : 3.0
    • Render Features >
      • Translucency >
        • Type : Ray Tracing
          • Set to this if needed and the result is nice

Workflow

Levels

It can be a good idea to organize the project using levels. It allows multiple people to work on the same project. It can also be used to organize the work, for instance we can have different light setups in a separate levels and add that to the main level to quickly replace the lighting.

  • Create levels
    • Main level
      • Create a Level, lets call it “MainLevel”
      • This will be the level that has all the sub levels that we will create
    • Geo level
      • Then we can create a new level that will contain only the geo
    • Lighting / Look dev level
      • Create a level that will contain s specfic lighting look
    • Additional levels
      • Add the levels that you need in the project
      • There is no right or wrong here, organize as you need
  • Setup Sub Levels
    • Open the “MainLevel”
    • Open the Levels window
      • Windows > Levels
    • Then we can drag in the levels that we created earlier
  • Set Current
    When items are added the level that are the current one will get them. To select the current level you can do the following
    • Level drop down
      • In the bottom left corner of the viewport you can use the level drop down to set a current level
    • Double click
      • In the Levels window you can double click to set current level
    • Press Enter
      • With a level selected in the Levels window press Enter to make it current
    • RMB context menu
      • In the Levels window, RMB > Make Current

Light Theory

  • Environmental
    • Natural Light - comes from the world itself
    • Sunlight, moonlight or sky ambiance
  • Practicals
    • Real light source emitters from the real world that can be seen in frame
    • Lamp, streetlight, car headlights etc…
  • Emulated
    • Lights that are placed to accentuate/emulate Environmental or practical lights
  • Cheated
    • Lights for added effect / better look
    • Rim lights
    • Fill lights
    • etc

Light Types

Note! when using raytraced lighting always set the mobility of the lights to Movable

  • Directional Light
    • Light >
      • Source Angle
        • The size of the light
        • Larger values means softer shadows
      • Advanced >
        • Cast Ray Traced Shadows : On
    • Atmosphere and Cloud >
      • Atmosphere Sun Light : on
        • Wheter the directional light can interact with the atmosphere, cloud and generate a visual disc. All of which compose the visual sky.
        • If enabled the shortcut Ctrl + L move mouse will control rotation of the light
  • Sky Light
    • Light > Advanced >
      • Cast Ray Traced Shadows : on
  • Point Light
    • Light >
      • Source Radius
        • Affects the radius of the light, larger means softer shadows
      • Soft Source Radius
        • affect the soft edge of the specular highlight (does not affect shadows)
      • Source Length
        • With this we can create “longer” lights like a flourecent tube
  • Spot Light
    • Pilot
      • RMB click the light > Pilot Light
  • Rect Light

Path Tracing

Tips

  • Translucency & DOF
    • By default (in UE 5.3) if you use Depth of Field with a translucent object, the resulting DOF blur of the translucent object will be the pixels behind the translucent object. As I understand, it this is because the translucent object does not render to the depth buffer, so it uses the pixales that are rendered to the depth buffer to determine how far away the pixels are. A simple fix for this is the following:
    • Add a Post Process Volume
      • Path Tracing > Reference Depth Of Field: Enable

Tips

Artifacts

  • Toggle Raytracing on/off
    • r.raytracing.ForceAllRayTracingEffects
      • 0 : disable all effect
      • 1 : enable all effect
      • -1 : previous settings enabled for your project
  • Nanite & raytraced shadows artifact
    • cvar
      • r.RayTracing.NormalBias 5
      • r.Raytracing.Shadows.EnableTwoSidedGeometry 0
    • Directional Light
      • Raytracing >
        • Shadow Source Angle Factor
          • increase this for softer shadow
        • Samples Per Pixel
          • increase this
  • Force No Precomputed Lighting
    • World Settings > Lightmass > Advanced >
      • Force No Precomputed Lighting : might test to turn this on
        • Wheter to force lightmaps and other precomputed lighting to not be created even when the engine thinks they are needed. Thi sis useful for improving iteration in levels with fully dynamic lighting and shadowing. Note that any lighting and shadowing interactions that are usually precomputed will be lost if this is enabled.

Reference

Shot Deck