I have this stone brick wall mesh and it is jittering when I move around the level. It is not a stone brick material, the mesh itself has 3D stone bricks on it. I do use post processing outlines, but it is not the cause of the jittering. When I disable the outlines, I still get the jittering. I am also using a toon shader / cel shading, so it might be due to that. I have attached a video of it happening with and without the outlines enabled. Has anyone encountered similar issues or know how to fix this jittering?
I can confirm this is not due to the cel shading. Disabling all post processing materials does not get rid of the jittering seen in the video.
doesn’t seem to be the mesh. seems to be the material.
something like mipmap.
Do you have any recommended changes I should make to the mipmap? I tried a few changes I found on YouTube, but they have not made a difference.
The suggestion is pretty good, but it doesn’t work for me, hopefully there will be a better suggestion in the future that I can apply.
sorry, it’s a bit out of my deeper knowledge.
if you try searching like this unreal make materials look good from far at DuckDuckGo
i found this
How to stop Textures from looking bad from afar? - #2 by ClockworkOcean
i was going to suggest is to handle the change in the material, based on distance. which is what is said in that link.
for example your material seems to have bump mapping or wpo in it. i would lerp the wpo so it’s basically disabled at certain distance. so that the material is flat.
this makes sense since your problem is very akin to lod (not mesh lod but material lod)
you can also play around with ddx/ddy (search for prismaticadev if you wanna know what is it).
ddx/y will help you fix the issue with view angle.
you can try changing your AA method (though i’d say save that as last resort, since it’s players will really want to choose their favorite AA methad).
also ensure it’s not an issue with the resolution percentage (which lowers (and it’s good that it lowers) when you lower the performance profile).
I am still a bit confused on how the material is causing the issue. I only have a diffuse color texture baked from Blender. There is no bump map or anything that I thought might cause the issue. The asset itself is created with the rocks extended, and that is what is causing it as I have flat assets with materials and even normal maps on them that do not have this issue. Is there anymore insight you could provide as to how the material causes this problem?
Also, from the solution you sent, using this setup in the material leads to no change in the issue. The asset seems like it would be blurry from the material view, but it looks almost identical in world:
thanks for sharing the material that helps.
that definitely looks like the wrong material. the texture is a solid grey instead of the expected bricks.
that would explain why it looks identical, because you’ve changed another one.
well, 1st a disclaimer:
i don’t really know for sure what’s going on. but my experience leads me to think that’s the issue. and but this is expected. it’s very difficult to know 100% the answer to a random question with limited context.
as to my reasons:
-
i’ve seen that issue before and it looks like a regular moire effect due to detail and distance / view angles Moiré pattern - Wikipedia
-
if you do some research you’ll see that being asked in the forum a few times (though with random names, most ppl don’t know it’s called moire pattern). it’s also all over internet (jam2go has a great video trying to replicate it).
-
any detailed texture has a chance of displaying some sort of moire pattern regardless of wpo, bump or normal mapping. but those 3 would make it more prominent.
-
the jitteriness has a circular quality, very appropriate of the moire effect.
-
no-one has corrected me yet, which even though unreliable metric, it’s something to take into account.
-
there’s no jittering on the structural shape of the mesh, or other meshes. you can notice by looking at the edges in the video. or the outlines.
-
it would help if you record a video moving the camera while the yellow selection is still active, as that would jitter if the mesh is jittering.
-
also by looking at the last picture you’ve posted, it’s quite evident that the bricks has an added black outline (and imho i rather it wouldn’t). that seems to be the post process. and in your video it’s obvious it does.
the post-process, i speculate, would add outlines either by the depth buffer or the normal or both.
which backs up the idea that your material has some sort of wpo/bump/tessellation.
and i add an extra speculation, i think that postprocess was either taken from a 3rd party plugin, or copied from a youtube tutorial, not made by you (not judging, it’s not wrong, but that’s what it seems to me) -
from this part of the video the way the edges between the bricks works gives me a 90% confidence that there’s some sort of bump mapping/wpo/tessellation going on.
good job on recording a video from different places with pp on/off -
by the shape of the yellow outline it does not seems to be tessellated (i can’t notice brick edges) and i wouldn’t use a tesselated mesh for the style you’re using, not for bricks.
but the size in the video is tiny so i might be wrong.
my recommendation is :
- find the actual material and try again.
- find the texture and modify it so it has a lower resolution. (there’s a non-destructive setting for setting the “max size”). this is not a solution, but a way to isolate the issue. you can play around with this and see what happens.
- research about moire pattern on ue. Search results for 'moire' - Epic Developer Community Forums
I think you are correct in identifying it as a moire effect. I am new to both UE5 and asset creation, so it might be the setup of my mesh that is causing the problem as well. I think I will need to continue to research LODs and MipMaps in general, as I am not familiar with their setup and the solution from the other forum post you sent did not make any changes. As for the post processing, I followed a tutorial from unreal engine and made some modifications to it myself to get a desired result. Since disabling it did not work, I agree it is either the material or mesh setup. I tried some other solutions as well, like using depth of field on the post processing to blur objects in the distance, but that did not work. Changing the resolution of the texture leads to the same results as well. I have some other information about my setup as well, but I am not sure if it will be useful. I have lumen disabled for example, as it does not work with my toon shader. I am also using FXAA anti aliasing, but changing that does not fix the issue. Thanks again for all of your detailed responses, I am going to continue investigating with different texture setups and potentially a different asset entirely.
Actually, as I sent that last response I realized I could test whether it is the mesh or material by removing the material from the asset. As seen in this screenshot, removing the material entirely still leads to the moire effect. I am assuming this means that it is the asset, or my unreal engine project settings potentially, and not the diffuse texture that is on my material for the asset. I have the post processing disabled entirely for this screenshot as well to make sure it is not that.
One more odd development I just found, the shadows on the wall to the left are flat when close to the object, but when I move away they get this odd triangle wave pattern that moved very similarly to the moire pattern on the stone asset.
Hi @User-31e3dcabf2,
I do believe @nande is correct in saying the main issue is a moire effect. This page is a fantastic breakdown of how the moire of texturing occurs in game engines and some methods to help it (including a Unreal version of the example shader that you could try implementing).
You can also try adjusting some texture settings. Moire in Unreal is caused by the texture filtering contradicting the pixels of the screen, and changing how your texture process as it gets further away can help fix this. I wish I could find the video that taught me this, because it was really great, but here’s another video that kinda explains how filtering works. A few settings to play with to help your texture filtering:
Mip Gen Settings: Before/After
This will most likely be the thing that helps. This directly tells the engine how to handle the texture evaluations at further distances. Using the Sharpen should help you keep crisp lines at further away
Filter Method:
This determines how smooth the texel interpolation is- in order of smoothness. Playing with these settings might also help you with your aliasing / moire.
Good luck! Let me know if this helps! Remember that to see results you’ll have the most luck making changes to your basecolor and your normal map.
Thank you for your response. I am looking into the filtering now to see if I can create something that will help blur those moving lines. However, I did want to point out that changing those Mip Map settings did not result in any changes, nor did changing the texture filter settings. I am not sure if it is due to the textures anymore, because if I remove them from the asset the issue persists. Even using base unreal materials results in this issue. In one of my posts above I shared a screenshot showing this.
Thanks Sarah, that’s amazing info!
that screenshot is useful but very tiny.
if you’re sure it has no material, then the problem is the details on the mesh and not the material.
so you were right. sorry for the roundabout way, but usually those details are baked on the texture and not on the mesh. i wish i’d seen that before.
i would have expected the mesh to be a plain cylinder (and the previous screenshots didn’t showed that well). (that’s why i was assuming based on the yellow outline)
that mesh is quite un-optimized. tbh.
that’s what i meant by that. i thought the bricks were baked into the texture. which is the usual way.
still the problem is similar, that’s why i also mentioned wpo and tessellation.
i’m not sure it can be completely fixed, but it could be improved:
suggestions:
- adjust with some LODs. ue has some automatic lod generation on the mesh editor. you can play around with the values. LODs change very far, you might need to adjust that.
- adjust the lods on blender.
- im not confident automatic lod will fix your issue, it might make it worse. experiment.
- try out nanite: while i don’t recommend nanite for your project, it might help to narrow down the issue. or might get you different ideas.
- the one i recommend: bake the bricks into a texture, and use wpo and bump mapping instead. and have the mesh be a simple cylinder. this will give you the most control on the granularity of the effect, and you can tween it based on distance and angle. it will also be much more efficient, since you’ll reduce the triangle count considerably.
- search for bake material displacement (be careful that some do the opposite, they bake the material into the mesh, youd want to bake the mesh into the material, you might need to do it in blender)
One can always try to change from TAA to something else too.
Don’t discount the fact that Epic - after 20 years - still hasnt figured out how to work their TAA bs…
good idea.
you said you tried fxaa you might want to try msaa too. since it does more samples, it might actually help in this case. but i would think it wont solve it, or it’d be too costly.
I will try to use displacement and bump maps instead. My main issue with using custom LODs is that the mesh has that moire effect and jittering up until you are right next to it. I think swapping the mesh using LODs will be jarring if it happens that close to the character. Thank you for all the information!
all the best. don’t give up.
it’s not an easy thing to fix. since it’s just how pixels work (and quantization).
i think wpo will help you better than lod.
lod can be adjusted at which distance to make the switch, but i don’t know how atm.
wpo/bumpmap can be controlled with the material, hence giving you way more control. and will be faster for the gpu.
so i wouldn’t bother with lod unless you can’t bake the details into a bumpmap.
i’ve seen an image of pokemon scarlet for switch2 and i saw the moire effect and it reminded me of this post. so even a 3A studio can’t kill it fully.
Okay, so this took me a few days to finally figure out. There were multiple reasons why the moire effect, jittering, and pixelization were happening. Firstly, I was using MSAA and FXAA. Switching to TSR and adjusting some other settings to mimic the default unreal render settings helped a lot. Once I changed that. a lot of the pixelization was gone. However, it did not fix the jittering. To fix that, I actually had to switch my post process material to be Scene Color before DOF instead of After Tonemapper. For some reason, that completely fixed the issue and results in a clean level with absolutely no jittering. I don’t have the technical knowledge to explain why, but those changes fixed the issue completely.