Easy Ambient Occlusion maps

Aka 'pre-shading for lazy people'.

Firstly, download GPU MeshMapper here. It's a free tool (yay!) for generating normal, displacement and AO maps for low poly models, from high poly models... which is not what we're going to be using it for.
(Not that you can't, this is just assuming you haven't got a high-poly model ready-made).

Firstly, export your (UV'd and smooth'd) model to .obj format. If you're using 3dsmax, be sure to have these settings on the export:

news post image

Having exported your model (I'm using a cylindrical carrying case thingie for this tutorial), fire up GPU Mesh mapper.

(Note: I get a warning about Tesselation and Displacement maps not being supported; if this comes up, you can safely ignore it.)

news post image

Ignoring my scribbling, this is what the interface will look like when you first load it.
Step 1: Load the model into mesh mapper. Load it into both the low and high resolution mesh options.

(Note: If you actually have a higher poly version of the mesh with more details on, then obviously load that into 'High Res' instead. It doesn't have to be UV mapped, but the low res model does)

Step 2: Having loaded in the model(s), switch to the Maps tab as highlighted. You should see this:

news post image

(click for the full-size version)

First things first, expand the Common Settings box and up the Texture Dimensions to be the same resolution as your texture / uv map render (256x256 in my case). Then expand the Ambient Occlusion Map box and make sure the 'Generate Ambient Occlusion Map' flag is checked.
If you loaded the same mesh into both options, then go into the Normal Map and Displacement Map tabs and uncheck them (as you won't need them). If you do have a high-res model, then you might want to generate a normal map as well; up to you.
(Note: MeshMapper remembers the settings for these, so you won't have to change this the next time you run it, except occasionally the Texture Resolution)

All that done, go back to the Common Settings box and click the surprisingly easy to miss 'Generate' button. (Seriously, someone had to point it out for me the first time I used it )

news post image

(Note: if you get an error about the UV map being 'out of range', it's because there's something wrong with the UV map; some of the mapped geometry is outside the boundaries of the template and you need to bring it further in)

Meshmapper will automatically save the Map as a dds file called 'MostRecentAmbientOcclusionMap' it the location of the meshes (not sure which one if they're in different directories), but you can go back to the Ambient Occlusion Map box and save it under a different name to prevent confusion / it getting overwritten (I prefer to do this).

AO map generated, you can use it to easily preshade your model in Photoshop by setting it up as a layer above the rest of the texture, set to multiply

news post image

(Note: because I haven't actually made the texture for this model yet, there's nothing for it to actually shade in the first place, so you can see it in it's 'pure' form. The lines are form the UV map template, also set to Multiply at 20% opacity so I can see the geometry, but that layer will be hidden on final texture export)

To see the effect of an AO map / vs not having an AO map, compare these:

news post image

(Left has AO map, Right does not)

AO maps add quick-and-easy depth to textures. Obviously, using a high-res model for this will allow the shading of extra details onto the texture, and it can help give an idea of what's recessed and what's not (useful when deciding where to add scratches to a texture). And, of course, you can also use MeshMapper for what it's primarily intended for as well (generating normal maps from high res models).

A further little note applies on mirrored / overlapping UVs. The cylinder thingie used as the basis for this tutorial, and the little system hob above all had shared UVs. This can occassionally result in errors in the AO map you'll have to fix. Because in both cases I didn't use a high-res model, the issues this can cause were reduced, but be careful when adding high-res details to mirrored sections.

- Guessmyname

View comments ( 6 )

Back to top