Creating Realistic Environments for the Blender Game Engine

Here's the little island we'll be improving:

In all likelihood, your game art is not as bad as this, but this does demonstrate quite a few of the problems I've seen in beginner art. We'll use techniques of shading, texturing, and modeling to make this island more realistic.

Shading

Shading is how we simulate lighting in the game engine. Shading defines light and darkness on your models, and is one of the most important tools for adding realism. The easiest way to shade your models is to make them light-sensitive. Select the model you want to make light-sensitive, press F to enter UV face-select mode, and press W to open the Specials menu. (It's important to memorize hotkeys, especially unintuitive ones like this one.) Select Light from the Specials menu.

Our horrible little island is more realistic already! Real islands aren't faceted like this, though.



<<With the island still selected, press Set Smooth in the Edit Buttons.

Now that it's smooth, the island looks much more real. Here's what it would look like if we set Light for all the objects:

Light sensitivity is not a good solution for inanimate objects, though, because it eats a lot of processor power.

Blender has another light-simulating feature, though, which simulates the light only once, then bakes it to the object's vertex colors. Simply select the object you wish to apply the effect to, and click the VertCol bake button in the Edit Buttons.

The VertCol baking option is great when you're in a hurry, but the result tends to be kind of dark. Adding more lamps can help remedy this problem, as the values are calculated from the scene's lamps. Here's the same scene, with vertex colors baked from two lamps:

The last shading method is to paint the vertex colors by hand. This is my preferred method because it gives much more control, but it does take much more effort. If you decide to shade your models this way, make sure that you try to simulate the light correctly. Try to remember where the light is coming from, and shade your models accordingly. The lightest sides will be the ones facing the light.

Hand-Painted Gradients

Darkened corners can improve realism

In general, when painting rounded models like Suzanne I use the Vertex Paint brush, whereas with angular models such as buildings, I select the faces individually and fill them using the Set VertCol button. Sometimes I'll also add a slight gradient with Vertex Paint.

To learn how to shade well, pay attention to your surroundings. Try to learn which areas are brightest or darkest. You may want to run some radiosity or Ambient Occlusion simulations in Blender for research. (Don't use Radiosity output in the game engine, though--- the models it generates are extremely complex!)

Careful use of vertex colors can do wonders for your game environment. In the real world, one never encounters an object without shading, so it's important to keep this in mind when making your game environments. Shade everything, no matter how small it is!

Note: Since this article was written, another shading tool has arrived in Blender, the Render Baking tool. This allows the user to use Blender's rendering engine to create shading for textures. A complete description of this tool is currently beyond the scope of this article, but you can find out more about it from Snailrose's tutorial.