Search Unity

Problems with small grass textures: flickering and too-near draw distance

Discussion in 'General Graphics' started by gecko, Jun 27, 2016.

  1. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,055
    I've added some small grass textures to a terrain -- max/min width and height set to .1, since they are actually small spring flowers -- but I'm having two problem:

    1) They have a much shorter draw distance than other grasses. Very noticeable when moving around.

    2) Once I increased the terrain's wind speed from zero to one, each grass instance has a weird flicker -- even on the more distant which are not otherwise rendering.

    Here's a short video showing both problems: http://www.eduweb-labs.net/flowers.mp4

    This is on Unity 4.7.2 (project is stuck there due to lack of a few necessary features in Unity 5).

    On the flower texture, I selected and deleted that top-right area of each layer in Photoshop, and in the alpha channel, so there are definitely no pixels there.

    Anyone got any ideas/solutions?

    thanks
    Dave
     
  2. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    635
    Do you have multiple foliage setup for this test? It's not on the flower texture that it's showing that white piece, its the other foliage texture in the atlas. You have to pad the top/bottom of each foliage texture so when it's atlased, it's not having UV issues.
     
  3. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,055
    Okay....but if I pad the bottom of other grass textures, then won't they be floating a bit off the terrain?
     
  4. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    635
    Yeah, but you just do it a bit so that it's not bleeding over. You wont be able to tell it's floating either, I wouldn't think.
     
  5. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,055
    That fixed problem #2 -- thanks! Any ideas about problem #1?
     
  6. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    635
    Is it because of mip-maps? When it's so small, that the alpha takes over or something?

    What if you look around in wireframe, can you see the quad even though it doesn't seem visible?
     
  7. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,055
    I thought of that and tried disabling mipmaps on the texture, no better. But here's a comparison of textured and wireframes -- yes, the flowers are there in wireframe view, but not rendering. Hmm, so what does that mean?
     

    Attached Files:

  8. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    635
    Changing the mipmaps of each individual foliage texture doesn't do anything.

    Unity takes your four foliage textures lets say for example, and makes an atlas from them. Then creates the mip-maps from that atlas.

    What if you make a solid red foliage with no alpha for this little flower as a test, and see if you can now see red as far as the wireframe is shown?
     
unityunity