1
\$\begingroup\$

This is basically what I mean. I tried to imitate the LOD effect in unity using crossfade LOD but it's not nearly as seamless. I've done some research into the subject but can't seem to find anything about blending foliage in this way so I'm looking for advice. Thanks so much!

\$\endgroup\$
3
  • \$\begingroup\$ I've closed your previous question about smoothly blending grass LODs with this one, since they seem to be about solving the same root problem. \$\endgroup\$
    – DMGregory
    Dec 10, 2020 at 23:06
  • \$\begingroup\$ How many different levels of detail are you actually using? Where do they occur? How are you calculating the crossfade? The video clip is helpful to see the result, but you haven't provided much information about how you are getting those results. \$\endgroup\$
    – Pikalek
    Dec 11, 2020 at 14:38
  • \$\begingroup\$ I'm using 2 LODs one "uniform" material grass and one "complex" material grass with the same colour as the "uniform" one but high occlusion. I'm using unities built-in crossfading.When I get into range the uniform fades into the complex. \$\endgroup\$
    – Bobby B
    Dec 11, 2020 at 14:52

1 Answer 1

3
\$\begingroup\$

One often-overlooked visual aspect of stuff like grass or hair (ie. tufts of stuff sprouting out of a surface) is how the normals affect lighting. Specifically, because the default normals stick straight out of the blades of grass, the grass has normals perpendicular to the ground and are lit very differently from the ground. Instead, point the grass normals straight up along with the ground so the grass is lit the same as the ground.

I discussed this same issue on my blog recently in the context of hair on a character I modeled. Meanwhile, this polycount article discusses the same issue/trick for foliage. In particular, check out these screenshots to see how the grass looks before and after aligning normals with the ground.

The actual mechanics of tweaking normals depends on your art tool. For example, here's an explanation of how to do it in Blender. Obviously generating appropriate normals is very straightforward if your grass geometry is created procedurally.

\$\endgroup\$
3
  • \$\begingroup\$ I think I understand that the key to flat shaded grass is using the normals of the terrain which my grass shader uses, however, I'm not sure if that actually helps the grass fade colours. \$\endgroup\$
    – Bobby B
    Dec 10, 2020 at 19:55
  • \$\begingroup\$ Well it would help make the fade seamless if the two things being faded between have the same lighting, so that the darkness of the colors don't change. But it sounds like you already are using the normals of the terrain for the grass, in which case you just plain need to fix things so all the grass is the same color. Like, it's pretty obvious in the overhead shot that grass outside the circle is brighter. I assumed that was from lighting, but it could just be the shade of green. \$\endgroup\$
    – jhocking
    Dec 10, 2020 at 20:54
  • \$\begingroup\$ But the point of the effect is to have uniform grass at a distance, and complex close to the camera, if I change it to the same color won't it kind of loose that effect. In the gif I linked the grass in BOTW don't seem to have the same color at all but the LOD fade between them is so seamless you barely notice. \$\endgroup\$
    – Bobby B
    Dec 10, 2020 at 22:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .