Second Life Tutorial – Using the newly supported .png format to create transparent textures in Photoshop!

This is the first in what I hope will be a series of informative tutorials around creating content for Second Life. I will focus on Fashion in particular as that is where my experience is mostly, but these techniques can also be applied to other content.

I am going to start with creating transparent textures for clothing layers. This technique can also be used for creating any transparent texture for Second Life.

Until recently the only file format that properly displayed transparent files was .tga. Now I don’t know about you, but my PC will not display .tga files as thumbnails and therefore I cannot view them, without having to open them in photoshop. Needing a 3rd party program to manage my .tga files added to my frustration, so when I saw that SL would support .png files, I was excited, having had a lot more experience with the ability of PNG files to do transparancy in forum signatures and so forth – used properly, it’s a very cool image format!

PNG transparency is very simple. There is no need to create an alpha channel, as you need to do with .tga files. There is no need to design an added layer into your texture to cancel out the halo created by the anti-aliasing (grey pixels between the black and white sections) on the alpha channel. There is no need for any extra steps or actions or plugins. You simply create the texture, however you do it, upload it to SL, and use it. The transparancy of the paint on your canvas corresponds directly with the transparancy of the texture when it is loaded into SL.

The first step to creating an article of clothing is to get the right templates. You can download templates from the following links. These templates have been created by some very helpful people, and they really work!

Chip Midnight’s Templates

Robin Wood’s Templates

These files are in PSD format to be used in Photoshop.

2. Open the upper layer template to make a shirt. (note, you can clicky on any of the below images for a closer look at them)

Note, this tutorial is not to demonstrate HOW to paint clothing, it is to demonstrate how to use PNG files for transparent textures. The how-to paint clothes will come later 🙂

Create a new layer above your template layer. At this stage, the only layers I have on are the template, and the new layer on which the base of my clothing will go.pngs8.png

Paint the clothing item you want to create, onto the new layer. For the sake of this exercise, I have created a simple bra top. There are a number of levels of transparancy throughout, all will be successfully translated to SL.

I painted on the black of the bra top, used the paint brush to add a few curly decorations.

Then on a new layer, I added the 50% red colour for the mesh fill. I then merged the red with the black layer, but this step is not necessary.

I used the seam guides to match up front and back, but I would take more care with an item I was going to put up for sale to ensure the seams match perfectly.

Lastly I took my premade SLink logo brush on the eraser tool, and punched out a logo on the back 🙂

tut7.png

For a more complicated article of clothing, I would use quite a few more layers to paint the item, however, this demonstrates how multiple levels of transparancy can be achieved with just one layer.

Turn off the template layer and the seam guide. The only layer you should have on are the ones with the clothing colours on them.

tut8.png

Note – if you have anything here other than the little grey and white squares in the background, you will not get a transparent texture. Make sure ALL other layers are turned off.

Resize the image to 512×512 pixels.

tut9.png

Save the file as a PNG-24 using the “save for web” menu option under the “file” menu.


Upload the file to SecondLife, and then create a new clothing layer using the texture you have just created as the fabric. As you can see below, the only colour is the one you have placed. The only transparancy is the one you painted on.

tut10.png

tut11.png

Now. That is all good and well for a piece of painted clothing, but how do I use this technique to create plants or other non clothing related textures such as railings? Well for that, see below 😀

Step one: Find your source photo. I would recommend using one that is either royalty free, or one of your own photographs, just to save you from any copyright nastyness.

I have found a little christmas wreath. It is not the highest quality image, but it will do for the sake of this tutorial.

wreath1.png

Step 2, create a copy of the layer your picture is on, by dragging the layer onto the new layer button at the bottom of the layers window (the one next to the trash can)

With the second layer selected, go to Image, Adjustments, desaturate.
wreath2.png

This will remove all colour from your selected layer and leave you with a greyscale image.
wreath3.png

Then select Image, Adjustments, Brightness/Contrast from the menu.

wreath4.png

And adjust the sliders until you can no longer see the background of your picture in detail, without losing much detail from the image. This is why a photo on a light background is easiest for this kind of texture.

wreath5.png

Next Step is to remove the white background. With the desaturated and adjusted layer selected , take the magic wand tool and select the white background. On this image, I also pressed shift and selected the centre circle of the wreath. You will see the marching ants around your selection.

wreath6.png

The next step is to turn the desaturated layer, and select your colour layer, while keeping the selection you have just made. Very important, don’t forget to do this!

Press the delete key on your keyboard. You should see the background disappear, leaving your colour image on it’s own

wreath8.png

Now create a new layer underneath the colour layer that you just removed the background from, and fill it with a colour that is contrasting to the original background colour. In this case, I have chosen black, since my original background was white. This will allow me to just go in and clean up the little artifacts left behind behind the needles on the wreath.

wreath9.png

I use the erase tool set to 1 pixel and 100% opacity, or the magic wand tool to just pick up those little white leftover bits.

wreath10.png

And finally, I turn off the black layer, and any other layers I don’t want to appear in Second Life, and save my file as a PNG-24 using the “save for web” option under “File”

This is what it looks like after applying it to a Prim.. Of course, if this were a texture I wanted to use, I would take more time and care with cleaning up the artifacts, and use a higher resolution image, but this demonstrates how to use PNG for transparancy quite nicely 🙂

wreath12.png

Feel free to IM me in game for any pointers or further information! 🙂

4 thoughts on “Second Life Tutorial – Using the newly supported .png format to create transparent textures in Photoshop!

  1. Amaranthim Talon October 25, 2008 at 4:09 AM

    Thanks for the awesome tut- very clear and well written.

  2. Shania Singh (inworld= November 18, 2008 at 7:33 AM

    well hun – brilliant tut ….

    you promised more tuts to come on making clothes .—
    can´t wait to see them — so go for it 🙂
    xxx Shania xxx

  3. okegima amat January 6, 2009 at 6:54 AM

    your tuto is awsome. sorry for my bad english, but i want to thank you for this clear tutos. i was sad in having trouble to find a solution with transparent and .TAG. but in fact .PNG is must better.

  4. […] Second Life Tutorial – Using the newly supported .png format […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: