Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Mipmaps are used too early, so solid lines suddenly become blurs. How do we improve this?

Discussion in 'General Graphics' started by Dreamwriter, Dec 30, 2016.

  1. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    We've got a road with a lot of sharp details, we turned on mipmaps to keep the road texture from being sparkly in the distance. Unfortunately, the lines on the road are also affected, just a short distance away from the camera the lines go from sharp edges to a blur. Can we tell Unity to hold off on switching to the mipmapped texture until it's further away from the camera or something? Or is there a better way to keep the detailed road texture from becoming sparkly in the distance? We're using 8x Multisampling for our AA, and have Anisotropic textures forced-on in Quality Settings.
     
  2. Noisecrime

    Noisecrime

    Joined:
    Apr 7, 2010
    Posts:
    2,051
    Have you set the ansiotropic value on your textures?
     
  3. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,629
  4. Dreamwriter

    Dreamwriter

    Joined:
    Jul 22, 2011
    Posts:
    472
    When I adjust the aniso value on the texture, I get the warning that the value is ignored because it's enabled for all textures in Quality settings (though there is no place to set the value there, just enabled or not...) Even if that warning is wrong, turning it up to 16 doesn't seem to fix the sudden sharp-to-blur point when the line's texture switches to the lower-res mipmapped texture. (Platform is Standalone/PC, BTW)
     
  5. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,629
    Do you have a screenshot? Getting aniso all the way up to 16 and hitting apply, should more or less fix your problem.

    But look into the command I posted in my previous post as well.
     
  6. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,329
    Is the texture set to bilinear or trilinear? You'll want trilinear if it's not set to that. That won't necessarily fix the blurriness, but will make the transition less harsh and may keep the texture sharper longer. Anisotropic should work better with trilinear enabled as well.