How to use Anti-Aliasing in 360/ 180 Degree Video in Unreal Engine: Deferred Rendering

A short guide for how to get the best quality anti-aliasing output for your 360 and 180 Degree deferred rendering in Unreal Engine
Written by Off World Live
Updated 1 month ago
This article is about using deferred rendering. If you are using path-tracing please follow this article as the process is different.

Anti Aliasing cleans up edges and reflections that would otherwise look unnaturally crisp or jagged. It works by taking samples from parts of the pixel and  using those samples to smooth out colors (either within a frame or between multiple frames) so that the elements in your scene have smoother edges.

There are two types of samples used to control Anti-Aliasing:

  • Temporal Samples: These are samples taken across multiple frames which helps smooth out moving objects or effects caused by moving cameras.
  • Spatial Samples: These are samples taken around the area of a pixel to determine the best average of colors with the goal of smoothing transitions between the colors to stop jagged lines.

In deferred rendering, Unreal Engine has highly optimised forms of anti-aliasing such as TAA (Temporal Anti-Aliasing) and TSR (Temporal Super Resolution).

Epic recommends to use TSR unless there is an obvious visual reason you need to disable it: "you should only disable this in MRQ if there is a visual reason to do so, there are a large number of rendering features that work best... and require TSR like Lumen. "
 See below for more details on when it works to disable anti-aliasing.

When Should You Increase your Anti-Aliasing Samples in Deferred Rendering?

Epic says you only have two reasons to increase Temporal or Spatial Samples in Movie Render Queue:

  1. If you see bad quality in your motion blur, you should increase Temporal Samples. 
  2. If you see bad anti-aliasing that isn't motion blur you should increase Spatial Samples, in which case you should set AntiAliasing to None (more detail below).

Epic recommends:

  1. Using Temporal Super Resolution (TSR) as your anti-aliasing method. This is set in you Project Settings.
  2. ONLY use Spatial Samples if AntiAliasing Method is set to None, otherwise you will be increasing your render times for no benefit (more detail below).
  3. ONLY increasing Temporal Samples: "There isn’t any advantage to mixing temporal and spatial samples. Do not mix and match."
  4. Increasing temporal sample count if you don't see smooth motion blur: "Faster moving shots will need more Temporal Samples than slow ones."
  5. Use ODD numbers (3, 5, 7, 9, 11) for your Temporal Sample count: "it's best to keep your sampling to odd numbers so that you get a sample on the keyframe for any animated impact or change or direction".
  6. NOT increasing your Temporal Sample count above 12: "anything past 12ish is not really visibly seen... you get diminishing returns and should consider setting the AA method to None."
N.B. For fast-moving scenes you will need a larger amount of Temporal Samples but increasing temporal samples above 8 will have a big effect on your render time.

When Should you Use Spatial Samples in Deferred Rendering?

Epic recommends:

  1. If you are having to increase your Temporal Sample count ABOVE 12; and
  2. You have adjusted the non-anti-aliasing settings (below), and
  3. TSR isn't giving you the right results, then
  4. You can try setting AntiAliasing Method to None; and
  5. Use Spatial Samples as well as Temporal Samples to try to get the shot you need.
"If you have to render with a very high number of Temporal Samples for motion blur reasons you might as well get the extra unique camera positions for AA that comes along with each Temporal Sample.
(When the AntiAliasing Method is set to None the camera's position will pick a unique sub-pixel jitter for every Temporal/Spatial sample in the output frame.)
It's worth a test to see what gives you the best results."

Epic suggests scenarios like:

  • "If you had a really hot, thin piece of geometry and it's really hard to get the outline clean.
  • Or a bunch of think lines stacking up on one another going back in Z-axis from the camera.
  • These are hard problems for TAA to handle and you might have to count on spatial/temporal samples to clean up the line."
Remember that Spatial and Temporal samples are multiplied.
So if you select above 12 Temporal Samples then whatever Spatial count you select will be multiplied by over 12!
For example, 13 Temporal samples and 8 Spatial samples = 104 total samples which will take a long time to render!

Try Changing Other Settings Before Adding Anti-Aliasing Samples!

Unless you have a specific requirement, adding more anti-aliasing samples will just increase your render time for nothing! 
As Epic says: "This is the most common mistake and will do nothing other than needlessly bloat your render times."

In particular, Epic notes that in the following areas it's better to change other settings such as:

  1. Shadows: "If you see chattering in the shadows consider raising the Samples Per Pixel on the lights. If you have any softness to your shadow at all you’ll want to consider raising it above 1. Especially for Area Lights."
  2. Reflections: "If you see noise in the reflections then have a look at the settings in the Post Process Volume... They all have their own Samples/Quality.
  3. Refractions, Global Illumination, Ambient Occlusion: "If you see noise in your Refractions, Global Illumination, or Ambient Occlusion, that needs to be addressed in the Post Process Volume, not Movie Render Queue."
In summary, from Epic:
"Leaning on Temporal Samples to clean out noise in the rendered frame will work but it will cost you heavily in render time.
In many cases, you can go after the Raytrace/ Lumen Samples per pixel in the respective problem area."

Review Console Variables (CVars): They will be Affecting your Renders!

Epic says "A lot of people don’t realize that everything in the “Game Overrides” section in MRQ is having an effect on your render even if you don’t have it active in the GUI."

Epic recommends:

  1. Remove all Console Variable overrides unless you have a specific reason you are including them.
  2. If you see any large low-frequency noise, that's from Denoisers. You have to find the right Denoiser (Ambient Occlusion, Global Illumination, Reflections, etc.) and shut it off.
  3. If you disable all the options in the Game Overrides section, aside from Flush Grass Streaming, that will get you as close as possible to what you are seeing in the Editor Viewport (assuming you don’t have any CVar overrides in MRQ).
  4. The geometry LOD settings here will NOT override anything Nanite. They are only for non-nanite actors.

Did this answer your question?