How to Bake Ambient Occlusion Textures in Your Farming Simulator Mod

By Jason van Gumster, Christian Ammann

One way to add detail to your Farming Simulator mod is to bake textures. Inspect the world around you, and pay attention to how light bounces all around, reflecting off of everything and subtly brightening everything. Minor bits of reflected light let you see details you may not otherwise notice.

In computer graphics, this phenomenon is referred to as global illumination. The general case involves subtle increases in ambient light, but global illumination also covers more interesting cases like light bouncing off a green wall and thereby giving the rest of the room a slightly greenish hue.

Generating global illumination effects can be an incredibly computer-intensive process, and most video game engines don’t support any kind of full-blown global illumination. That said, global illumination has another side effect that many game engines can take advantage of. Go back to inspect-the-world mode.

Imagine you’re reading a book. Keep the book open and arbitrarily rotate the book around in front of you. Notice that no matter how much light is bouncing around and adding extra light to everything, the seam at the center of the book consistently remains darker than the pages.

What you’re observing is a side effect of global illumination. In computer graphics, this effect is often referred to as ambient occlusion (AO). Ambient occlusion is most certainly not global illumination. However, the effect can be created pretty quickly and, more importantly, that effect can be baked into a texture, kind of like a normal map.

Generally speaking an AO map is a grayscale image wherein dark pixels are surface details that tend to remain dark and light pixels are surface areas that are typically smoother and remain light.

Traditionally, most game engines don’t use AO maps directly. You’ve had to mix them with your diffuse map, directly influencing your model’s color. In GIANTS Engine, however, AO maps are used directly. They just happen to be packed into the specular map.

You first need to generate your AO map. You can typically do it by using the rendering engine built into your 3D modeling program. This way you can add surface details to your diffuse map without painting them by hand. It’s even truer if you’re already using a high-resolution model to generate a normal map.

The steps you take to generate, or bake, an AO map are roughly the same as the ones you use to bake a normal map:

  1. Select the object for which you want to bake an AO map.

  2. Toggle into Edit mode (Tab).

  3. From the UV/Image Editor, create a new blank image at your desired size.

  4. Toggle back into Object mode (Tab).

  5. In World Properties, make sure Ambient Occlusion is enabled.

  6. (Optional) In the Ambient Occlusion panel, change the Blend Mode drop-down menu from Add to Multiply.

  7. (Optional) In World Properties, enable Environment Lighting and set the Energy value to 0.5.

    Technically, it’s more accurate to leave the Blender Mode and Environment Lightning properties at their default values, but these settings can generate more pleasant results.

  8. In the Gather panel of World Properties, change the Sampling drop-down menu from Constant QMC to Adaptive QMC (this step typically yields cleaner results).

  9. Still in the Gather panel, enable Falloff and adjust the Strength value to taste.

    You can start at 5.0 and tweak from there.

  10. In Render Properties, go to the Bake panel and change the Bake Mode to Ambient Occlusion.

  11. Still in the Bake panel, click the Bake button and wait for your AO map to finish being generated (depending on the detail of your mesh, it may take a while).

    image0.jpg

If you have collision meshes for your mod, disable their visibility both in the 3D View and when rendering. If you don’t, the proximity of those collision meshes will make your AO bake look quite wonky. You may also want to separate possible moving parts into their own objects to prevent static shadows in your bake.

Save your texture to a real PNG image outside of Blender. Not only is it how you can guarantee that your bake is saved, but it also is what you need to merge the AO bake with your specular map in Photoshop. And although GIANTS Editor doesn’t directly use this texture, that’s no reason to break convention. Name your AO texture something like myFantasticMod_ao.png.