Cinematic Post Processing Tips & Tricks in UE4: Part 1

Tutorial / 10 April 2021

Cinematic Post Processing Tips & Tricks in UE4: Part 1



Hi all, for the last year or so I have been refining my workflow for rendering from Sequencer and Movie Render Queue to produce the most visually appealing screenshot and video renders possible. I have tried many methods to achieve certain effects, and some worked while others did not. I will be going over my findings and how to achieve everything, as well as alternatives!

When making a project, especially something that will have shots in Sequencer, I try to use CineCameraActors. These cameras have a broad array of adjustments you can make to emulate cinema cameras, or even DSLRs if you really wanted to. I am a huge fan of watching and making films, so I have developed preferences over time of what camera/lens setups I prefer for a given mood or feel of a project. 

Now as a disclaimer, none of this is physically accurate in any way and this is purely to get a similar “look” to cinema cameras. All of this is crafted to my own personal preference and none of it are rules in any way!


SENSOR SIZES/ASPECT RATIOS

My default setup is emulating 35mm film in a cinema camera. This is an analog camera, rather than a digital one but i’ll get into that later. What I mean by 35mm is the size of film used in the camera. When film is exposed onto the negative, the negative ends up being a certain size. 35mm ends up being 24mm x 36mm, like this image:


Now to make it even more confusing, since Unreal Engine is a digital medium, not analog, we need to translate that to sensor size in our camera settings. Luckily, it translates over perfectly because digital sensors are around the same size as 35mm film. This means a 24mm x 36mm sensor size would be what we put into the sensor width and height.

There are tons of options for aspect ratio, and it all comes down to preference. Here is a diagram of different common aspect ratios and sensor sizes as well, hope you find it useful and feel free to research what cameras and sensor sizes your favorite films use!

Source: https://neiloseman.com/aspect-ratio/


Source: https://vmi.tv/blog/learn-help/guide-to-sensor-sizes-and-lens-formats/


Also, here is a handy website I use often to figure out exact resolutions for what my targeted aspect ratio would be.

Personally, I always go for a widescreen presentation with my projects, meaning I use either a 2.35:1 or 2.39:1 aspect ratio. 


A few films that use 2.35:1 aspect ratio are:

Blade Runner (1982 Dir. Ridley Scott)


Ex Machina (2014 Dir. Alex Garland)


As you can see, even just the aspect ratio can really add a cinematic element to your work!

These stills were taken from Shotdeck, it’s an amazing website you should check out!

Also here are a few more resources about cinematography and shots from films:

https://film-grab.com/

https://moviesincolor.com/


For this demonstration, we are going with a 2.39:1 aspect ratio, which means that we need to do some basic math! (I hate math)

So, if we think of it like this: 24mm is height, and 36mm is length (this is the size of a 35mm negative)

In terms of aspect ratio the height would be 1, and the length is 2.39, then we can assume that:


Now for the math: Since we want to preserve the horizontal width of the negative as that is something that doesn’t change with 35mm cameras, we will be doing this:

Width: 36mm (this does not change)
Height: 36/2.39 = 15.06mm height

Here it is plugged into the CineCameraActor.

Close enough!

And there we go! Now that you have the sensor size set, we are moving on to what lens sizes I choose and why.


LENSES

For lenses, I choose to emulate cinema lenses, whether that be spherical or anamorphic lenses. (More on anamorphic lenses later).

This usually means that they are prime lenses, or lenses that have one focal length that doesn’t change. My usual “kit” I go with is:

  • 14mm f/2.8
  • 25mm f/2.8
  • 35mm f/1.4 
  • 50mm f/1.2
  • 85mm f/1.4

These aperture values are meant to be in the ballpark of what actual aperture values you would get for how wide a lens is and are not physically accurate in any way.

Having this digital “kit” of lenses limits me in a way where I get a consistent look throughout my cinematics and environment screenshots. They all feel like they belong together being all from the same kit.

You can change the focal lengths and aperture values here in the CineCameraActor:


Small thing to note about these cameras, the default min aperture is 1.4, and you can override this here:


I set mine to .1 (which doesn’t exist in real life) because it can lead to some interesting beautiful bokeh opportunities!

Now that I have my kit of lenses, I then build my environment as having a focal length in mind from the beginning helps me get a better feel for the scale of a space and what camera shots I plan to make for the cinematic.


FILM GRAIN

Since I almost always try to emulate 35mm film for my projects, that usually means I need a method to add organic grain to my renders. I have tested multiple solutions to this, with varied results, and here are my findings.

The best method I have come across is a bit of a cheat, and is only useful if you plan on doing any color grading or editing with your exported video from Unreal. My favorite and most effective workflow so far involves color grading in Premiere Pro and adding grain in Premier as well, which brings us to the best method I have found for realistic grain in renders:

FilmConvert Nitrate (Premiere Pro, Davinci Resolve)

This is a plugin for video editing applications that is not cheap - coming in at $139 for the Premiere Pro version I bought.

I am aware this post was meant to be for Cinematics in Unreal Engine, but Post production is something even renders from UE4 need.

This plugin lets you choose between several film stocks, and has a large amount of customizability to how you want your grain to look and behave with shadows, midtones and highlights of an image.


Next option is also a paid post process option that is applied in editing software, but is much much cheaper at $59 and yields great results regardless:

Ezra Cohen’s 35MM film grain overlays in 4k

https://ezracohen.tv/collections/002-texture-color/products/35mm?variant=32340026556509

The version I have is 4k and I feel that is very future proof as I will not be likely to go above 4k in the foreseeable future.

These are overlays that you place over your footage and add grain over top of them. You have much less control but the results look great.


Next up, we have three methods for in-engine grain, two of which does not work with rendering multiple samples in Movie Render Queue and the other that does.


Custom Film Grain Post Process Material - Brian Leleux

Brian was kind enough to show how he made a Post Process Material that uses two tiling noise textures, which can produce some incredible results. This material also includes debug modes to show your highlight and shadow ranges, as well as grain size and if it is color grain or grayscale. Amazing! 

This is what the material looks like.

The only thing you need to find yourself is a 2k or 4k tiling grain texture to input into the material. I ended up using one of the Ezra Cohen grain textures cropped to be square.

Upsides: Looks really good and has a lot of highlight and shadow controls.

Downsides: It doesn’t render in Movie Render Queue with multisampling. Since this material constantly pans the grain around, the grain ends up getting lost when you use any more than 8 samples with no AA in your MRQ settings. This means it would be good for some things, but is not a complete solution.

You can find Brian's portfolio here: https://www.artstation.com/brianleleux


Quixel’s Grain Post Process Material

Another method very similar to Brian’s but a bit different is  a method used in Quixel's Rebirth short film, which you can watch here.

Since there is already a tutorial on this, I will just link it with timestamp here:

Quixel Rebirth Film Grain Method

Upsides: Looks great and is customizable

Dowsides: (hasn’t been tested, but will probably not render in MRQ just like Brian Leleux’s grain material)


UE4 Default Post Process Volume Grain

And then finally, there is the tried and true method of using UE4’s built in grain method in the PPV. This works very poorly in my opinion, but at least it renders in MRQ which makes it useful at least.


And finally, here are all of the different film grains side by side!


And that is it! Hope you learned something from this first blog post! Due to the 20,000 character limit on AS Blog posts, I have to cut this off here.

There is a part two you can find on my Artstation Blog as well, I will be posting both at the same time.


Knight Model by The Royal Armoury (Livrustkammaren) on Sketchfab found here:
https://sketchfab.com/3d-models/the-parade-armour-of-king-erik-xiv-of-sweden-bd189bba7d9e4924b12826a6d68200d9


As a bonus, here are some resources for learning more Cinematic techniques in UE4:

Quixel Youtube Channel - Environment Art, Cinematics, and Asset Texturing info

CinematographyDB - Virtual production in UE4, cinematography and more, run by Matt Workman


And most importantly, check out EXP Points! It's a great Discord community that I have learned tons from in the last few years.


Part 2

Cinematic Post Processing Tips & Tricks in UE4: Part 2

Tutorial / 10 April 2021

 Cinematic Post Processing Tips & Tricks in UE4: Part 2



Please be sure to read Part 1 of the blog post, found here.

VIGNETTING

Vignettes are a staple for achieving a believable cinematic look, and luckily there are several options to choose from.

First option is a custom Post Process Material I created to have more control over opacity and softness of vignettes in engine.


Custom Vignette Post Process Material

Here is what the Material looks like:

You have hardness, center, and opacity adjustments built in and I have gotten some good results with it so far! (if you don't push the values too far)


And we have the tried and true method. Post Process Volume vignette:

Post Process Volume Vignette

This is a solid method that yields good results, even if you have very little customizability, no need to cover this fully because it has plenty of documentation elsewhere.

It can be found here in either your Camera properties or your post process volume settings:


BARREL DISTORTION

Barrel Distortion Post Process Material

A staple for anamorphic emulation, barrel distortion gives your lenses a much more organic look that I personally adore. There is only one method inside of UE4 that I have discovered, which can be done through yet again a Post Process Material:

Here are what controls this material gives you:


BLOOM

Now for cinematic bloom that is not the default PPV bloom, we have two options.

Anamorphic Bloom

To add anamorphic bloom to your image, similar to what you would see using an anamorphic lens, all you need to do is type in this CVAR in your console. You do have to do this every session which can get annoying. This method was shown on a blog here, by Fabrice Piquet.

The CVAR that worked best for me was:

r.Bloom.Cross -1

Here is before the CVAR was in effect:

And after:

And here is how it reacts in motion:


Now, the other method of using bloom to make a frame more cinematic is to emulate film halation. While this is not technically a form of bloom it actually had to replace it entirely which is a drawback for sure, It uses the bloom controls in the Post Process Volume.


Film Halation

Without getting into it too far, film halation is a red glow around contrast points of a film negative that happens due to specific coatings of a negative.

You can learn about why it happens here:

https://prodigium-pictures.com/wp/insight09_halation-on-film-digitally-imitating-it/

Anyway, I like to emulate it sometimes in UE4, and it is remarkably easy to do.

All you need to do is open your PPV bloom settings, change every color to red but at the same brightness, and tweak your cutoff point.

This can produce really satisfying halation to your image if you are not in need of traditional PPV bloom for your shots.

Halation off:

Halation on:

I made it more obvious than I normally make it, but you can fully customize it to get your desired look. 


CAMERA SHAKE

Camera Shake BP Layering Method

Another cinematic factor that a lot of digital artists do not utilize in UE4 is realistic camera shake.

UE4’s camera shake BPs are hard to use, but can yield good results if you think of them modularly. What I mean is that in Sequencer in a shot, you can actually layer them over each other to create much more random and lifelike camera shake.

I like to break down each shot’s camera shake like this: Keep in mind these are exaggerated to be more clear.

  • Base - Slow but large camera shake, almost like being on a boat.


  • Mid - Regular speed camera shake, at different frequency to the base.


  • Top - Micro jitters quick but very subtle camera jitters that emulate a persons hand shaking and any other bumps that would occur while moving a camera through a scene.


Camera Animation Camera Shake

One downfall of the previous Cam Shake method is that it is a repeating noise that does not differ from the set values. This means that it can appear repetitive and "tiling" for lack of a better word. A way to solve this is to use a camera animation in sequencer instead, or even in combination with the previous method. I bought this pack recently on the Unreal Markeplace and it is a life saver! It includes specific camera movements like pans, tilts, trucks, and just general stationary camera shakes. You can even animate the transform of your camera on top of this to create any camera movement you can think of.

The pack is called Cinemotion 2 Camera Anim pack, and you can find it here for $25.

Here's what a general stationary camera shake looks like:


ANAMORPHIC DEPTH OF FIELD

Now for a big one that was recently able to be done, anamorphic bokeh!

I would explain how to do this but the wonderful William Faucher has already explained this process in great detail on how to achieve this effect in UE4.

Here are the two tutorials:

Tut 1

Tut 2

To show you the difference this can make for making something cinematic in Unreal, here is without:

And using this method:

  

ANAMORPHIC EDGE FRINGING POST PROCESS MATERIAL

And finally, one of the most subtle but transformative Post Process Materials I choose to use to support the Anamorphic bokeh previously described. I recommend only using this if you use the Anamorphic Bokeh trick directly above this as this fringing only happens with Anamorphic lenses.

For my guide I chose to emulate it to look similar to these screenshots of films:

Annihilation (2018 Dir. Alex Garland)

The Darjeeling Limited (2007 Dir. Wes Anderson)

Notice the upper and lower edges blurring. That is what I am trying to replicate here.

The material I came up with adds a subtle but good looking imperfection to your footage if you want it to look anamorphic and more organic. Here is an example of the effect on or off.

With edge fringing:

Without edge fringing:

Here is how I made it:

Inside of the custom node:

And the code inside:

const float2 ScreenMult = View.ViewSizeAndInvSize.xy *
View.BufferSizeAndInvSize.zw;

const int TexIndex = 14;
const float Samples[11] =
{-0.08,-0.05,-0.03,-0.02,-0.01,0,0.01,0.02,0.03,0.05,0.08};

float2 dir = float2(0.5,0.5) - ScreenUV.y;
BlurDist = pow(BlurDist, BlurPow);
BlurDist *= BlurSize;
float4 sum = float4(0.0, 0.0, 0.0, 0.0);
for(int i = 0; i<11; i++)
{
float2 pos = ScreenUV + dir * Samples[i] * BlurDist;    pos = clamp(pos, float2(0.0,0.0), float2(1.0, 1.0));    sum += SceneTextureLookup(pos * ScreenMult, TexIndex, false);
}

return sum / 11.

And here is what my instance settings are:

And that's it! I tried to include as much as I could to help others in these posts. Please let me know if there are other techniques worth trying as I am always trying to learn more!


If you want an extra tip - try using this handy Plugin by Ryan Jones that creates color scopes inside engine!

Link here: https://github.com/Polyrhythm/UE4_AdvancedMonitor


Knight Model by The Royal Armoury (Livrustkammaren) on Sketchfab found here:
https://sketchfab.com/3d-models/the-parade-armour-of-king-erik-xiv-of-sweden-bd189bba7d9e4924b12826a6d68200d9


As a bonus, here are some resources for learning more Cinematic techniques in UE4:

Quixel Youtube Channel - Environment Art, Cinematics, and Asset Texturing info

CinematographyDB - Virtual production in UE4, cinematography and more, run by Matt Workman


and most importantly, check out EXP Points! It's a great Discord community that I have learned tons from in the last few years.

Part 1