Wednesday, September 1, 2010

[DOC-MESH] Ambient Occlusion Map? UV Layout? How to use them

Ambient Occlusion Map? UV Layout? How to use them


Your mesh package comes with "Ambient Occlusion" maps, and you don't what these gray scale images are for? You've never heard about the UV layout and don't know what the guide image is for?

Then continue reading.

TABLE OF CONTENTS



WHAT IS AN AMBIENT OCCLUSION MAP?

An ambient occlusion map, is a texture generated inside the modeling program used to create the mesh object. This texture shows in grayscale: the darker areas are areas where light is occluded more than lighter areas, and so by using these maps, we're giving more depth and realism to our textures.

They are named, shortly, AO maps (AO map: Ambient Occlusion map).

Although SL's viewer is able to render this (V3 and FireStorm, at least), so objects have a more realistic appearance (not only we see the effects of lights, but now we can also see the shadows), it's a very high-consuming resources feature which not all people may have active all the time.

To emulate this effect, which really adds life to the furniture, the ambient occlusion maps are used. "Somehow", we have to add these shadows to the texture that we plan to apply on to an object.

How do we do this?
That's explained on the "HOW DO I USE THE AMBIENT OCCLUSION MAP?" section.


WHAT IS AN UV LAYOUT?

Unlike sculpt prims, mesh objects may have faces that don't use the full texture, but only the part of the texture delimited within the UV layout.

We understand here that an "UV layout" is a texture generated inside the modeling program used to create the mesh object, so it shows us the edges that delimit the faces of the mesh.

Its purpose is to give us a visual reference of where on the texture we have to paint.
You would use this in conjunction with the AO map. This is explained on the "HOW DO I USE THE UV LAYOUT?" section.


HOW DO I USE THE AMBIENT OCCLUSION MAP?

To use it, you need to:

  • Download the AO map to your computer.
  • Download the texture you wish to apply the shades on, to your computer.
  • Manipulate both textures within a graphics program that supports layers.
  • Upload back to SL the resulting texture.

Q: HOW DO I DOWNLOAD A TEXTURE FROM SL TO MY COMPUTER?

Depending of the viewer you have, this is done differently.

- Open your texture within SL, wait for it to load.

V1-Style viewers: File menu, "Save to disk" option.
V2-Style viewers: The texture window has a button on the bottom part that says "Save as TGA". Click and save.

In both cases, make sure you type the image extension (.tga for example) at the end.

Q: WHICH GRAPHIC PROGRAMS SUPPORT LAYERS?

The following list is not fully inclusive, but just some programs that you may use:

  • GIMP
  • PhotoShop
  • PSP
  • Krita

If you know of another program that supports layers, then that program is ok.

Now that we know how to download a texture from SL to our computer, and which program to use, let's outline the steps that we should follow. Every program has a different way to name the procedures, so please, consult the documentation of your program of choice to learn how to do this, if you already don't know how.

  • Open the texture you want to apply the shades on in your graphics program.
  • Open *AS LAYER* the *AO map*, *above* the texture.
  • Change the "layer mode" or "blending mode" of the *AO map layer* to Overlay, or Burn, or Grain Merge, or Multiply.
  • Experiment with the different blending modes as well as the opacity of the AO map layer before you decide which to apply.
  • Save as an image that contains the "merge" of the two layers.

IMPORTANT: If your texture should not contain transparent areas, make sure that you flatten it before saving. Do not save the alpha channel in this case!

  • Upload the new texture to SL.
  • Apply the resultant texture normally to your object.

When you do this, you have "baked" the shadows on the texture.
Some creators may offer, apart than the mesh kits with the AO maps, add-ons consisting of texture packs with shadows already baked that will fit the mesh perfectly.


HOW DO I USE THE UV LAYOUT?

To use it, you need to:

  • Download the UV layout to your computer.
  • Download the texture you wish to apply following the shape of the mesh, to your computer.
  • Manipulate both textures within a graphics program that supports layers.
  • Upload back to SL the resulting texture.

The questions "HOW DO I DOWNLOAD A TEXTURE FROM SL TO MY COMPUTER?" and "WHICH GRAPHIC PROGRAMS SUPPORT LAYERS?" have already been answered on the "HOW DO I USE THE AMBIENT OCCLUSION MAP?" section.

Now that we have the textures:

  • Open the texture you want to use along the surface of the mesh, according to the UV layout, in your graphics program.
  • Open *AS LAYER* the *UV layout*, *above* the texture and *lower the opacity* so you can see the lines and your work.
  • Manipulate the texture until you get an arrangement that satisfies you.
  • You may want to open *as layer* the *AO map*, *above* all the composition, to apply shadows.
  • Do not forget to HIDE THE VISIBILITY of the UV LAYOUT layer once you're finished! (or the lines will show on your mesh.)
  • Save as an image that contains the "merge" of all the layers you've used.

IMPORTANT: If your texture should not contain transparent areas, make sure that you flatten it before saving. Do not save the alpha channel in this case!

  • Upload the new texture to SL.
  • Apply the resultant texture normally to your object.


I wish this information helps you in using ambient occlusion maps and UV layouts for your mesh objects in your creations.

-- Auryn Beorn