You are currently browsing the tag archive for the ‘Tutorial’ 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.

Advertisements

This post is now outdated due to changes in Gimp and Second Life, check out the newer post for a more current tutorial.

Ive had requests to show people how to use the shadow bakes or ambient occlusion textures that they receive with sculpts. These are greyscale textures that you sometimes receive when you buy a sculpt. They add a very nice touch of shadows and highlights to the sculpt when added to a texture.  This is a tutorial on how to get started in using them in Gimp.

I assume that you know how to apply and manipulate textures in world, and open Gimp and use layers.

The principles 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.

This tutorial was made with Gimp 2.6, Gimp 2.8 tips inserted for the saving steps. These steps also work for a mesh with a single face

I highly recommend using a viewer that allows temporary uploads – do a temp upload at each step and apply it to the sculpt to be sure you are on the right track.

    1. While in your virtual world of choice, rez the sculpt.  Scale and size it so it pleases you,  and play with textures on it to find one that looks nice.
    2. Repeats & Rotation – if your texture looks nice with no change in repeats or rotation, proceed to step 3. If you do need to change the repeats, keep them equal to each other for this tutorial*- so 2 horizontal and 2 vertical, or 3 x 3 etc… You really don’t want to go much over 4 x 4 repeats right now.  Bear in mind that the more you tile the texture in Gimp, the more resolution will be lost.
      * you can have uneven repeats by scaling layers and duplicating them, but it is much easier to start with equal repeats.

      Log sculpt with bark texture set at 2 horizontal and 2 vertical repeats

    3. Download that texture to your hard drive and open it in Gimp. In my example I’m using a seamless bark texture from my new hollow log set. If you rotated 90 or -90 degrees, you can apply the same rotation in Gimp via Layer > transform > rotate 90 degrees clockwise or counter clockwise.
      • Once you have downloaded your texture – go back to your sculpt and put any texture settings that you changed back to default (horizontal and vertical repeats to 1, no rotation).  Your finished texture should fit on the sculpt with no changes on the texture tab.
    4. Apply the same repeats that were pleasing to you in world on the sculpt using Filters > Map > Small Tiles…

      Filter > Map > Small Tiles …

      And set your repeats to the horizontal and vertical repeats that looked good in world using the segment slider. Leave the other settings at default. Click OK.

      Small tile repeats to 2 segments

    5. Download your shadow bake or ambient occlusion texture and open it in Gimp.
    6. Make sure both of these images are the same size! If not – resize one of them to match the other (Image > Scale image).  In my example both textures are 512 x 512. Some shadow maps are small – like 256 x 256, go ahead and scale them up to match the texture size.
    7. Layers – Either use File > Open as Layers to open the shadow layer over the texture layer OR
      Left click and drag the shaded texture thumbnail from its layers window TO the image window of the texture you just did the small tiles thing on. Release to drop into the window
      If you do not see the layers window as shown go to Windows > Dockable Dialogues > Layers

      Left click and drag the shadow thumbnail from layers window to the big texture image window

      Drop the thumbnail into the texture window

      you now have 2 layers with the shadow texture on top

    8. SAVING– Now is a very good time to hit save. Here is how my process goes:
      • First save as funwithshadows.xcf  to save all the layers. File > Save as …  Just type .xcf into the end of the name, pick a name that makes sense to you. Pay attention to where you are saving. This is the same for Gimp 2.6 and 2.8.

        save as anyname.xcf

      • Then go to File > save a copy as… and change to funwithshadows.png (only for Gimp 2.6)
      • For Gimp version 2.8 – you must use File > export, and for later saves use the Export To <name> You will NOT see the flatten information below, but everything else is similar.

        save as anyname.pngHit save and on the next window tick flatten for no alpha

      • click save and on the next window tick Flatten to remove the alpha:

        tick flatten

      • Click export and on the next window deselect background color and drag the slider to zero compression.

        deselect background color and slider to zero compression

      • Now you have two files – the one with layers to keep working on and one to upload.

      On later saves just hit File > save (or ctl + s) to update the .xcf file and File > save a copy as… to overwrite the .png file. BE SURE TO TICK FLATTEN for the .png or you gonna have an alpha texture on your sculpt that looks uuuugly. Alternatively – remove alpha from a .png by going to Layers > Transparency > Remove alpha channel.

      For Gimp 2.8 and above, you will not get the flatten option, so open the .png that you created one more time (use File > open recent) and then go to Layers > Transparency > Remove Alpha Channel. You only need do do this before you upload to SL, but it is critical to remove the alpha channel. Then use File > Overwrite to save this change

    9. Apply the shadow – now for the fun part! in your Layers window you will see up at the top a drop down box called Mode, and a slider for opacity. Change the mode from Normal to Overlay. Lower the opacity slider if you wish.

Change Mode from Normal to Overlay

      BAM! Look at your main window! You now have highlights where the shadow texture is white, and shadows where it is black!

Overlay effect

        Save the .xcf and .png again and upload the newly shaded  funwithshadows.png to your world and admire your creation.

Remember to change the repeats and rotations back to default on the sculpt!

Log with shadows and highlights!!

      Congratulate yourself and have a celebratory martini!

Other fun things to try with the shadow texture in Gimp:

      • Shadows only: If you want only shadows and no highlights, make a copy of the shadow layer (right click duplicate) and make the original shadow layer invisible by clicking the eye next to it (this leaves you an unchanged back up). Work on the layer you copied – make sure its selected.Remove the highlights by going to Colors > Color to Alpha and select white in the color box (it should be there by default)

        Color to Alpha…

        Change White to Alpha

        This will make it so you only have shadows, but no highlights.
        You can do the same to make only highlights by changing the color choice from white to black.
        When I use this color to alpha function, I often change the mode to grain extract or grain merge or burn or dodge and yank the sliders about.

      • Play with different modes and the opacity slider:
        try all of them to get a feel for what they do. Besides overlay I often use grain merge,  multiply, darken only…
      • If a layer is not giving you enough oomph with the slider at 100%, duplicate the layer and try different slider settings and mode options.

Remember to save often! Remember that temp textures go away after a while in world!

Categories

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

Daniel Voyager's Blog

Second Life, OpenSim & Sansar News

SmileyOrc

A SL blog by Nicole Twigvald

TiggerWorks

News on Tiggerworks, projects, plans and any assorted ramblings