Monday, August 2, 2010

Adding a custom stamp to sculpt maps.

Sculpted prims have been around for quite a while now, and it is widely known that you can hide the sculpt map from view by applying a transparent layer mask to the sculpt texture itself. While doing this is an effective method to protect sculpt maps from prying eyes, simply making the sculpt texture invisible is also very boring.

Today I'm going to teach you how to spice it up a bit! This is something I've seen people ask about every now and then and thought a tutorial was long overdue.

First off, we'll need a sculpt. Here is one I quickly made in Blender for this tutorial...I don't know what it is suppose to be either.



Here is the actual sculpt map:



Now that we have something to work with, let's open it up in The Gimp. It will look like this:



Next comes the important part. Go to the "Layers, Channels, Paths etc." window and right click the layer with your sculpt map, if you don't have anything else in the image (which you shouldn't at this point), it will simply be the default "Background" layer.

The menu that pops up has a large selection of options, the one we want for this tutorial is half way down named "Add Layer Mask...".



Click this and a box will pop up with a few more options. The one we want this time is the second option on the list, which is "Black (full transparency)". Select this and click "Add".



Once you've done that, you'll notice that your image looks a bit different. If all has gone well, it will look like the image below.



Now, if you're happy with a boring blank sculpt map, right click the layer with the sculpt map texture and hit "Apply Layer Mask", then save the sculpt as a .tga file and you will be done! However, if you wish to make your protected sculpt map look a little more interesting, keep reading.

The next step is to make a new image with the same aspect ratio as your sculpt map. Ideally, it will be the same size too (64x64 in this case), but that is not necessary at this point. Next to the "Fill with" option, be sure "Trasparency" is selected, otherwise we won't get the effect we want.



Here, you can see the resulting blank 128x128 pixel image I have created.



Now comes the fun part! Set your foreground color to solid white, which has an RGB (Red, Green and Blue) value of 255, 255, 255 or an HTML notation of "ffffff".



Once this is done, you can be as creative with the image as you like, so long as you don't use any color other than solid white. If you want different shades, simply adjust the opacity of the layer.

Your sculpt stamp can be anything you want it to be, from something as simple as typing in your name and adding a logo in the background (which is what I do), to an elaborate custom drawn design, the choice is up to you. Just keep in mind that you don't want to add too much detail since the image will have to be scaled down in the end.

Here is what I came up with after a short while:



As you can see, it is a rather simple, yet effective design. Once you have something you are happy with, I strongly suggest saving the sculpt stamp as a .tga image so it can be easily copied for use with other sculpt maps later on. It may also be worth saving it as a project file (.xcf for The Gimp) in case you want to go back and make some changes to your stamp later on.

Since the sculpt map for this tutorial is a 64x64 image, I have scaled down the sculpt stamp to be 64x64 as well. If for some reason your sculpt map is a different size (for example, an oblong sculpt), scale your sculpt stamp accordingly.

Here is the stamp scaled down to 64x64:



Now that we have a completed sculpt stamp, it is time to add it to our sculpt map, but before that, there is one more step that may have to be done.

If you've used multiple layers to create your stamp, like I have, you will have to merge them together before exporting it directly from the Gimp project file. Otherwise, you can simply copy it from the previously saved .tga file without having to merge any layers.

Merging layers is easy, simply right click any of the layers in your sculpt stamp and select "Merge Visible Layers...", which is the next to last option in the list. If you've done things like rotate text, or have any layers which overlap the 64x64 work area, select "Clipped to image" in the pop up window, then click "Merge".



Once your sculpt stamp is ready, copy it by going to the "Edit" menu and selecting "Copy" or by hitting the CTRL + C keyboard shortcut. Now, go back to the window with your sculpt map and paste your stamp in by going to "Edit" and selecting "Paste" or with the CTRL + V keyboard shortcut.

If all went well, it should look like this:



We're almost done! The next step is to anchor the newly pasted layer, there are three ways we can do this. The first is by going to the "Layer" menu and selecting "Anchor Layer", the second is by going to the Layer window, right clicking the layer itself and selecting "Anchor Layer" and the last is my preferred method of just pressing the keyboard shortcut CTRL + H.



Great! All that is left is to right click on the layer and select "Apply Layer Mask", which is halfway down the list.



Now just save that as a .tga image and upload it to Second Life! Here's the resulting sculpt map in-world with its shiny new protective stamp:



Ta da! Wasn't that easy? Once you're used to the process, this can easily be done in just a few moments.

Here's a quick rundown:

Open the sculpt map texture, add layer mask.
Open the sculpt stamp, copy it.
Paste the sculpt stamp into your sculpt map.
Apply layer mask.
Save as .tga.
Done!

I hope this tutorial has helped a few of you!

Tuesday, July 27, 2010

Old news.

The post here was about an old topic of no current significance, it has been removed to clean things up a bit. If you wish to read the original post, please feel free to view the backup posted on a fan's tribute blog linked below.

Monday, July 12, 2010

Old news.

The post here was simply rant about some annoying things that had occurred, it has been removed to clean things up a bit. If one wishes to view the original post, please feel free to view the backup which was kindly provided by a commenter below.

Tuesday, July 29, 2008

Gimp Tutorial: Cutting an image from a solid color background.

This is something I've seen people ask about a lot, so I thought I would write up a tutorial on how to do it. The usual answer people give is to use the smart select tool, but there is a much better and easier way to get the desired result. So with that said, I present to you my first tutorial! Be sure to click the images for larger versions.

First you have to take your picture, I suggest starting with a high resolution snapshot since it makes working with finer details easier. You can find this option in Second Life under the Advanced (previously Client) menu. If you don't have this menu, hit Ctrl + Alt + D on a PC, or Opt + Ctrl + D on a Mac to show it and enable said feature. Now your snapshots will be much larger, just remember to turn this function off if you don't need it since the resulting screenshots also have a larger file size, which may be a concern for some of you.

picture

If you are taking a screenshot of an avatar, you should also turn off foot shadows, which can be done by pressing Ctrl + Shift + F5.

Now, open your image in The Gimp and select the part you need. Once you've done that, hit Ctrl + C to copy it, then go to Edit > Paste As > New image.

After you've done that, select the Color Picker Tool and click the solid color you wish to remove, it will now appear as the foreground color in the main Gimp window. Click that and you will see the HTML notation of the color you just selected. Highlight that notation and press CTRL + C to copy it, since we'll need it.


Totally didn't crop the image.

The next step is to go to Layer > Transparency > Color to Alpha. You will see a box pop up with "From: *Color Box Here* to alpha. Click that color box and color picker window will pop up with another HTML notation field. This is where we paste (Ctrl + P) the color value we just copied.



If all went well, your image should look like this:



If it is not transparent, be sure your image is not on the "background" layer, since for some reason The Gimp doesn't let you make that transparent. If that is the case, just duplicate the layer, delete the Background and try again.

You image should now completely lack the color you selected. What we want to do now is add that color back to the proper bits. To do this, create a new layer named "Solid", and do File > Fill with FG color, which should still be your selected color.

Place this new "Solid" layer under your alphaed picture, it should now look just like it did before we started!

Go back to your picture layer and right click the image, click Layer > Transparency > Alpha to Selection. This will fill your image with the "marching ants" selection effect. Press Ctrl + I to invert that selection and go back to the "Solid" layer.



Now things will start taking shape, with the inverted selection on the "Solid" layer, press Ctrl + X to cut it away from the image. You will now have a neat looking semi transparent layer under your picture. Duplicate the "Solid" layer and name the new layer "Transparent".


Great!

Next, go to the "Solid" layer again, right click the image and do > Layer > Transparency > Alpha to Selection, then Ctrl + I to invert the selection.

Now go to Select > Grow, type in "1" and hit ok. Doing this helps remove any background color leaking out from the sides of the final image as well as remove some weird artifacts that would otherwise show up when we change the alpha threshold.

The next step is to to go to Layer > Transparency > Threshold Alpha. Set the Threshold to zero and click ok.

Before:


After:


It's looking good, isn't it? We could use it just fine as it is, but we made that "Transparent" layer for two reasons. The first reason is that with the "solid" layer shrunk by one pixel, having another semi-transparent layer under the picture gives the edges a softer look.

The second reason is that it lets us preserve the transparency for things like hair or lace. Check the image below, do you see the solid color showing through on the hair? We are going to fix that!



Select the "Solid" layer and have the other two layers on top of it visible so you can better see what you're doing. Using the Free Select tool, zoom in and select the bits that should be transparent and cut them out with Ctrl + X as you go along.


That's much better!

Once you have cut away the bits that should be transparent from the "Solid" layer, merge all visible layers, save it as a .tga file and you're done!


Yay, done!

I hope this helps whoever may need it, good luck!