Pokefan531's Posts

I post my tech and my series, Yuki's Story.
I post my tech and my series, Yuki's Story.
  • Yuki's Story Series
  • Pokemon Studio Series
  • rss
  • archive
  • MMD Anti-Aliasing Showcase 3 Raycast
Since advanced shaders that takes its own framebuffer in its own style, any internal or drivers anti-aliasing on any vender GPU won’t work with it. Sure, you can leave AA on in MMD, but regardless, Raycast won’t...

    MMD Anti-Aliasing Showcase 3 Raycast

    Since advanced shaders that takes its own framebuffer in its own style, any internal or drivers anti-aliasing on any vender GPU won’t work with it. Sure, you can leave AA on in MMD, but regardless, Raycast won’t use it.
    There is another way to show you how AA is done in Raycast. Natively, you only have Post processing shaders to use, and none work with temporal aliasing.First at the top, I have six samples. Fxaa does the job without being that blurry that some may claim that FXAA looks on other games, but this one is almost as sharp as SMAA. Smaa has two levels. The medium and high. There is little diference on this sample, but high would probably take care of small edges better. The 2x ones are just applied twice with little improvement. Certain slopes can look slightly blurry than any other options, so there is little reason to use the 2x ones compared to high. My problems with MMD’s SMAA shader will be explained later. However, with the grid and axis being visible, FXAA can have little blobs on the grids, as explained at the first showcase, but SMAA can be more stable image. the 2x ones don’t relate to temporal anti-aliasing.
    https://vr.arvilab.com/blog/anti-aliasingLook at number 2. It explains about post processing AA and traditional AA.SMAA 1x is not as demanding, if you look at crysis 3 AA benchmark. Also, the author of Raycast claims that SMAA shaders don’t work in AMD cards, but it should work.

    The second category, is Downsampling.As I explained before, there is no way to take care the temporal or subpixel aliasing. Temporal aliasing would be flickering small lines in motion and small lines would continue to flicker, and subpixel aliasing would be disconnected lines due to not being a higher resolution to see proper smooth connection. The lines would not connect and no Post-AA would solve this at all. Since traditional AA can’t be used, we have to use downsampling. I will recap of what it is. It means that for better AA, you double the resolution from 1080p to 2160p (4k), render as a video or photo, then have it downscaled to 1080p in Virtualdub or Photo editor, and you have a downsampled image.Noticed that the leaves have transparent textures and the long slope at the mid-bottom of the picture. With downsampling along with FXAA, you can do a better AA IQ by downsampling. 4x looks better on the leaves and other thin lines looks better. The parts that any post AA had troubled with are taken cared with this manual downsampling. 4x is four times the pixels, when doubling the target resolution. 16x, while even more intense, makes temporal aliasing and subpixel aliasing barely noticable. Downscaling is much more heavy on GPU performance, especially trying 16x for HD resolutions. 4x seems a decent choice for video rendering.
    The third category, is showing a close up of post AA.My main problem about SMAA shaders for MMD are not done well. Just look at the highlighted parts with black square. Some slopes have spikes and it seems like the shader is doing something wrong on those slopes. When the slopes are up and right or bottom and left, it looks fine, but when the slopes goes up and left or down and right, the edges have spikes. Those slopes aren’t filtered well, and you would either see less effect on it, or you would see spike artifacts. That’s why FXAA is a great choice, despite having a slight bloated look on MMD’s grid axis, but not much of a big deal, and not visible when performing downscaling.
    So in conclusion, since there is no temporal aliasing, and want to go beyond of what raycast can do, downsampling is a better option. I’d say that 4x does make a difference and so do 16x, if your system can handle it for 1080p video.

    I’ve did my own private test on MMD’s sample project and rendered both 1080p, 4k, and 8k, all scaled down to 1080p, and all three don’t use any AA, and mipmaps are disabled too. No shaders are applied, just standard MMD look. For what I can tell, 4x on 1080p is a good choice to get rid of a lot of temporal aliasing. Not as good as traditional SSAA, but still a better job than Post AA alone. 16x really gets rid of them even further, to where temporal aliasing is barely noticable.I also made my own private 4k test that is tested on a 4k tv. I only had 4k and 8k rendered for a 4k test. 8k is downsampled to 4k to see if it’s worth doing downscaling for a 4k video. For 4k, without any AA, the therectical temporal aliasing is similar to 4x downsampling on a 1080p test, except since the 4k one is sharper due to resolution, the 4k native one shows slightly more of temporal aliasing. However, rendering raycast natively to 4k is still better than rendering it to 1080p. Let’s get to 4x downsampling on a 4k test. Temporal and subpixel aliasing are nearly gone, and because it’s a higher resolution, 4x downsampling for a 4k video does look better, but curiousity comes up for GPU performance.I’ll tell you how my PC performs with GTX 950 2GB. Without any shaders, it can render at 1080p and 4k, whether using 8xSSAA or not, still renders without VRAM bottleneck. But, when rendering a video at 8k, even without AA and mipmap, the VRAM becomes a bottleneck. It performs at around 1fps. Sure, it’s faster than any ray tracing rendering from blender or maya, but depends how long the videos are and how much FPS the video is supposed to be, 1-2fps is not a good thing. With Raycast, it performs 1080p well, only have shadows at high to not see any VRAM increase on task manager. At 4k, it goes around 2.9GB of Video Memory, so there is a VRAM bottleneck. It does use system’s video memory, which is half the ram of your system that is used for virtual VRAM to be compatible, but it is a lot slower.Let me tell you my horror story about playing an 8k video on my desktop pc. I opened it to check the mediainfo, and because it uses Madvr, it would need several framebuffers, and so the GPU gets VRAM bottleneck, and so do the rest of the video memory, and the ram is full, which means my entire desktop is unstable, renders around under a frame per second to 2. It is unbelievable. The sound also pauses too and you can hear some skips, so I had to force restart. Never play an 8k video unless your GPU has much more VRAM than mine, like 8GB or more. However, loading it in software like Virtualdub is the way to go, since it is stable to play and view videos in higher resolution without GPU involved.

    Also, I want to ask anyone who has a 8GB GPU users if they can render MMD with raycast at 8k with default settings. I know for a safe bet, something like a GTX 1080 Ti or Pascal Titan cards since they have more than 8GB.
    For most users, downsampling is worth it for 1080p at 4x if you have a GPU that is more than 2GB, and for 4k videos, it’s recommended to render without downsampling since temporal and subpixel aliasing isn’t as bad as 1080p native. For high end users, it is worth downsampling for a 4k video, and it’s a good idea to have integer size of resolution since it delivers better quality than non integer. That would mean double or triple the resolution of your target resolution.
    My theory is if they would implement a temporal AA shader, it comes to a good performance like SMAA temporal as seen in games like Crysis 3 or Warhammer. Although it delivers better performance than MSAA 2x, it does need to sample two frames to make it look like a quality of 4x downscaled image. However, in motion, if the camera moves, it can have some fake motion blur, and noticable on lower framerates. Also, I am curious is this is possible with MMD because the physics and stuff may not render twice for a frame that needs temporal aliasing. It does jitter pixels two times each frame. I mean, even with moving camera, it can depend on the shader on how it would be able to mask it well. I never liked Fortnite’s temporal aliasing as seen with high and ultra settings. The latter kinda decreases the blur, but in motion, the objects looks like if a blur filter from Photoshop is applied. UE4’s temporal aliasing does vary. It may be possible to have a temporal aliasing filter to look similar to 4x downscale on static camera. However, I don’t know about shader programming, but I know that temporal anti-aliasing exists and may be possible to implement. I’ve seen source codes on Raycast, and there was a delisted options for temporal aliasing filter after SMAA2x-high. It is TAA.fxsub, but it is missing.

    • October 28, 2018 (1:38 pm)
    • #mmdmikumikudance
© 2016–2021 Pokefan531's Posts