You are currently browsing the tag archive for the ‘ambient occlusion layers’ tag.
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.
- 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.
- 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.
- 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.
- Apply the same repeats that were pleasing to you in world on the sculpt using Filters > 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.
- Download your shadow bake or ambient occlusion texture and open it in Gimp.
- 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.
- 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
- 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.
- 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.
- click save and on the next window tick Flatten to remove the alpha:
- Click export and on the next window deselect background color and drag the 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
- 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.
- BAM! Look at your main window! You now have highlights where the shadow texture is white, and shadows where it is black!
- 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!
- 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)
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!