Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Unity Terrain: blurry grass

Discussion in 'World Building' started by luxregina, Feb 15, 2019.

  1. luxregina

    luxregina

    Joined:
    Mar 3, 2015
    Posts:
    22
    Hello everyone!

    I'm making a 3D FPS with "pixel art" textures (video of the alpha here:
    )

    The whole idea is that I'm using very small "pixel art" textures, usually between 32*32 to 64*64, all unfiltered (filter mode: Point(no filter)) no mip-maps, no compression, etc...

    Everything works fine at the exception of the grass paintbrush in my Terrain kit: I'm using a 32*32 grass texture painted on my terrain, but no matter what I do, it comes out blurred/anti-aliased.





    It may be the terrain shader, but how can I correct this in order to have a pixel-crisp grass instead of that blurry mess :) (not completely un-esthetic, but it does bother me! )

    Thanks for suggestions
     
  2. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    2,204
    As far as I'm aware the terrain detail system does a lot of things under the hood. It may very well be possible that it creates a texture atlas out of all the detail meshes which uses bilinear filtering + mipmaps. Though this is speculation ;)

    One thing you could try is to create a simple Quad object, assign a material with your grass texture to it. Then add this as a tree to your terrain. Try to paint it, and see how it looks. Trees, unlike detail objects/billboards render using whatever shader and textures their material uses, so it allows for a lot more granular control without the terrain hijacking it.

    If that ends up looking alright, you'll at least be a little wiser about what is happening ;)

    Game looks great by the way, digging the aesthetics!
     
  3. papatoma

    papatoma

    Joined:
    Jan 19, 2021
    Posts:
    3
    Hi guys, any update on this topic? I would like my weeds to be pixelated ;]
    Cheers!
     
  4. joshcamas

    joshcamas

    Joined:
    Jun 16, 2017
    Posts:
    1,273
    It is true that unity will create an atlas under the hood, and thus I assume it adds a bilinear filter. If so, there's not much you can do using unitys grass system... Like most projects these days, you'll probably need to use another grass renderer, or do the detail trick.