Zooming out on terrain mesh colour distortion?!

Hey, I’m creating a procedural terrain in unity with hexagons. When the camera is fairly close the textures and colours work perfectly fine but… as soon as I zoom out I get this.
2884452--211887--upload_2016-12-13_15-14-33.png
2884452--211889--upload_2016-12-13_15-15-54.png
As you can see I get these weird dots that become more exagerated the further I zoom…

When I’m up close I don’t get this and the hexes blend very well toghether.
2884452--211891--upload_2016-12-13_15-19-6.png
As you can see here… The textures blend very nicely when it’s close and you can’t see any boundaries. But as you go further out, some dots start appearing and even further so the colours get completly distorted.

Does anyone know what’s causing it and how it could be fixed? I’m sorry, I’m really new to unity and this is my first unity project

Also, I presume this wouldn’t be due to the texture bleding at boundaries because when I set the colour of the hexagons to be the same, I still get that effect.
(for example the sea in the pic below)
2884452--211892--upload_2016-12-13_15-23-16.png
and again when it’s close…
2884452--211893--upload_2016-12-13_15-24-10.png
And when it gets further out, the problem pops up

Any help would be greatly appreciated! :slight_smile:

Are you using a texture atlas by any chance?

This could be an issue with auto-generated mipmaps. Mipmaps are built to smoothly downsample textures, eventually blending to an “average color”. If your texture contains a number of smaller sub-textures, the seams between them may be combined to form a combination of the two neighboring colors, causing colors to bleed and creating an ugly edge.

You may also need to do half-pixel correction on your UV maps to prevent the texture sampler from interpolating between pixels on either side of a border in your atlas.

There’s a good explanation on both of these issues on the GameDev StackExchange

1 Like