Tone Mapping in Unreal Engine
Updated: Dec 18, 2024
You can use certain tone mapping effects in Unreal Engine on Meta Quest without incurring the traditional performance cost associated with tone mapping. The Meta Quest integration can render tone mapping with as little as 600 microseconds of additional render time because it uses Vulkan subpasses instead of Unreal Engine’s Mobile HDR mode or an additional render pass. This feature is only available in the
Oculus-VR fork of UE using Vulkan.
The Vulkan Tonemap Subpass supports the following post process effects:
- Color Grading (includes LUT)
- Filmic Tonemapping
- Vignette
The Graphics Showcase example demonstrates these common tone mapping effects:
- Fade In / Fade Out
- Color Tint Day-Night Cycle
- Color Grading LUT
- Vignette
The Graphics Showcase sample app is available on:
Enabling Subpasses for Tone Mapping
To enable the Vulkan subpasses for tone mapping, set r.Mobile.TonemapSubpass=1.
To disable the Vulkan subpasses to regain performance when tone mapping is not needed, set r.Mobile.TonemapSubpass=0.
You can implement specific tone mapping effects by changing values in the Post Process Volume properties and the Level Sequence. Specifically, we’ve implemented Vulkan subpass support for:
- Fade tracks in the Level Sequence
- Scene Color Tint in the Post Process Volume properties
- Color Grading LUT in the Post Process Volume properties
- Vignettes in the Post Process Volume properties
You can implement fade in and fade out effects by adding a Fade track to the Level Sequence and defining key points on the Fade track. A fade value of 1.0 is fully opaque black and 0.0 is fully transparent.
To implement a fade:
From the main toolbar, click Cinematics > Add Level Sequence.
In the Sequencer, click + Track, and then select Fade Track.
Select the Fade track, and click o to add keyframes.
You can add a color tint or tone by adding a Post Process Volume and changing the Scene Color Tint properties of the volume.
To add a basic color tint:
Add a Post Process Volume actor to your level.
Go to Post Process Volume Settings properties, and then select Enabled and Infinite Extent (Unbound).
Set the Color Grading|Misc > Scene Color Tint properties to the color tint you want.
You can animate a day and night cycle by using the sequencer to gradually change the color tint of the Post Process Volume over time. For example, you can make the Scene Color Tint gradually change from blue at night, to red at dawn to neutral white by day.
To create a sequence of Scene Color Tint property changes:
From the main toolbar, click Cinematics > Add Level Sequence.
In the Sequencer, click + Track > Actor to Sequencer and then select your post process volume. Your post process volume is added to the sequencer.
In the post process volume added to the sequencer, click + Track > Settings > Color Grading|Misc > Scene Color Tint. The scene color tint setting is added to the sequencer.
Expand Scene Color Tint (Settings), and then click o to add keyframes where you want them.
To apply a color grading LUT:
Add a LUT texture to your project.
Add a Post Process Volume actor to your level.
Go to Post Process Volume Settings properties, and then select Enabled and Infinite Extent (Unbound).
Go to Post Process Volume > Color Grading properties.
Select Color Grading LUT and then select the LUT texture you want to apply from the list.
You can apply an oval vignette by way of the Lens Image Effects properties of a Post Process Volume.
To add a basic vignette:
Add a Post Process Volume actor to your level.
Go to Lens > Image Effects properties, and then select and set Vignette Intensity.
If the effect is not visible, make sure:
- you selected Post Process Volume Settings > Enabled.
- the camera is within the bounds of the Post Process Volume or that you selected Post Process Volume Settings > Infinite Extent (Unbound).