Day 475: Creating Clothes with Photoshop (with new PNG file)
I did an earlier step-by-step tutorial for making clothes with Photoshop using the traditional Alpha Channel and TGA file.
Second Life began to support the newer PNG file last year. PNG files take less space to store. PNG files also do not require a separate Alpha Channel, so they are much easier to work with!
From what I understand, theres no different in quality between PNG and TGA files. So you might as well use PNG if you are new to making clothes in SL :)
The steps are a bit different between creating TGA and PNG files in Photoshop. So this is a similar step-by-step tutorial, written for creating PNG files in Photoshop. The screenshots were taking using Photoshop CS2. Since I only use basic Photoshop features, they should be similar to most versions of Photoshop.
Working with PNG in Photoshop
A PNG file gets the transparency information from various "Opacity" settings in the Photoshop "Layers" palette. So when you create a new texture (File/New...), be sure that you select "Transparent" option for "Background Contents:".
You can adjust the transparency of any part of a texture by setting the "Opacity" below 100%. You can change the Opacity of a Brush, or even an entire layer. You can even create Gradients that go from 100% Opacity to 0% Opacity. (Most Photoshop books will discuss how to adjust Opacity)
When your texture looks good, just select "Save As..." and "PNG". Thats it! You dont need to build a separate Alpha Channel :)
Overview
This is a tutorial on how to create a simple shirt in Photoshop (in PNG) using the SL Avatar UV template from Robin Wood. You can download the templates from here. For this tutorial, you should download the "layered Photoshop (.psd) Files". You only need the "Top (2.4 MB)" file. These are the same template files I use for making clothes in Second Life.
This tutorial will cover how to use the Template to make a shirt, and how to save the shirt as a PNG file for uploading to Second Life.
This tutorial is not intended as an in-depth Photoshop tutorial. There are many many books on Photoshop at the local bookstore, and classes and online tutorials. I do intend to show you step-by-step on how to use Photoshop to make a shirt in Second Life.
So lets get started!
Preparing the Template
From Photoshop top menu bar, select "File", then "Open...". Look for the "SL Avatar Top Layers.psd" file on your computer (make sure you are using the ".psd" file!). Click the "Open" button to open the Template file in Photoshop.
This will open the Template file in a window.
First, let's save a copy of the Template file so we dont accidently overwrite it (I accidently overwrite the template all the time! :P) Select "File" from the top of the window, and "Save as...".
Enter a Name for the new file (something like "Little Black Top") and click on the "Save" button.
OK, now we can play with the file without worrying about messing up the original. :)
By default, the Template file is 1024x1024 pixels. This is great for detail work where you want the highest resolution to align the edges (such as when you are making skins or textures that need to be closely aligned). However, we are just making a simple top for demonstration purposes.
Also, we will be producing a Targa format file (with transparency information). This file will be huge at 1024x1024 pixels. So let's reduce the size to a more manageable 512x512 pixel file.
Click on "Image" from the top menu bar. Select "Image Size...".
This will open the Image Size window. Enter "512" in both the Width and Height textboxes (Height might change automatically when you enter Width). Then click the "OK" button.
This reduces the resolution of the Template from 1024x1024 to 512x512 pixels.
Now we can start drawing.
First things first...I cant see anything :P Lets put a white background so we can at least see the Template.
Go to the Layers, Channels, Paths... palette. Click on the "Create a new layer" button.
(If you dont have the "Layers, Channels, Paths..." palette, click on "Window" on the top menu bar and make sure there is a checkmark next to "Layers".)
Right-click on "Layer 1" and select "Layer Properties...". This will open the Layer Properties window.
Enter "Backdrop" as the Layer Name (I dont want to call it "background" because that layer has a special meaning in Photoshop). Click on the "OK" button.
On the Layers, Channels, Paths... palette, click and hold on the "Backdrop" layer. Drag the layer to the bottom of the stack of layers (below "SubDivided UVs").
Click on the White square in the Color Swatches to select White as the foreground color.
Click on the "Paint Bucket" button on the Tools bar.
Make sure that the "Backdrop" layer is selected (highlighted in blue in the Layers, Channels, Paths palette). Using the Paint Bucket tool, click anywhere in the Template window to fill the Backdrop layer with white.
OK, thats better. Now we are ready to work :) You might want to save a copy of this file as a starting point for your future projects...
The wonderful thing about these graphics programs is the ability to create different layers for different things. Dont be shy about creating new layers! They are there to make things easier. As you can see, the Template came with a number of layers already. We just added a layer as the backdrop to make it easier to see the Template.
Creating the Shirt
We are going to create another layer to draw in our shirt.
On the Layers, Channels, Paths... palette, click on the "Backdrop" layer to select it. Click on the "Create a new layer" button on the bottom.
Right-click on "Layer 1" and select "Layer Properties...". This will open the Layer Properties window.
Enter "Shirt" as the Layer Name. Click on the "OK" button.
Your Layers, Channels, Paths palette should look like this when you are done.
Click on the Shirt layer to select it.
Make sure that the Shirt layer is below the SubDivided UVs layer, but above the Backdrop layer. If not, then click and hold on the Shirt layer, and drag it into place.
From the main Tools palette, select the Lasso tool. (If you dont see the Lasso tool in the palette, Right-click on the second square down from the top and select the Lasso tool.)
Draw a line all the way around the front side of the shirt (the figure on the left). Be sure you dont include any parts of the arm at the bottom.
Click on the Black square in the Color Swatches to select Black as the foreground color.
From main Tools palette, select the Paint Bucket tool.
With the Paint Bucket tool selected, click in the area you selected around the front side of the shirt. This will fill the selected area with black.
Now repeat the same process with the back side of the shirt (the figure on the right): select the Lasso tool, draw a line around the back side, selec the Paint Bucket tool, and fill the area with black.
Next, we are going to cut out an opening in the front and back sides for the neck. We are going to do this using the Pen/Path tool.
From main Tools palette, select the Pen tool (if you dont see the Pen tool, Right-click on the square [9th square down] and select the Pen).
There will be a new menu bar that appears at the top. On the left side, there are 3 options (Shape layers, Paths, and Fill pixels). Make sure that the middle button (Paths) is selected.
Using the Pen/Path tool, draw a path around the front side of the shirt (the figure on the left). It may help to zoom in on the neck area.
Simply click at each of these 5 points. Try to get the 3 points on the Green line. Remember to click on the first point again to close the Path.
Remember, you can always Undo your last action by pressing Ctrl-Z in Photoshop. 
From main Tools palette, Right-click on the square with the Pen tool, and select "Convert Point Tool" at the bottom.
Click and hold on the Anchor Point in the middle of the neck. Drag a line towards the right. Move your mouse around until you have a nice-looking neck shape.
Right-click in the Template window (in the drawing window). Select "Make Selection..." from the popup menu. This will open the Make Selection window.
Select the "New Selection" radio button, and click "OK".
This turns the Path we just made into a selection.
Click on the "Edit" menu at the top of the window. Select "Clear".
This will cut a hole in the shirt for the neck :)
Now, do the same thing for the back side of the shirt:
Go to the main Tools palette, select the Pen tool (you need to change the Convert Point tool back to the Pen tool). Click on the 5 points around the neck. Click on the first point to close the Path.
Go to the main Tools palette, select the Convert Point Tool (change from Pen tool to Convert Point tool). Pull the middle Anchor Point to the right.
Right-click in the Template window (in the drawing window). Select "Make Selection..." from the popup menu. This will open the Make Selection window.
Select the "New Selection" radio button, and click "OK".
Click on the "Edit" menu at the top of the window. Select "Clear".
So here is our completed shirt.
You can create additional layers and draw in additional designs. You can do that now or come back later after you finish this tutorial. I would recommend you run through this tutorial first though...
Creating the PNG File
One last thing before we create the PNG file: we need to make the transparent areas...transparent :) In this case, we want everything in black to be opaque, and everything else to be transparent. By the way, white does NOT mean transparent! White is a color, just like black or any other color. We just happened to pick white to use as a working backdrop color.
Go to the "Layers, Channels, Paths..." palette. Click on the "eye" next to all the layers to hide them, leaving only the Shirt layer visible (use the scrollbars and make sure you check all the layers). When you are done, the Shirt layer should be the only one with an "eye" next to it.
Thats it :) We are ready to create the PNG file! (Isnt that much easier than messing with Alpha Channels ;P)
Click on the "File" menu at the top of the window. Select "Save" to save all of our changes.
Finally, lets export the file in PNG format...
Click on the "File" menu at the top of the window. Select "Save as..." to save all of our changes.
In the Save As window, select "PNG (*.PNG)" and click on the "Save" button.
You may want to change the file name and remove with word "copy" from the end of the name.
The PNG Options window will appear. Select and click on the "OK" button.
Thats it! The PNG file is now ready to be uploaded to Second Life.
The steps for uploading a texture file to Second Life and turning it into a shirt was covered in Creating Clothes Part 1 Tutorial. You can jump to the end of the tutorial, where it says "Next, go into Second Life..."
I just showed you the very basic steps in creating a clothing item in Photoshop and uploading it to Second Life. Now, feel free to go back and change the shape of the Shirt. Add some layers and create some designs. Or play with some of the other clothing templates (SL Avatar Bottom, Skirt, etc).
Have fun with your SL designer career :)
39023-080112-307366-90
© 2008 All Rights Reserved.


33 comments:
Wow, this is a great tutorial - thank you!
Natalia - If you set the template's properties to "read only" it will not let you overwrite the file.
You won't lose your work, because it asks if you want to save the file under another name.
If you use windows, I think you irght-click on the file and select "properties" then look for the checkboxes with READ ONLY.
Oh, awesome. That will make life so much easier. :3
IYan, thanks! I hope its helpful :)
Tsu, thanks for the tip :) Lol Ive probably downloaded the file several times cause I kept writing over it ;P
Samiya, yes, its definitely easier than creating Alpha Channels, especially for getting started. Lol Im still using TGA files at the moment (just out of bad habit :P)
WooooW
really awesome tutorial .
am learning alot from you :-)
thanxx !
Oh, this is terrific. Natalia, I have come to the dark side. I am no longer a Paint Shop Pro Person, but a Photoshopper with the rest :)
The price was, well, enough to make me put this off for a while, but the PNG files alone make this worth it. I just redid a carriage, and the windows are all nice and crisp now, with no ugly haloing, either. And it took me all of about 15 minutes a texture!
Lord, lest I sound like an Adobe salesgirl, let me say that PSP was more than a terrific program for the price. But you just don't have the creation tools that PS has.
Final question--how does one make translucencies such as you did with your old skating dress? I get the notion that you can adjust the layer opacity and paint with various opacities, but is there an easy way to (for example) select areas on a fabric layer and make those selected areas translucent? (I'm thinking one might hit them with a low hardness eraser, but I await your PS veteran answer)
Virrginia -
For a translucent fabric, set the whole layer to less than 100% opaque.
For selected areas on a layer, you can partly erase to transparent.
I don't know if PhotoShop does this, but the GIMP can also "erase" towards less transparent.
Sairus, heehee thanks! :)
Virrginia, yes, you can select an area and use the paint bucket to fill with a low opacity. You can also use the eraser to "erase" opacity (just set it really low, cause it works backwards). Most of the tools have an opacity setting :)
Lol Im still using TGA files, so I still use the old fashioned Alpha Channel :P Its easier for me to see transparency when its in a separate place. So for me, its more like using black/white and shades of grey in the Alpha Channel. I guess old habits are hard to break ;P
Tsu, thanks for the response! Im not sure if Photoshop has the same thing...the eraser doesnt keep taking away transparency :( Lol theres probably some way to do it, but I dont know how :P
Wow, thanks for pointing me toward PNG - what a HUGE timesaver and all the huddling with the plugins to avoid the white corona around transparent parts finally gone.
I love you for that!
Your tutorial are very helpful!
Thanks Natalia for taking the time to share your knowlege ^_^
hey nattie,
lovely blog!
i was wondering if this method is better for creating net/lace textures without causing the 'glitch'.... where prim skirts luk transparent in places... i hate it whn that happens :(
natalia- great tuto -muvaah!
one clarification, u mentioned in earlier tutorials as well, to keep the file 512x512 pxl.
i have been uploading 1024x1024-150dpi, hasnt troubled me so far. the file size is bigger, but i havnt had trouble rezzing it.
should i be using 512x512? i just dnt get the crispness in texture with the lower file size... or am i being too picky?:P
It's so easy to work with alpha channels, I haven't bothered to try PNG yet myself .... sort of like you, Natalia. ;-)
Great tutorial, though. You make PNG simple to follow.
A couple of the comments from other people ask about the white halo effect and the "alpha sorting glitch." PNG won't do anything to help either one. The problems don't have anything to do with TGA, they are problems with transparency -- no matter how you create it.
To avoid the halo effect, (1) always create a darker layer under everything, and (2) make sure that your colored areas (fabric) extend into the regions that will end up being transparent. To avoid the sorting "glitch," never overlap prims with 32-bit textures. When transparent objects overlap visually, 3-D programs like SL can't figure out which object is in front, so they flicker back and forth.
Perhaps I'm blind, Rolig, but I don't see any halo when working with PNG format. I seem to recall reading that this was a major difference between it and TGA--but I might be misremember, as I was still in the Paint Shop Pro dungeon at the time, and thought of PNG format as akin to weekends spent skiing in the Alps: the preoccupations of a finer sort of people than myself.
Rolig is completely correct about referring to "32 bit" instead of just transparency. The alpha sorting glitch will occur even with non-transparent textures if you save in TGA format with 32 bits. So always save in 24 bits, unless you need that channel to tell SL to make part of it transparent.
If you do need some tranparency, try to limit it as much as possible. Don't texture the whole prim panel with the transparent texture, create an inner one (that people won't see as much) using a light grey where the transparency would be. The side edges of the skirt panels may also be able to be a solid colour. Depending on your design, you might not have to overlap panels as much. Just play with it, seeing where the conflicts are, and try your best to work around.
Hey Virginia - thanks so much for the above tip about 24 bit .tgas :) You've solved a problem that's been bugging me since the dawn of time (well 6 months). And thanks to Natalia too - without your tutorials I'd be lost!
Yup, you're right, Virginia. Thank you. I was taking too narrow a view of PNG. (I said I still like TGA, remember? ;-) )
PNG offers two types of transparency: Simple transparency and Alpha transparency. You and Natalia are talking about PNG's Simple transparency. I was talking about Alpha. Simple transparency will kill haloes, at the loss of some flexibility, since it treats transparency as if it were just another color dimension. If you have some kinds of complex transparency to do, you'd find that limiting. I agree with Natalia when she said, "Its easier for me to see transparency when its in a separate place." If you're working on nice easy problems most of the time, though, PNG's Simple transparency is a great choice for killing haloes.
Peter, heehee you are very welcome! PNGs are wonderful! :)
Luitha, thank you so much! I hope this was helpful :)
Dear Anonymous, unfortunately, this would not help the funny flashing that happens when there are lace prims on top of each other :( Lol oh well, hopefully there will be something new in the future to fix that!
Dear Anonymous, a 1024x1024 texture is 4 times larger than a 512x512 texture (so it would take 4 times as long to download). So if a resident is looking at the texture, it would stay gray for a longer amount of time.
So it depends on what you are using it for. If you want a fast download, you should stay with 512x512 (or even 256x256). If you can replace lots of 512x512 textures with a single 1024x1024 texture, then you definitely should do that :)
Rolig, thanks for the comment! Lol I hope there would eventually be a fix for the transparency problem :P
Meanwhile, I started using PNGs to make regular clothes (with like 100% opacity for clothes and 0% opacity for the empty areas). But I would prob still use TGAs to do complex Alpha Channel stuff for now :)
Virrginia, lol playing with transparency is like half the fun of making skirts. OK, its not much fun after a few times ;P Thanks for the tip about the 24 and 32 TGAs! :)
Astarel, heehee hope these tutorials are helpful! Oh my goodness, sorry about the 6-month issue!
Rolig, wow, I had no idea there were diff kinds of PNGs (heehee didnt even know what PNGs were until someone asked me about it ;P). Thank you so much for the comment :)
Excellent tutorial, thank you! The one part where you click off all the eyeballs to get down to a single layer. You can do this instantly by option-clicking (alt-clicking on a PC?) the eyeball of the layer you want.
Dear Anonymous, ooo...thank you so much for the tip! I didnt know that (thats really nice to know, cause I usually had to hunt down all the layers ;P) Thanks!
i'm really a newbie with photoshop. i want to use png. file. how to open the robin wood template that i already have and set the background as transparent like you showed in the PNG tutorial?
Dear Anonymous, be sure you have the template with Layers! You would not be able to create a transparent background without it :)
Dear Natalia, Im a noob when it comes to creating fashion but Iv learned a lot from ur tutorials and its fun to do. Thanks! But when creating a jacket I dont get any texture from the waistline down, what am I doing wrong here?
Neo, when you create an SL Jacket, there are 2 spots for textures (an Upper and a Lower texture). Dont forget to put something for the Lower texture :)
Remember to use the Lower Body template for the Lower texture :) Have fun!
Aaaaaah........now I get it!!! : ) Thanks Natalia, u really been a great help!!! Keep up the great tutorials!!! : )
Neo, you are welcome! Good luck ;)
THANK GOD FOR PNG FORMAT!! I was losing my patience with alpha channels and suddenly reading this article was a blessing!
But I have a question about opacity. Someone mentioned it. So for PNG files, we just adjust the opacity as we normally would any PSD files right? Let's just say using photoshop, I lowered the opacity slider to sayyyy 50%. Then I saw the file as PNG and will that 50% opacity show in SL? Or would it show as 100%? I mean will it achieve the effect of 50% transparency like those alpha channels gray areas??
And why still use alpha channels when PNGs are so much easier??
It will work just as you expect it to work :-)
Hiya Natalia, great workshops!!..they are very helpful...one thing i dont get...how to put a fabric texture on top of the shirt? i placed a new layer above the shirt but somehow..every time i get the fabric into the new layer..it covers up the whole square template of the shirt with satin fabric..and the shape of the shirt is gone...also when i am previewing it in sl before upload...i cant figure out what i'm doing wrong...maybe some blond stupid thing..:P...Thanks Natalia..:-) Mandy.
Funn, yes, thats all you have to do (adjust opacity). PNG is new...SL did not use to support it. Also, Alpha Channels lets you see (and edit the channel), which lets you do some cool effects.
Peter, heehee thanks! :)
Mandy, you can use Photoshop tools to trim the texture as needed. Most of this is just Photoshop stuff, like using lasso, pens, etc. And there are lots of tutorials on the Internet.
Wow, magic, just tried using pings, and it works! No black layer to worry about, no alpha channel to have to keep redoing when I change the garment shape...
Thank you!
Patrick, heehee yes, PNG's are great! No more Alpha Channels :)
One word: Fireworks.
Greg, heehee I hope thats a good word ;P
Post a Comment