Saturday, October 22, 2011

Making Believable Grass

   Grass is one of the most important things in a game environment and adds immensely to the believability of the scene. Compare the following, the same scene with no grass or bushes and then with:

   Without grass it's easy to pick up the tell-tale signs that you're playing a game: you can see the sharp edges of the ground mesh, see the perfectly sharp edges where objects intersect the ground and each other, see the flat ground textures etc.
   I'll just go over some of the things I've learned while painting and creating grass in 3D.
Think of the grass and ground as a single object.
   You don't need to do this if you can make all of the grass with geometry, but that's a lot of geometry. So if you can't do that it means you're going to have to use a ground texture that looks like grass, the problem with this is that a simple flat texture looks flat, so to add depth you add grass geometry.
   When making the grass it's important to see it and the ground as a single object, not two separate ones. In relation to the ground texture the grass is simply breaking up the “flatness” of it and tricking you into believing that you're seeing real grass instead of a computer's representation of it. Therefore your grass and ground texture should compliment each other.
   This brings me to the second point:
The grass texture should be different but extremely similar to the ground texture.
   This may at first sound confusing, so let me explain what I mean. You don't want the grass to be so different it looks like you stuck a few textured planes on the ground (which is pretty much what's happening), yet you also don't want them to be so similar that the grass melts into the ground as if invisible, that would defeat the whole purpose.
   You need to make the grass look as though it belongs, it should match (although not perfectly) the saturation and value of the ground beneath it while being visible. The best way to do this is to have the base of the grass join the ground as seamlessly as possible yet have the top different enough to be visible. This will give the best results.
Final touches
   Toward the end you can add some extra details that will make the grass look a lot more interesting and realistic as well.
  • Ambient Occlusion – this is a tricky one, you want enough for the effect to be visible but not so much the grass sticks out. Carefully darken the base of the grass and test to see the results. You'll be able to get away with a bit here but go too far and the grass will start to separate from the ground.
  • Lighten ends – lightening the ends of the grass strands can really help make it pop out from the background, you want the grass to be grounded and blend into the ground texture but you certainly don't want the top to be lost. This will help add depth.
  • Colour variation – real grass is not made of a single colour, there are dead strands, strands that have subsurface light scattering going on, disease spots, reflections and all other manner of things that influence the colour. Putting in some of these colours makes it much more believable. Good colours to use are yellows, oranges, browns and greys.
   Below you can see the grass I used for the previous scene as well as the ground texture it was designed to sit on:

   I hope you got something out of this, good luck :)

No comments:

Post a Comment