How to Achieve Cinematic Quality With Post-Process Effects in Unreal Engine 4
This post is based on the “Achieving cinematic quality with post-process effects in Unreal Engine 4” webinar by Matthew Doyle from Epic Games.
For your convenience, here’s the Table of Contents.
First, let’s have a look at a simple video that demonstrates quite a few post-processing effects layered on top of one another.
In the video, you can see some vignetting, lens flares, light bloom, color grading, exposure controls, and some other effects. We’ll take a look at all of them, including ray tracing.
As the name suggests, post-processing is the last step in rendering a single frame inside UE4. Post-process effects (I’ll call them PPFX for short) are generally in screen space, meaning they affect everything that you see on the screen. They can be tied either to a camera or to a volume.
You can add multiple volumes to your scene, and each of them can have unique settings. Volumes can overlap, and you can set their priority. They can be either bound or unbound. Unbound means that they affect the whole scene, while with bounds volumes you will have to be inside it to see the effects.
For comparison, here’s what the scene looks like with PPFX set up and enabled and without them:
To put a post-processing volume in the scene, find it in the Modes panel, under Visual Effects or Volumes sections. Or simply search for “post”. Then drag it into the scene. To make it affect the whole scene, look for the “Infinite Extent (Unbound)” checkbox in the Details panel.
The first section of the settings is called “Lens”. There are several sub-sections there. We won’t touch upon the Depth of Field, because it’s best controlled from the cameras, not PPFX.
Let’s start with Bloom. To clearly see the effect, find a bright object in your scene, such as the sun. There are two bloom methods: Standard and Convolution. Standard one is best used for real-time situations, like gameplay. Bear in mind that while Convolution gives a cinematic quality bloom in Unreal Engine, it is best used in cinematics as it is too expensive for games.
You can control the brightness of the bloom with the Intensity parameter. Threshold sets how bright a pixel needs to be to emit bloom. Advanced settings let you fine-tune both Standard and Convolution blooms.
By default, UE uses Auto Exposure Histogram as the Metering Mode. It allows for the “eye adaptation” effect, where you can go into the darker section of your scene and it will become brighter over time.
If you want to lock auto-exposure to a certain value, you can set both Min and Max Brightness to 1, for example.
Unreal comes with a histogram visualization tool. Just select Show -> Visualize -> HDR (Eye Adaptation):
The blue values represent the darker parts of the scene, green — mid-tones, and red — highlights. You can see our current exposure value with the white line, and the blue line (behind it on the screenshot above) is the exposure target. If you reset the min/max values, you will see how the white line goes to the blue target as you move your camera around. You can set the speed at which the current exposure value moves towards the target (whether left or right) by changing the Speed Up and Speed Down parameters.
Of course, you might want to select the Manual Metering Mode. If you select that, you will notice that the entire scene is now very dark. You will need to do three things:
- Camera settings (the section in Post-Processing Volume Lens settings). Set Shutter Speed to 100, ISO to 100 and Aperture to 15 for a typical sunny day.
- Lights. Select the Directional Light and set the intensity to something more realistic, like 82000 lux for sunlight.
- Rebake the lightmaps to see the results of any indirect lighting.
This is useful if you want to reflect specific real-world photography settings inside Unreal.
The options for this setting are pretty self-explanatory. Intensity controls how much RGB values are separated, and the Start Offset controls how far from the edge of the screen the effect starts. I suggest avoid using high Intensity values, but adding chromatic aberration nonetheless as it gives your Unreal Engine project less computer-generated and more cinematic quality look.
Dirt Mask is essentially a texture that allows us to simulate the dirty camera lens. Even if you put a texture in there and set the Intensity to the maximum 8, you might not notice the difference. This is because it works best with a strong bloom and lens flares.
With Intensity, we can control how bright our lens flare is. BokehSize allows us to control how large the bokehs are. The Threshold here is similar to bloom, controlling how bright a pixel must be to emit a lens flare. And if you expand the Tints section, you can control the tint of each individual Bokeh.
If you put your camera in a certain position, you can see the noise coming from the lens dirt texture:
There are currently two image effects in Unreal: Vignette and Grain. For Vignette, only the Intensity parameter is available.
Grain Jitter and Grain Intensity allows us to add film grain and control its amount.
When you do color correction, be sure to follow this workflow to get the best results:
Filmic tone mapper inside Unreal uses ACES — an industry standard for film and TV. You should use it for a project-wide look. So once you’ve set it, you shouldn’t change it again.
The tone mapper is essentially an S‑curve, which you can see on the screen above. There are several parts to it that you can tweak. Slope controls the overall shape of the S‑curve, the Toe controls the darks and the Shoulder controls the brights. Black and White clips are used to control the maximum darkness and maximum brightness respectively.
When working with the filmic tone mapper, it’s usually a good idea to work with all three of thee parameters, leaving black and white clips at their defaults.
Controlling the Slope controls the overall contrast of the image. To work with the Toe you’d want to find a dark area of your scene, and while looking at it you can adjust the parameter to lighten it up. But it’s best to use small values, as higher will get a more washed-out look. The same goes for the shoulder, but in this case, you’ll need to find a bright area.
In this section, you have two parameters: Temperature and Tint. Tint allows you to apply a global HUE shift to the entire scene. Generally, this value should be left untouched, unless you’re going for a very specific tint of your scene.
For temperature, the best workflow is to find a very white object in your scene and adjust the temperature so it looks white. Of course, you can tweak the value to get warmer or cooler effects.
Global, Shadows / Midtones / Highlights
Generally, you’d want to start with the Global settings and tweak them. After you’ve set everything to your liking but still feel you want to change some parts of your image, like Shadows, for example, you can go down to these sections and tweak the parameters there.
Each of these sections contains almost the same set of settings.
If you expand this section, you will see a color wheel with an Intensity slider under it that controls all three channels, and to the right — individual sliders for each of the color channels, plus the luminance slider. The latter controls the overall intensity of the effect without adjusting the color channels’ values. You can also switch to HSV values instead of RGB.
The Contrast color wheel works in the complementary fashion. If you make your highlights red-ish, adjusting the value of the color wheel, your shadows will become blue-ish because they’re on the opposite side of the color wheel.
The Gamma controls our mid-tones. Adjusting this setting has the largest effect on the overall color tone of the scene. The Gain controls the Highlights and the Offset — shadows.
The first sub-section here is the Post-Process Materials. You can see the effect they create, for example, in this article.
Ambient Cubemap is used to tweak the overall ambient lighting. Simply select the Cubemap Texture, adjust its Intensity and you’re set.
The next sub-section is Ambient Occlusion. To see it clearly you can visualize it. Switch the View Mode to Buffer Visualization -> Ambient Occlusion.
In its basic parameters, you can control its Intensity and Radius. The latter controls how soft or sharp the AO appears.
You also have the option to enable Ray Tracing Ambient Occlusion and set its Samples Per Pixel, making it more accurate. The settings from the Ambient Occlusion sub-section will still apply if you enable RTAO.
The next sub-sections are Global Illumination along with Ray Tracing Global Illumination. It controls the Global Illumination contribution in the scene. By tweaking the Indirect Lighting Intensity, you can lower or boost the amount of indirect lighting contribution. To control the quality of our GI, we can tweak the Max. Bounces and Samples Per Pixel parameters.
For reflections, you have three sub-sections with pretty self-explanatory names: Reflections, Screen Space Reflections, and Ray Tracing Reflections. In Reflections, you can choose the type of reflections you want to use and in the corresponding sections, you can set the parameters for the reflections type you chose.
Screen Space Reflections can work well in some cases, but they don’t work that great in others. With them, only the objects that are in the viewport are getting reflected. So if we were to be to change the reflection type, here’s what you’ll see instead of the image above:
It’s all because here, of all the objects that are “visible” in the mirror, only the character is in the viewport, and only partially. So the ray-traced reflections give a more cinematic quality in Unreal Engine but are very expensive.
Just as with the reflections, there are two types of translucency. The default one is Raster and the second is Ray Traced. Of course, the second one looks much better but is also very expensive.
That’ll be it for this article. I tried giving as much information in as little volume as possible. I hope it saves you some time and allows you to achieve a cinematic quality using post-processing effects in Unreal Engine 4!