December 21st, 2009
Grass is an especially difficult material to convey in a flat texture, because grass isn't flat. In fact, it's not even a continuous surface! For this reason, we'll eventually need a 3D grass effect in order to achieve really high fidelity. However, it's still important to have a good base terrain texture in case the fancier grass is disabled or out of rendering range. The only way to render grass in a flat detail texture is to make it flattened and downtrodden, like this:
This looks pretty decent, but it feels a bit too 'hard' to me -- the lighting overemphasizes small details, making it look rigid and unyielding. Softness is one of the most important properties of grass, so we need to soften the lighting. I decided to try the same technique we used for fur normal maps ( as described in this blog post), layering the normal map on top of blurred copies of itself. This softens the lighting without losing any detail. Here's how that looks:
If you're not a graphics programmer, you're probably wondering, "Did these guys mess up and post the same image twice? These images look exactly the same!" If you can't see the difference, try opening the images in separate tabs and switching from one to the next; you should be able to see it. If you look at the close-up terrain in the bottom-left of the image, you can see that the hard version looks like it's carved out of rock or wood, and the soft version looks more like dead grass -- which is what it's supposed to be! The softened normal maps emphasize clumps more than individual blades, which matches my experience with grass in real life.
Do you have any other ideas about how to make the grass look softer just by changing the texture images? We're going to add real grass later, but we'd like to have a good base layer as well!