# Name & explain shimmering patterns seen when looking at a grid of objects from a distance

If you place a large number of identical elements in a regular pattern, then look at them from a distance, they will make strange warped grid patters that shift as you move your viewpoint, as shown in this video. This is found not only in Minecraft, but also in any program.

I'm wondering if this effect has a name and how it can be explained.

• We can even explain it in song! ♫ When a grid's misaligned / With another behind / That's a moiré... ♫ When the spacing is tight / And the difference is slight / That's a moiré ♫ Aug 26, 2022 at 10:29
• @RosieF that's exactly where the link in my comment points. Aug 29, 2022 at 11:07

It's a moiré pattern caused by aliasing. In your examples, the Moiré patterns occur when a repetitive pattern of high spatial frequency is sampled at low resolution.

Consider the Wikipedia example reference image:

The bricks form a repetitive pattern. Because there's many bricks, the resulting texture has a high spatial frequency. Here's the same image with a reduced resolution:

Lowering the resolution has lowered our sample rate to the point that an obvious moiré pattern occurs. Because there are fewer pixels, information has been lost. And because the brick texture isn't perfectly aligned to the pixel grid, the information isn't lost evenly - some bricks lose more red brick pixels than their neighbors & the similarly for the white mortar pixels. This puts the periodic spatial signal of the brickwork out of phase. The threshold for this problem is determined by the Nyquist–Shannon sampling theorem.

Mipmapping can be used to reduce the artifacts on moiré prone textures. But in your Minecraft example, the 'texture' is effectively made across multiple blocks, so it can't be mitigated by mipmaps. Spatial anti-aliasing could help, but only to a point as we are limited by the finite nature of the screen. Generally speaking, the goal is to get something that's good enough through some combination of graphics techniques (to reduces the artifacts), art / texture choices (to avoid error prone visuals) and game design (to make occurrences brief &/or less impactful).

• Minecraft has a mipmapping option but in my experience it doesn't resolve some of the issues.
– qwr
Aug 27, 2022 at 5:17
• @qwr Yes, it has mipmapping, but it only addresses the problem with respect to the texture on a given block or a collection of blocks with the same texture. In the images shown in the question, a variety of different blocks are being put together to emulate an RGB screen & the spatial frequency of the RBG 3x3 blocks (plus the black grid around them) is what is contributing to the moiré pattern. Mipmapping can't help with that because the signal is spread across multiple blocks & the signal is made dynamically by the player at runtime. Aug 27, 2022 at 16:39
• The solution (which is alluded to with mipmapping) is to remove the high frequency image components by applying a low-pass filter. Aug 28, 2022 at 11:29
• THANKS! This is a good answer Sep 10, 2022 at 5:26