How can I reduce geometry moire effect? HDRP 9

Hi Guys

I have modelled warehouse panels, which are giving me a heavy moire effect:

Up close it’s much less obvious:

…but obviously I would prefer to have it looking like this, from further away also

Are there any settings I can adjust to try and reduce the effect?

Hey, can you check how it looks from the game view? I can see the grid in the first image, so it’s probably from the scene view.

The scene view can have TAA enabled btw, either in Edit\Preferences\Scene View AA (IIRC), or by just toggling it on in the latest versions of Unity in the camera settings:

Also, HDRP 9 and 10 have massive TAA improvements, so it could be interesting to check it. However, the best way to review AA is to use the game view, while the game is playing, as the scene view isn’t the most representative when it comes to temporal-based effects like TAA.

The screenshots I posted above are from the game view.

TAA give best result in terms of reducing moire, but I’m getting weird flickering in some parts. Further away, the AA is a bit on the heavy side as it starts to smudge or blur things a bit too much

Adjusted these up and down, resulting in only a slight improvement
6068913--657702--upload_2020-7-8_22-24-53.png

The grid you’re seeing in my 1st image, is not the grid, its geometric parking lines

I’m using HDRP 9 preview 33 by the way…

How can I get a hold of 10?
Since 9 is in preview anyway, might as well try 10

I’d love to get optimal settings for this. I’m not getting anywhere at the moment.

6069771--657870--upload_2020-7-9_2-15-48.png

With the camera animated, its even worse as the circled area above dances all over the place.

6069771--657873--upload_2020-7-9_2-16-38.png

Will switching the project to DXR make any difference in this regard @pierred_unity ?

Are you using SSAO? That can artefact badly on geometry like this; one solution if you don’t want to disable it completely (and don’t mind the performance hit) is to make the material transparent (but not actually transparent, i.e. alpha=1), since SSAO doesn’t affect transparent surfaces.

I tried with both those off, but it makes no difference
6070512--658098--upload_2020-7-9_10-11-57.png

I have no overrides for those, so they must be off

Weird thing though, I only have 1 light in the scene, then sun (Directional light). If I set it to Baked, and then in the lighting click Generate Lighting, the progress bar runs for abot a split second, then its done, but the result is:
6070524--658101--upload_2020-7-9_10-14-19.png

…and my scene is suddenly very dark, almost like its lit only by a faint moonlight nigth sky, and not the Directional Light

Here’s the same area from the last Gameview screenshot and as you can see, its much darker!
6070524--658107--upload_2020-7-9_10-17-11.png

Are your mesh renderers set to “Contribute GI” and “Receive GI” from lightmaps? Also, your sun must either be set to “Baked” or “Mixed”. And in the environment tab of the lighting window, you need to provide a volume profile to the Lightmapper.

Regarding the moiré effect, if tuning the TAA Sharpness and antiflicker doesn’t help, it will be difficult to fix if you don’t modify the asset. Typically in games, this type of corrugated materials is avoided for this reason. It is also a difficult case when it comes to specular highlights.

One thing to do would be chamfering the mesh to improve the smoothness of the mesh, and/or have a better smoothing group set up. Alternatively, using a normal map instead of a very high poly mesh would probably be preferable, performance wise, and provide smoother results too, as you’ll bake it from a proper high poly mesh with way more smoothing hopefully.

Even cameras (or sometimes the human eye) can display such issue on this type of materials, so you certainly not making your life easy.

Ooops, completely forgot to set the models to Static!

This is for offline rendering only so performance is not an issue, only ULTRA quality. I’ll see what I can do with normal maps. Also, I’ll see what weird and wonderful limitations DXR holds, as I don’t really want to be light baking!

Oh wow, with DXR and pathtracing I get pretty NICE looking results!
No more moire!!!

6072024--658398--upload_2020-7-9_17-35-58.png

But now it takes about 30 seconds at 1080p for the image to cleanup, compared to previously being instant

Would be good if I could get something between the 2 workflows, so I get closer to the speed of the one, but closer to the quality of the other…

i would go with a bump and height map instead of using geometry - at least for far distances: textures are filtered and smoothly fade out over the mip maps. just make sure you enable trilinear sampling in the import settings.