- Home /
Flickering grass on terrain
Hi everyone,
I have imported a terrain via a heightmap, the only problem is when I add grass details to the terrain, they flicker in the game view where they are on slopes. In the scene window, they don't exhibit the same behavior fwiw.
Can anyone offer a solution for this? I've played around with all the terrain settings and the render settings which seemed likely to no benefit.
EDIT: I thought I should add, this is largely because I am looking down on the terrain quite often, and it seems the bill boarding is having z issues with the terrain.
Thanks for your time
Answer by Overcast · Oct 20, 2013 at 02:41 AM
Solution found, the camera's near clipping was set to 0.01, changing this to 0.1 fixed everything.
Solution originally provided here: http://answers.unity3d.com/questions/36275/culling-with-terrain.html
Answer by Owen-Reynolds · Oct 19, 2013 at 04:37 PM
Unity grass is a little different from typical MMO terrain grass. It Y-spins to face, and it also leans back a tiny bit as you look down on it. This prevents you from seeing an ugly edge when you look almost straight down.
The problem is, if you go "over the top," it has to snap slightly in the other direction. So, yes, a moving/spinning down-looking camera makes Unity grass snap. Not sure why slopes matter (I think the grass always grows straight up, slope or not.) I'd guess the camera is just more active near a slope, so you see it more.
Only fix I can think of is to prevent the camera from looking too much down, and forcing a 180 spin instead of an over-the-top.
Alternately, could plant your own 2-sided grass-textured planes. But that would be a huge pain -- you'd be writing a new grass-rendering system.
Thanks for the reply Owen, do you have any idea what the scene/editor viewport does differently in its render? It doesn't happen at all in this view, regardless of the angle.
I was hoping there was something I could do to have the game camera render it differently, even if that meant a quality hit.
EDIT: one more note, even if I tell the grass not to billboard, it still has a similar effect, flickering near slopes when being looked upon from a high angle.
Your answer
Follow this Question
Related Questions
whats a good size for a standard terrain? Details, grass, trees disappear when zoomed out editing. 1 Answer
Forward rendering shadow flicker glitch (with video) 1 Answer
Can I render backfaces on vertex lit terrain detail meshes? 0 Answers
Painting grass with detail mesh and grass texture? 0 Answers