Path Tracer

An overview of the Path Tracer in Unreal Engine.

Choose your operating system:

Windows

macOS

Linux

The Path Tracer is a progressive, hardware-accelerated rendering mode that mitigates the disadvantages of real-time features with physically correct and compromise-free global illumination, reflection and refraction of materials, and more. It shares the ray tracing architecture built into Unreal Engine, with minimal to no additional setup required to achieve clean, photoreal renders.

LS_CineCameraActor13_508_0000_Ultra.png

"Virtual tour in Unreal Engine" by ARCHVYZ. Design by Toledano Architects.

The Path Tracer uses the same ray-tracing architecture as other ray-tracing features, such as Real-Time Ray Tracing and GPU Lightmass , making it ideal for ground truth comparisons and production renders. The Path Tracer only uses geometry and material present in the scene to render its unbiased result, and does not share the same ray-tracing code that has been developed to work well for real-time rendering.

Benefits of the Path Tracer

The Path Tracer provides the following benefits when compared to other rendering modes:

  • The ability to generate high-quality photorealistic renders with physically accurate results.

  • Minimal or no additional setup required to achieve comparable results to other offline renderers.

  • Reduces the feature gap of comparable real time features. For example, materials seen in reflections and refractions are rendered without limitations, such as having global illumination and path-traced shadows present.

  • Full integration with Sequencer and Movie Render Queue to support Film / TV quality render outputs.

Path-Traced Scene Examples

The following scenes are examples of the high-quality renders achieved using the Path Tracer.

LS_CineCameraActor20_612_0000_Ultra.png

"Virtual tour in Unreal Engine" by ARCHVYZ. Design by Toledano Architects.

Enabling the Path Tracer in Your Project

The Path Tracer is available when requisite ray tracing features have been enabled for the project. The following system requirements must be met and these settings must be enabled.

System Requirements:

  • Operating System: Windows 10 1809 or later

  • GPU: NVIDIA RTX and DXR driver-enabled GTX series graphics cards

Project Settings:

Ray Tracing Project Settings

  • Platforms > Windows > Targeted RHIs: DirectX 12

  • Engine > Rendering > Ray Tracing: Enable Ray Tracing

  • Engine > Rendering > Optimizations: Enable Support Compute Skin Cache

    When Ray Tracing is enabled for the project, a pop-up window will ask you to enable Support Compute Skin Cache if it is not already enabled. This property is required to support the ray tracing features.

Restart the engine for changes to take effect.

Limitations of the Path Tracer

The following are some of the current limitations of path tracing in Unreal Engine.

  • Bright Materials slow down interior renders

    • Materials which have an albedo value close to 1.0, such as a bright white color, cause rendering of frames to take longer than needed because the path Tracer needs to simulate the path of lights with many bounces. Interior scenes are especially susceptible to this because light rays can take longer to escape the environment before being terminated. The Path Tracer employs the Russian Roulette technique to terminate rays that aren't likely to contribute to the scene sooner. Rays that continuously bounce through the scene are less likely to happen because they are terminated by the Russian Roulette technique when possible. When a material's albedo uses a value close to 1.0, termination of the ray path is less likely to happen, and contributes to longer render times for the frame.

    • Materials that reflect all incoming light are rare in the real world, and these tend to have a washed out appearance to their surface. For this reason, it is recommended that you keep the Base Color below 0.8 for all diffuse materials.

  • Dynamic Scene Elements

    • The Path Tracer works by having the renderer accumulate samples over time. This is ideal for static scenes and less so for dynamic scenes that include elements such as moving lights, animated skinned meshes, and visual effects. These types of elements do not invalidate path tracing in the editor and appear as blurred, or streaking artifacts in the frame. This only appears when working in the editor and is remedied by using the Movie Render Queue to render out final elements.

  • Ray Tracing Material Quality Switch Nodes

    • Optimizing materials for ray tracing features by reducing their complexity using the Ray Tracing Quality Switch node helps reduce their costs at runtime. This allows Unreal Engine's ray tracing features to use a simpler material compared to the deferred renderer. However, since the Path Tracer uses ray tracing, even for the camera-visible surfaces, this approximation will be directly visible and will compromise the quality of the output render. It may therefore be beneficial to remove these nodes from your material graph if you intend to make use of the Path Tracer. This limitation will be removed in future versions of Unreal Engine.

For additional information and notes on specific features, see the Supported Features section of this page.

Using the Path Tracer in the Level Editor

Enable the Path Tracer view in the Level Viewport by using the View Modes dropdown menu to select Path Tracing .

Level Viewport View Mode for Path Tracing

When enabled, the renderer progressively accumulates samples from the current view by continuously adding samples while the camera is not moving. When the target sample count is reached, the frame will be denoised (if denoising is enabled in the Post Process Setting) to remove any remaining noise present in the render.

In most cases, when the scene changes the samples are invalidated and the process starts again. Moving the camera, changing views, updating or changing materials on an object, and moving or adding objects to the scene will all result in the scene's samples being invalidated.

The Path Tracer can be used interactively and will quickly start to display pixels with shaded color as samples accumulate. The amount of time it takes to render largely depends on the complexity of the scene and the materials being sampled. Outdoor scenes tend to render more quickly as rays can escape with fewer and faster bounces. Interior scenes, especially those with materials with albedos close to 1.0, cause light paths to be longer and will therefore result in a longer render time.

Post Process Volume Path Tracer Settings

Placed Post Process Volumes in the Level provide configurable properties for the Path Tracer. These include settings for the maximum number of light bounces, samples per pixel, anti-aliasing quality (or Filter Width), and more.

Settings for the Path Tracer can be found in the Post Process Volume Details panel under the PathTracing category.

Path Tracer Post Process Volume Settings

Property

Description

Max. Bounces

Sets the maximum possible number of light bounces rays should travel before being terminated.

Samples Per Pixel

Sets the number of samples used per pixel for convergence. A higher number of samples reduces noise of the rendered image.

Filter Width

Sets anti-aliasing filter width to improve output quality. Lower values yield sharper (more aliased) results, while larger values yield softer (blurier) results.

Emissive Materials

Enables bounce lighting for emissive materials. Enabling this property prevents double-counting illumination of surfaces that are also represented by actual light sources, and noise from small emitters. For example, having an emissive material representing a small light bulb while also using a point or spot light source to illuminate the area would be double-counted in this case.

Max Path Exposure

Sets the maximum exposure allowed for path tracing in order to reduce firefly artifacts from occurring. Adjusting the exposure to a higher value than the scene's exposure helps mitigate these artifacts. (See Additional Information section of this page for more details and an example of this type of artifact).

Denoiser

This toggle uses the currently loaded denoiser plugin on the last sample to remove noise from the rendered output. By default, Intel's Open Image Denoiser plugin is used by the Unreal Engine. This toggle has no effect on the rendered output if the denoiser plugin is not enabled.

Path-traced Renders Using Movie Render Queue

This section goes into details about using the Movie Render Queue to generate a path-traced rendered output. For general usage and workflow information, see Movie Render Queue before proceeding.

The Movie Render Queue (or MRQ) is useful for production pipelines when producing high-quality rendered outputs. When combined with the Path Tracer, it allows for substantially higher quality renders than could be achieved otherwise.

The Path Tracer module enables the Path Tracer to be used to output rendered frames and it provides some settings specific to its rendering path.

Movie Render Queue Path Tracer Module Settings

Post Process Volumes placed in the Level also control specific path tracing functionality, such as the maximum number of ray bounces, support for emissive materials, and exposure.

Path Tracer Post Process Volume Settings

MRQ also contains other settings modules that provide additional controls and options for achieving higher-quality renders.

  • The High Resolution module provides settings to render frames as separate tiles that can be combined to render higher single frame resolutions than would otherwise be possible. Individual tiles can use up to the largest resolution supported by your graphics card (for example, 7680x4320 for RTX 3080 cards).

  • The Anti-aliasing module provides specific settings to adjust the sample counts per pixel and for better motion blur quality. This module provides warm-up times that can be required for level-loading and visual effects to render the scene accurately.

    • Temporal Sample Count interpolates several rendered frames at slightly offset instances in time, improving motion blur quality. This accumulation of samples happens after denoising occurs, helping stabilize residual artifacts from individual spatial passes.

    • Spatial Sample Count sets the number of samples per pixel to use per frame. Increasing the samples per pixel, decreases noise present in each render pass while increasing the time needed to render each frame. The Post Process Volume samples per pixel setting has no effect over this setting for the MRQ output.

    • The total number of samples taken per pixel is the product of the spatial and temporal sample counts. Spreading the samples across both spatial and temporal can produce better results in some cases. For example, if you want to use 16 samples per pixel, you could apply 4 samples to spatial and 4 to temporal, or 16 to spatial and 1 to temporal.

  • The Console Variables module enables you to add any console variables that are relevant to your rendered frames. This includes overrides for quality, or toggling of some settings that would be relevant to the Path Tracer.

  • The Output module provides settings to configure the output directory, file name, image resolution, and the start / end frames you want to render.

Additional Information

The Path Tracing mode works differently than some other rendering methods within Unreal Engine. This means that something that works well for real-time rendering may not work best for path-traced rendering. The following sections describe some of these inconsistencies and common issues as well as the steps you can take to improve your results with the Path Tracer.

Reducing Firefly Artifacts

The Path Tracer simulates light by randomly tracing rays according to material properties. When bright areas of the scene have a low probability of being discovered, the resulting samples can become excessively bright, creating specs of light (or fireflies) that appear and disappear within the frame. Path tracing attempts to minimize the most common sources of these effects, but they can still occur in some scenarios.

path tracer firefly artifacts

When the path-traced result is combined with bloom post processing passes, the resulting pixels can be particularly noticeable because of how they appear and disappear, or become brighter and dimmer.

The Post Process Setting Max Exposure Path controls the maximum exposure used in the rendered path-traced scene. Adjusting the exposure to be a few steps higher than the current scene exposure, set by the Post Process Max EV100 (found under the Lens > Exposure section), will reduce the chance of fireflies occurring.

Denoising

Even with high sample counts, the path tracer will always have a bit of residual noise in the rendered frame. The denoising option in the Post Processing Volume settings makes use of Intel's Open Image Denoise library to remove noise from the last sample.

The denoiser runs on the CPU and is not currently designed for interactive denoising, but rather to help improve the quality of long-running frames. It does not currently guarantee temporal consistency, and relatively high samples per pixel are required for stable output. Temporal stability can also be improved by increasing the Temporal Sample Count in the Anti-aliasing settings module when using Movie Render Queue.

Denoised Image

No Denoising Applied

Skylighting with the Path Tracer

Skylighting is handled in two ways: using a traditional skybox with an applied sky material, or using the Real Time Capture mode of the Sky Light to capture the sky, atmosphere, and clouds in the scene.

skyboxmesh.png

VolClouds.png

Skybox Mesh

Sky Light Real Time Capture

Using a skybox to represent the sky requires a couple of things to be set up on the mesh and in the material for it to work well with the Path Tracer. First, the sky material must have the flag Is Sky enabled in the Material's Details panel settings. This ensures that the illumination of the skybox material won't be counted twice when the Sky Light is present in the scene. It also potentially reduces the amount of noise that can occur if the skybox were to in fact be counted twice.

Material setting Is Sky flag

In the Level, select the skybox Actor and use the Details panel to disable Cast Shadows to prevent the mesh from occluding contributions from the Sky Light and Directional Light in the scene.

Disable Shadows on SkyBox Mesh

Alternatively, lighting contributions from the Sky Atmosphere and Volumetric Clouds systems can be captured by enabling Real Time Capture mode on the Sky Light. Because of this limitation for capturing skyboxes, Sky Atmosphere, and Volumetric Clouds for skylighting representation, their resolutions are dependent on the Sky Light Cubemap Resolution .

VolClouds_128Res.png

VolClouds_512Res.png

Sky Light Cubemap Resolution: 128 (Default)

Sky Light Cubemap Resolution: 512

Areas below the horizon line appear black unless you enable Lower Hemisphere Is Solid Color and set a Lower Hemisphere Color .

lower hemisphere color default and with a set color

Default Lower Hemisphere Color and with a set color.

Direct Visibility of Light Sources

Non-punctual light sources — such as Point Lights with a source radius, Rect Lights, and Sky Lights — are not visible to direct camera rays by default. The exception to this is Sky Lights with Real Time Capture enabled.

Skylighting paired with skybox geometry and static, or specified, cubemaps are not typically seen by camera rays. This can be modified by setting the console variable r.PathTracing.VisibleLights 1 .

All light sources are visible in reflections and refractions regardless of if the visible lights console variable is enabled. This ensures that they are seen by all possible ray paths. However, in some cases, this might cause unexpected behavior. For example, a Rect Light placed directly behind a glass window will be visible and will block the view through the window, which is only the case for true refraction, when the index of refraction is not equal to 1.

Glass Rendering with the Path Tracer

There are two methods of rendering glass with specified thickness with the Path Tracer: by using a few values which provide a physically accurate look based on the physical properties of the surface, or by using additional properties which allow for more control over art direction but are less physically correct. Both of these methods are acceptable and valid for use with the Path Tracer to achieve high-quality results with glass-like materials.

Achieving physically accurate results only requires a few values and parameters to be set in the material, like this example below:

Click image for full size.

In situations where more control is needed over the art direction, adjusting the Base Color can tint the glass reflection (but not the shadows), and a Fresnel plugged into the Opacity input allows the reflection falloff to be controlled more closely.

Click image for full size.

Approximate Caustics

The Path Tracer uses approximate caustic paths to help reduce noise, especially in cases where a glass or metal surface has lower roughness values. For these types of materials, the reflective caustics can produce various patterns and can take up an impractical amount of time, or samples, to converge for a noise-free image.

For example, these images were taken sequentially during the rendering and sample accumulation process with the final image being the finished and denoised result.

Click image for full size.

Because caustics generally take a long time to converge to a noise-free result, the Path Tracer reduces image noise by approximating the caustics that would be present in the image using the console command r.PathTracing.ApproximateCaustics 1 . This variable is enabled by default.

Approximate Caustics: Enabled

Approximate Caustics: Disabled

Another element to consider is the difference between refractive caustics and approximate casustics. By using the denoiser, it is possible to preview how the caustics would appear given enough time to converge, whereas the approximate caustics gives a production-ready image in much shorter time.

Refractive Caustics | Approximate Caustics: Enabled (w:900)

Refractive Caustics | Approximate Caustics: Disabled (w:900)

Thin Translucency Shading Model

The Thin Translucency shading model is useful for achieving physically accurate results with appropriately colored translucent shadowing for thick glass with approximate caustics.

Click image for full size.

One thing to be aware of is that each interface is treated as a unique pane of glass, which means that refraction is not calculated by the shader and the object will look more like a bubble than solid geometry.

Standard Glass Material

Thin Translucent Glass Material

Click image for full size view.

Click image for full size view.

Rough Light Transmission and Reflections

The Path Tracer is unique in that it allows for the rendering of rough transmission in addition to rough reflection — and in the case of the Path Tracer, these shader parameters are coupled together.

In the examples below, the roughness value of the glass material varies to demonstrate the approximate caustics, roughness of the reflection, and the effect it has on the translucent shadow being cast.

Drag the slider to see the glass material change from no roughness to some roughness. Roughness values are from 0 to 0.2

Useful Console Variables

The following are some useful console variables to have enabled when using the Path Tracer.

Console Variable

Description

r.PathTracing.VisibleLights

Makes all lights visible to camera rays. This is disabled by default to match the raster-based modes of the engine, but it can be useful to understand how lights are modeled and to spot cases where lights are overlapping.

r.PathTracing.ProgressDisplay

This adds a small progress bar to the view that displays progress toward the configured samples per pixel. The progress bar will automatically be hidden when accumulation is completed. It does not affect renders with Movie Render Queue and is safe to have on.

r.PathTracing.Denoiser

This option can be used to quickly toggle the denoiser on and off (assuming the current sample accumulation is complete). Unlike the Post Process Volume setting, changing this will not cause accumulation to restart and can be useful for quickly comparing the rendered frame with and without denoising enabled.

Supported Features of the Path Tracer

The limitations of the Path Tracer are either limitations of the current implementation or features that aren't planned for support. This list of features intends to give you an idea of what is currently supported with this current release. It is not a comprehensive list of all supported features / properties of the engine.

The Path Tracer shares the same code used with Real-Time Ray Tracing features of Unreal Engine. In general, if a feature is supported by real-time ray tracing then it should be supported by the Path Tracer.

Feature Name

Supported?

Additional Notes

Geometry Types

Skinned Meshes

Yes

Animations do not invalidate the path tracer, which can cause blurring, or streaking, to be visible in the viewport. Movie Render Queue should be used to output final images.

World Position Offset-driven Animation

Yes

Evaluate World Position Offset should be enabled on individual scene Actors. They do not invalidate the Path Tracer, which can cause blurring, or streaking, to be visible in the viewport. Movie Render Queue should be used to output final images.

Hair

Partially

  • Hair cards and helmet meshes are currently supported in Unreal Engine 4.

  • Experimental support for hair strands is coming in Unreal Engine 5.0.

Landscape

Yes

Spline Meshes

No

Instanced Static Mesh

Yes

Hierarchical Instanced Static Mesh

Yes

Visual Effects

Niagara Particle Systems

Yes

Particle systems do not invalidate the Path Tracer, causing blur / streaking to be visible in the viewport. Movie Render Queue should be used to output final images.

Cascade Particle Systems

No

Light Types

Directional Light

Yes

Sky Light

Yes

  • Currently Sky Light capture is only visible when Real Time Capture is enabled.

    • Sky Atmosphere and Volumetric Clouds aren't yet supported.

    • To improve render quality, increase the resolution of the Sky Light capture to be higher than used for real-time capture.

  • When not using Real Time Capture mode, a sky box / sphere is expected to have sky representation. Its material must have the flag Is Sky enabled in the material's settings, otherwise its illumination will be double-counted against the skylighting — and is likely to produce noise since it won't be importance sampled.

  • Sky box / sphere shapes should also not cast shadows because they can occlude contributions from the Sky Light and Directional Light.

  • Enable Lower Hemisphere Is Solid Color and set a Lower Hemisphere Color to have color applied with the Path Tracer below the horizon line. Otherwise, it will appear black by default.

Point Light

Yes

Spot Light

Yes

Rect Light

Yes

Lighting Features/Properties

Emissive Materials

Yes

Emissive parts that are small can introduce a lot of noise to the rendered scene. They can also cause double-counted lighting if the emissive parts have a light associated with them. Use the Emissive Materials checkbox in the Post Process Volume settings to disable them, or use the console variable r.PathTracing.EnableEmissive 0 .

Sky Atmosphere

Partially

Requires a Sky Light in the scene which has Real Time Capture enabled.

Volumetric Clouds

Partially

Requires a Sky Light in the scene which has Real Time Capture enabled.

Exponential Height Fog

No

Planned for a future engine release.

Volumetric Fog

No

Planned for a future engine release.

IES Profiles

Yes

Light Functions

No

Post Processing

Depth of Field

Partially

Translucent materials are not yet supported.

Motion Blur

Partially

Only supported with rendered frames from Movie Render Queue.

Material Shading Models

Unlit

Yes

Default Lit

Yes

Subsurface

Yes

Preintegrated Skin

Yes

Renders identically to the subsurface shading model.

Clear Coat

Yes

Subsurface Profile

Yes

Requires a subsurface profile with Burley subsurface scattering enabled.

Two Sided Foliage

Yes

Hair

No

Cloth

Yes

Eye

No

SingleLayerWater

No

Thin Translucent

Yes

From Material Expression

Yes

Material Features

Colored Shadows

Yes

Requires the material to have Thin Translucent Material Shading Model set.

Translucent Shadows

Yes

Refraction

Yes

Decals

No

Anisotropy

Yes

System Support

Multiple GPU

No

Sequencer Movie Render Queue

Yes

Orthographic Camera

Partially

Does not currently support output through Movie Render Queue.

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