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.
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 🙂
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.
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.
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.
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.
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.
This will remove all colour from your selected layer and leave you with a greyscale image.
Then select Image, Adjustments, Brightness/Contrast from the menu.
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.
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.
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
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.
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.
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 🙂
Feel free to IM me in game for any pointers or further information! 🙂