You are currently browsing the tag archive for the ‘AO maps’ tag.

I did a similar tutorial on just shadow maps a while ago, but now that UV maps have become so popular with Mesh, and Gimp 2.8 is so different from 2.6, I decided to redo it. I’ve also made some mesh items with UV and AO maps, as well as the sculpty logs with the AO maps, so this seemed a good time to update.

I also teach classes on this and other things at the Builders Brewery, a most excellent place to learn things. If you’d like to grab the supplies used in class,  they are by the landing point of my shop.

You can download Gimp for free here.

My friend Zed Tremont of Twice Baked Textures has also made a tutorial in 2 parts on how to use UV and Ambient Occlusion Maps in Photoshop: Part 1, Part 2. The principles are the same in Gimp, and its always nice to see different ways of doing things.

The basics in this tutorial are the same for Photoshop, to tile a texture in PS use Filters > stylize > Tiles …  and set your repeats, use 50% offset  and fill empty areas with unaltered image or inverse image.

Download Textures to Your Hard Drive

Let us begin. First download all of the  UV maps, AO maps and textures that you will be using.  On most viewers you double click the image to open it, and in the lower right of the view pane will be a Save… drop down button. Other viewers you can simply right click and select Save..  Save as png or tga – it really doesn’t matter.  For my own purposes I tend to save textures in png format and sculpts as .tga – but thats just to help my tiny little mind remember what things are.

All of these textures are the same size, 512 x 512 pixels. You may receive UV & AO maps or textures in different sizes. Its important to make all the layers the same size when working like this.

Experiment with textures on your object in-world

Now rez your sculpt or mesh which you would like to work on, in this case its a mesh log.

The mesh log in the class kit comes with its UV texture on it. But I would like you to take a moment to play with it and see how it textures.

Notice that I have helpfully labeled the UV map with the words “inside” and “outside” to help when you use the UV map as a template in Gimp.

This log has TWO textureable faces. The inside and the outside can be textured differently. They both use the same UV and shadow map, or you can open the texture tab and put the bark texture on and it will all be barky.

Or you can put another texture on the inside! Apply the DBS rough wood grey for class texture to the inside of the log.

To texture a different face, the safe way is via the build menu Have the log in edit, tick “Select Face” on the top left area of the edit menu, and then click on the inside of the log – lines and circles will appear showing that that face is active.

Then drag the DBS rough wood grey into the texture window on the build tab.

Yes, you CAN also drag your texture from your inventory directly to the face you want to texture without even using select face. However down that road lies many a ruined floor due to dropped textures…

Notice that the DBS Seamless bark for class sits on the bark at 90 degrees to the expected grain. Thats on purpose – to give a bit of practice here.  Select the outside face of the log using “select face” on the edit menu, then click on the outer face and in the texture tab change the rotation of the bark to 90.

01 2 faces bark faces rotate 90

So now you have two textures on this log, with different settings – the outer one is rotated 90 degrees. Remember that for when we go to work in Gimp.

I usually play with textures in-world first and then go work in Gimp. Because all that matters is how it looks in-world.

Bear in mind that as you  stretch this log (with stretch textures ticked ON), the textures will become more stretched as it gets larger.  If I wanted a really big log, I would increase the repeats of the texture.

Because a custom texture is meant to fit on a sculpt or mesh at the default 1 x 1 repeats, and if its shaded it MUST be at 1 x 1, you want to compensate for that in the texture you are going to make.

Go ahead and change your repeats on the texture tab until the results please you.  If repeats of 1 horizontal and 1 vertical look good for the size of the object in-world,  by all means use that. But often you will want to change the repeats.

Remember that there are TWO faces on this log, and pay attention to note if you are working on both (no single face selected) or the inside only, or the outside only.

For the purposes of this tutorial make the horizontal repeats equal the vertical repeats, and make those repeats a whole number of 4 or less.  Repeating too high in Gimp or Photoshop will blur the texture due to loss of pixels.

02 repeats 2 x 2

For this example I have chosen a repeat of 2 horizontal and 2 vertical for both the inside and outside of the log. If you are using the same repeats for the whole log, you do not need to select face.

While you can modify textures with unequal repeats, lets keep them even for simplicity’s sake. You may want to refer to Zed’s tutorials for hints on how to do that.

Remember these repeats, or write them down.  If you were to offset the textures in any way you would also record that.

Return your texture settings to default

03 return texutre settings to default

IMPORTANT! Now return your texture settings to default. Otherwise when you apply your custom texture at the end of the class you will get a fright and think its wrong. Change all the texture repeats back to 1 x 1 and the rotation to zero.

Do it now and save yourself the crazy making

Layers in Gimp

Ok – now open all 4 of the textures you downloaded in Gimp, you want to open them as 4 layers in one image window – not 4 separate images.

The easy way is to simply click and drag one image into Gimp when its open, then click and drag each of the other 3 to the same image window.

You can also use File > open as layers.

04 4 layers in Gimp

You want your Gimp workspace to look like mine here in the image. Click and drag your layers on the right layers pane to put them into the same order: Shadow map on top, then UV, then the dark bark, then the rough wood.

Hide top 2 layers, rotate bark layer

First hide the shadow and UV maps so we can work on the bark layer. Click the eyeballs next to the UV and shadow layer to hide them. Then click the thumbnail of the bark layer to highlight it with the blue band. Just as you see in this slide.

05 roate bark

Now go to the top Gimp menu bar and select LAYER > Transform > Rotate 90 deg clockwise. This will rotate the dark bark 90 degrees clockwise just as we did in-world.

Small Tiles

Now we will tile the two wood textures in Gimp to the same repeats we used in world.

With the bark layer active, apply the same repeats that were pleasing to you in world on the sculpt using Filters > Map > Small Tiles…  The dialogue shown will pop up.

Just change the segments to what your repeats were – in my case I will change the segment slider to 2. Leave the rest of the window at default. Click ok. This will tile your seamless bark to repeats of 2 x 2 within the same size of 512 x 512.

06 small tilesHide the bark texture by clicking its eyeball, then click the rough wood texture to highlight it, and change the rough wood to repeats of 2 x 2 as well, just as you did for the bark.

Now you have both of the wood layers tiled in the same number of repeats as you did in-world.

Using the UV map as a guide

Now make your UV map layer visible by clicking the eyeball. You will notice that not only did I very helpfully label the inside and the outside, but I also drew a darker black line on it – can anyone guess why?

That line shows where the outside of the log meets the inside of the log on one side (the other is at the upper side of the texture).

On some builds you want a very harsh demarcation, but on organic things I think a fuzzier line is nicer.

Ok so now make your UV layer visible by clicking the eyeball, but you want your BARK layer active by clicking the thumbnail to make it blue. You are using the UV map for reference, but will work on the bark layer.

07 use UV as a gude draw a box

Click the Rectangle select tool to make it active. Then tick ON feather edges and change the number to around 14.

Now draw a rectangle as shown here on this slide. Made the edges wider than your gimp image, put the bottom of the rectangle right on the darker line. Make the top of the rectangle come just barely below the top edge of the UV map.

Cut out part of the bark layer

Hide the UV layer by clicking the eyeball next to it. The rectangle you made will remain active

08 cut out bark

Make sure your dark bark layer is active. Go to Layer > Transparency > Add Alpha Channel

Then go to Edit > cut and remove the bark that you do not want. You can also use ctl + x or on mac cmd + x to cut things out in Gimp.

Once you cut your workspace should look like my image above, with the rough wood showing now.  Remember that if something goes wrong you can use Edit > undo or, just like in SL, ctl + z to undo your recent changes and try again.

Change Mode

Now make sure the top AO shadow layer is visible (click eyeball) and active (click thumbnail to highlight).. Go to MODE above the layers and change the mode from Normal to Overlay.

09 change mode

There are LOTS of options here to choose from – and the slider makes the choices infinite. but for now just change to overlay at 100%

Many people also like to use multiply or even grain merge for shadows. Do play around with different modes and see their effect on the layers below them.

10 overlay

BAM! See how nice that looks? now the inside is all shaded, and a grungy wood. And the outside is lit up and barky.

And look at that nice soft line where the bark meets the rough wood. Gogo feather edges.

Save as .XCF and .PNG

Saving! Now is the time to save your work. First save all your layers in Gimps native format – XCF.

Always save your work with layers so you can go back and make changes.

But we can not use an XCF file in Second Life.

11 saving xcf pngSo export it as a png – simply type in .png for the extension. Then save it to a logical location, I save to the same place as my XCF file. In your final export window slide the slider to zero compression – we want ALL our pixels.

Then click export.

You now have 2 files, an XCF with all the layers, and a PNG that you can use in SL.

Remove the Alpha from the PNG

Let us work now on the PNG file, so go ahead and open it via File > open recent, or command +1 or probably ctl +1 on a pc to open the most recent file you exported or saved.

Ok now we need to remove the alpha in this png. Accidental alphas are terrible things.

Make very sure you are now working on the exported PNG image that has only ONE layer.

12 png remove alpha

Because we created an alpha when we cut out that bit of the bark, we now need to remove it.

Remove the alpha by right clicking the layer and select “remove alpha channel”. For future reference, if that option is already greyed out, the alpha is not there to remove.

Now this is critical – go to File > Overwrite whateveryounamedit.png to save this change. If you do not, you will loose your changes.

Then exit without saving – you cant save a png in Gimp, only in XCF. But youve already saved it by overwriting (or exporting if you’ve given it a new name).

Check the texture you made in-world & local textures

Check to see see how your texture looks in-world. You can check without paying for upload by using local textures.

To use local textures go into edit on your log and go to the texture tab. Double click the texture window to open the texture picker. Underneath the picture of the texture you have 2 buttons, Inventory and Local. Tick local.

The tick the Add button to bring up a window to browse to your PNG. then select Choose. That texture will now appear in your Pick Texture window – highlight it and it will appear on your object.

Now whenever you overwrite your png with the same name – the texture on this object will update!

Just remember that only YOU can see this texture, its only grey to anyone else.

Shadows Only

Now, notice that the outside texture, the bark, has become significantly lighter because of the overlay effect. What if we wanted ONLY shadows and no highlights?

Well thats quite simple. On your XCF file with the layers, make sure that the shadow or AO layer is active, and go to Color > Color to Alpha and make white the color to change to alpha.

13 color to alpha for only shadows

BAM! this gives you only shadows, but no highlights.

You could also do the same but color to alpha out the black if you only wanted highlights, but no shadows.

And thats your basic lesson on how to use UV and AO maps in Gimp for Second Life or InWorlds or whatever your virtual world of choice is. Go make pretty things.


Blogs I Follow

Postcards From Tipsy

Camper + Otter + Cow = Adventure!

Mona Eberhardt

Living Virtually

Botgirl's Digital Playground

there otter be a law...

B&B Spiritual Supplies

A Botanica in the Second Life® virtual world

Pussycat Catnap's thoughts

A blog of advice and musings on life in Second Life


A SL blog by Nicole Twigvald


News on Tiggerworks, projects, plans and any assorted ramblings