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

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

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.

Okay…but if I pad the bottom of other grass textures, then won’t they be floating a bit off the terrain?

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.

That fixed problem #2 – thanks! Any ideas about problem #1?

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?

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?

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?

In case it helps anybody, I had this issue and enabling TAA fixed it. I would prefer for it to be fixed without TAA, but it is nice to have an option.

How do you modify the texture atlas mipmaps btw? @mbowen89

1 Like