There’s a number of antialiasing techniques available in Notch. They all attempt to antialias your render, but all of them cope better or worse with different rendering situations and all have different trade-offs. They can be used together, but often it doesn’t make sense to do so. None of them are perfect. Before reading further it’s worth recapping that there are numerous reasons for aliasing in the first place and some are not solved by every antialiasing method. This is discussed further here.
In an offline render or a ray tracer antialiasing is easy: just render the scene lots of times - or cast lots of rays for each pixel - with tiny sub-pixel offsets, and average the results. While this is also possible in a real-time renderer it’s terribly inefficient, so we attempt to find other techniques which achieve these results in less time.
Antialiasing Methods in Notch #
Root Node AA: Activated via the “Antialiasing” checkbox on the root node, this enables MSAA (4x) while rendering the scene. MSAA is a GPU hardware feature that identifies pixels hit by lines and edges of triangles and renders multiple copies (up to 4, in our case) of those pixels, but only a single copy of each pixel for triangle interiors, then averages the results. This is intended to antialias lines and edges of triangles - one of the most obvious forms of aliasing in 3D renders - but has no effect on any other causes of aliasing. This works efficiently in scenes where Deferred Lighting is disabled, with a quite low performance overhead - typically 20-30%. However when Deferred Lighting is enabled the costs increase considerably. Each active sample of each pixel must be lit, and there must be room to store every sample of every pixel in memory. This greatly increases the amount of memory used: 4x MSAA means 4x the memory consumption. When ray tracing (path tracing in particular) is enabled this cost becomes prohibitive, so we do not recommend this method when ray tracing is enabled.
Video Export AA: Used via the “Antialias Passes” option in the Video Export panel. This method re-renders the frame multiple times with sub-pixel offsets and averages the result, just like offline renderers. It gives a high quality AA that works for everything, but at obvious high cost.
RT Refinement Node - Fullscreen Antialiasing: This method works with ray tracing/path tracing refinement. It uses the fact the scene is constantly being re-rendered as it gets refined, and applies sub-pixel offsets to each render pass then averages the results. This gives a very high quality antialiased result equivalent to an offline renderer’s antialiasing but for almost no extra cost in performance or memory usage, as all those render passes have to be done anyway to refine the render. It will cure all kinds of aliasing but it only works on refining scenes, and only applies to solid geometry; anything that’s transparent will be unaffected and left aliased. Furthermore it causes artefacts with some post effects like depth of field which use the depth buffer or other render buffers because those buffers are invalidated by the technique. If your scene can live within these limits it gives the best antialiasing for the least cost.
Temporal Antialiasing: This is a post processing effect that uses an accumulation of renders from previous frames with sub pixel offsets and motion vectors, and is popular in modern video games. For slow-moving scenes consisting of opaque/solid objects it gives a great result for very little performance or memory cost and can solve all kinds of aliasing. It’s particularly good at solving temporal flickers on geometry edges such as those caused by a slow moving camera. It only works properly for solid geometry; transparent geometry can’t render motion vectors so will look incorrect. Geometry that can’t generate motion vectors, such as procedural meshes or objects deformed with certain deformers such as mirror or cull deformers will also be left aliased. It should not be used with refining because the refining noise is fed back, causing the scene to actually refine more slowly. It’s also prone to artefacts such as streaks and trails particularly in reflections.
FXAA: This is just a post processing effect which looks for edges in the image and smooths them. This is applied in the post processing chain so it can be applied as and when you wish, and is fast with no memory overhead. It works on anything, but can make things look more blurry. It’s a good last resort when no other techniques will work. You can even layer up multiple FXAA nodes to get an increasingly antialiased (but blurry) result.
- Root Node AA (MSAA) changes the entire render, so you can use it with any of the other methods. Use it for scenes without deferred lighting or when there’s no other option (like thin lines and transparent geometry). Avoid otherwise.
- If you’re using RT Refinement FSAA on a solid, purely raytraced scene, you should be able to turn all the other methods off. This will give the best possible quality (and at low cost) for scenes where it works.
- Temporal AA is ideal for solid 3D scenes running real-time without refining on.