[MMD] Anti Aliasing Showcase
This is a montage of showing ways to use anti-aliasing in MMD. I do have
several Anti-Aliasing methods to showcase here and I will go over each
of them, and explain specific methods that AMD or Nvidia driver
implemtation use. All uses 480x360 and uses high quality texture
filtering with 16x Anistropic filtering. Mipmapping setting is ON with
MSAA pictures being the exception.
No AA is just a raw image
without any sort of Anti-Aliasing. It is what you normally see in games
if not using Post-AA or using traditional methods.
MMD’s AA
method uses driver’s MSAA method without alpha coverage. It’s not shown
here, but you can see the aliasing on the model in the middle in some
areas. Texture aliasing inside the models do have aliasing left on,
especially having transparent aliasing. Using Mipmapping on some drivers
can help with inner teture aliasing, but won’t smooth alpha aliasing.
FXAA.fx
shader is from Raycast developer. As you can see on the grid, there is a
bit of bloating due to how FXAA works. It does its job on some areas,
but on missing geometry, disconnected lines, and temporal aliasing can’t
be helped with. Look at the staircase and the seat at the right side.
FXAA cannot makeup with missing lines, and shows shimmering in motion.
SMAA.fx
is pretty similar, but there is no bloating on the grid. It’s sharper
than FXAA, but for the shader for MMD, it has problems. If the slope is
going upper left or bottom right at any angle degree, it shows line
artifacts, as seen on the chair at the left. It’s distraction and is a
bug to the shader for MMD. On slopes that are upper right or bottom
left, it leaves a bit of aliasing, so it does needs that bug to be
fixed. SMAA never had this situation, and you can compare with games if
you use reshade and never seen line artifacts.
SSAA_4x.fx from
Elle in NicoNico has a shader where it doubles the resolution and scales
it down with bilinear. It is ordered grid sampling. It does a better
job and you can use it with driver’s AA or MMD’s AA for better quality.
THe downside of this is that it is less compatible with post processing
shaders like SSAO or some Diffusions. It can either makes the lines
blurry, leave alpha aliasing a bit more visible, or show all aliasing
with slight blur. It is only useful if you don’t use post processing
effects that affects the shader. Link for SSAA shader:
http://seiga.nicovideo.jp/seiga/im3800138
Downsampling, let’s get
to it. I made a post about downsampling for Ray shader to put more AA
quality. Here, I demonstrate the levels of downsampling. The setting
model does have white aliasing on some edges for some reason if you turn
off AA, but I just leave AA off to showcase Downsampling quality. 4x is
4 pixel samples and doubles the resolution before scaling down to your
target resolution. 4x does take care of some aliasing and looks like
SSAA_4x, but you could see on some areas that has small aliasing, and in
motion you can see a bit of temporal aliasing and shimmering. Also,
since the Grid looks thinner on higher resolution, it is the cause of
the thickness that the grid make 1 pixel wide regardless of using higher
resolution, and the thickness never scales. 9x does take care of
aliasing more and it is a triple of your target resolution. 16x is
quadruple and it smooths the rest of the aliasing. I don’t recommend
using 16x for video rendering if your VRAM is the bottleneck and just
use your driver’s AA at 8x instead for better rendering time.
https://pokefan531.tumblr.com/post/171739184928
MSAA
showcases shows the quality for each preset. They all are using
driver’s MSAA with alpha coverage, so it takes care of transparent
textures too. Although, it’s barely in this test and you can only see it
at the character model from far. It shows aliasing regardless of
quality, and turning on mipmapping does smooth inner texture aliasing a
bit, but it can look blurry on far objects even using 16x anistropic
filtering. It depends on the driver, showing how AMD’s MSAA does. It
does have better texture LOD management than Nvidia if using MSAA on
small resolutions with shaders applied to models. The blur is mostly
diminished on higher resolutions, but can’t even get rid of the blur
that is caused by the shader in Nvidia side. You rarely see this on a
lot of situations, but to keep note if rendering on lower resolution
like 360p as seen on this image. Same thing happens if using MMD’s AA,
and while the blurry mipmapping isn’t exaggerated, it shows the blur.
AMD have better LOD management on MSAA and same can be said on programs
that uses MSAA. Anyway, 8x shows better quality, but between how AMD and
Nvidia does MSAA, Nvidia does Sparse Grid method while AMD uses Rotated
Grid method. The Sparse Grid does its job a bit better than Rotated
Grid if you look at the staircase at upper right.
Now let’s show
SGSSAA. The issue above about LOD can be adjusted for SGSSAA to -3.0 to
match AMD’s SSAA if comparing 8x. Default driver’s LOD is less blurry
with SGSSAA than using MSAA if using shaders on models. I did adjust the
LOD to match AMD’s Supersampling’s LOD. Higher quality gets better, and
you can see that 8x does its job. Even at 8x, it shows few aliasing on
the staircase and on the seat on the right, but it’s barely, and way
acceptable to see in motion since Temporal Aliasing or shimmering isn’t
visible. The small aliasing is seen on lower resolutions and shouldn’t
be bothering when seeing it in motion, and you may not see it that much
anyway on higher resolution. For fun, I’ve use the downsampling method
at 4x, and it does clean up the very small aliasing. However, it’s
pretty easy and simple to just use 8x for video rendering and even image
rendering anyway. It is compatible with any Post Processing shaders I
throw it to MMD with SGSSAA.
https://pokefan531.tumblr.com/post/171569153043
RGSSAA, AMD’s Supersampling. The LOD
doesn’t have an option to AMD drivers, but it is clean and better than
Nvidia’s default driver LOD preset for Supersampling. Higher quality is
better, and 8 is almost as good as 8xSGSSAA, but if you look at the
staircase on the upper right, you can see a bit of aliasing still. Even
though Rotated Grid is better than Ordered Grid, Sparse Grid is better
at slopes at the stairs. Rotated Grid does a better job than MSAA since
it takes care of the full scene. I think Supersampling method is the
best way to use with AMD drivers. It looks well on the rest of the
scene, but I couldn’t really find what RGSSAA does better than Sparse
Grid method in this scenary. For fun, I show the next example to use 8x
RGSSAA along with 4x downsampling and it looks a lot better, and smooths
on the staircase.
I generally recommend using Supersampling
method on MMD to 8x, and use enhanced instead of override if you don’t
want to use AA if you are editing with a weak GPU. While Downsampling
gives better results, especially at 16x, it is intensive process,
especially for video rendering. I don’t recommend using Post AA
generally and I would not use SSAA shader if I decide to throw in Post
Effects. So far, MSAA with Alpha at 8x, SGSSAA, RGSSAA, and Downsampling
are compatible with Post Effects. Next post will compare another
comparison of various Anti-Aliasing methods again, and show Alpha and
shader aliasing better a well as comparing more on Nvidia and AMD’s
handling with MSAA. After that, I want to compare photos and videos of
using Rotated Grid and Sparse Grid Supersampling methods.