1
0
mirror of synced 2024-11-23 23:30:58 +01:00
0 Baking Ambient Occlusion (Blender)
KillzXGaming edited this page 2019-06-07 18:29:30 -04:00

Mario kart 8 (bake maps) and many other games use ambient occlusion maps. These can look like this for example

To create these effects, you want to create a second UV map. To do this you go here and add one.

Press the tab key to go into edit mode, and press U and Smart UV project.

Then set the Island Margin to 0.05. You can make it larger if necessary but smaller can give a larger area for the islands.

This is to give our UVs some space for the baking process. You may need to experiment with unwrapping more later depending on your model.

Now lets check our UVs. Make sure that UV that was added before is selected. Now drag the window on the right to create our UV window.

Like this

So now we can see our UVs. We want to now add a texture to bake on.

For the settings window, the width and height can be important as a higher size can give better quality but be slower at baking. For now we will keep it this size. We can resize it to be smaller later if we need to for in game.

Before we begin baking, make sure to hide any models you don't want as i have done here (one we want to show is in blue)

Now go to the camera tab.

We are almost ready to bake. Before we do this, save your scene (File - Save As) as a .blend. If your model is very big, like for a map, resize it so is a bit smaller. Larger models can take longer, and may give off less shading than desired. You may need to experiment with the size after baking if necessary.

Here we will bake our ambient occlusion map. You may have to adjust the "Margin" option to be smaller, like around 2 - 3 depending on the texture size. Check "Normalized" option, and then press the bake button. Then change the shading to texture view to preview our results.

This doesn't look too bad! To improve the quality we need to go to this tab, and increase the amount of samples. Make sure ambient occlusion is checked.

The higher the samples, the better quality the texture will look, however will take longer to bake.

Go ahead and try again with 30 samples. This may take a few minutes to bake, but will produce a much cleaner result than before and not look so noisy.

Now save your texture!

So that concludes our baking guide for blender. Feel free to use this on drivers, karts, and maps alike to greatly improve the look.

For setting up in game, after the model is imported, make sure to goto the materials under model, and go to the param tab. Then edit the highlighted params to be 1, 1, 0, 0. These shift the UVs for the bake maps, and must be kept 1,1,0,0 as we don't need these.

If the bfres doesn't have these parameters, that is fine, it does not require editing.