Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Zooming out on terrain mesh colour distortion?!

Discussion in 'General Graphics' started by KacperKazan, Dec 13, 2016.

  1. KacperKazan

    KacperKazan

    Joined:
    Nov 13, 2016
    Posts:
    1
    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.
    upload_2016-12-13_15-14-33.png
    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.
    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)
    upload_2016-12-13_15-23-16.png
    and again when it's close...
    upload_2016-12-13_15-24-10.png
    And when it gets further out, the problem pops up

    Any help would be greatly appreciated! :)
     
  2. andrewgotow

    andrewgotow

    Joined:
    Dec 28, 2013
    Posts:
    18
    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
     
    BrandyStarbrite likes this.