Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Making the Texture Transparent

Lady Tempura
Registered User
Join date: 5 Dec 2005
Posts: 18
12-18-2005 20:51
I want to know how transparent clothes are made,like for example fishnets or strappy tank tops and clothings like that,do you have to make the texture transparent in psp or ps before you upload it to SL and will it come out transparent in SL?...

Ty...

-Lady T.
Enoch Lameth
Where're my pants?
Join date: 1 Nov 2005
Posts: 131
12-18-2005 22:00
Yes you do, but sometimes the transparency is more complicated to make than drawing a simple gif or png file.


Using an unmodified Photoshop CS 1 (I think that's 7 or so)

- Make a new layer.
- Color the entire image. You'll be using grayscale for this. Black means totally transparent, and white means totally opaque. Shades of gray, obviously, will make something transleuscent (sp?)

- Select that entire grayscale layer, and copy it
- In the window that contains "Layer", "Channel" and "Path" tabs, click "Channel"
- Click the "New Channel" icon. This will be named "alpha" automatically.
- Paste the copied layer into this Alpha Channel.
- Feel free to delete the layer used to make your alpha channel
Anyanka Bunnyhug
Silly rabbit
Join date: 27 Jul 2005
Posts: 49
12-19-2005 05:45
Hi there Lady!

To create the type of clothing you have mentioned, alpha channels are what you will be using in Photoshop and PSP.

The alpha channel you will work on is greyscale (your file stays be rgb), where white areas will allow the design you have created in your layers to show through completely, black will hide it (make transparent) and greys will allow it to show partially.

Just remember to save you work as targa with alpha box ticked and a resolution of 32bits/pixel, otherwise the alpha channel will be ignored and you will have no transparancy.

Enoch gave you a "quick" idea to get you on track, but for a indepth look at working with and understanding alpha channels, Chosen Few has the answers. Search the forums for posts by Chosen and you will find many many helpful tips. He knows what he's talking about, believe me.

To get you started read/study the following explanation by Chosen:

From: Chosen Few



Note, this is for all versions of Photoshop other than 7.0. If you're using 7.0, update to 7.01 for free by downloading the free patch patch from Adobe.


Color Space & Channels

Images designed to be shown on a color screen are comprised three colors (red, green, & blue). The relative brightness of each of these primary colors in each pixel determines each pixel's actual color. For example, a pixel comprised of equal values of red and blue without any green would appear to be purple.


When taken seperately, the individual values for red, green, or blue are represented by a grayscale image called a channel. In an individual channel, white represents the maximum possible concentration of color and black represents the absense of color. Shades of gray represent amounts of color that are less than the maximum. The darker the gray, the lesser the concentration of color. The lighter the gray, the more color is present.


Channels & Transparency (Alpha Channels)

Images that have transparency have the same three primary color channels and also have a fourth channel, called Alpha, which represents opacity. In the alpha channel, white represents comlete opacity and black represents the absense of opacity (transparency). Shades of gray represent semi-transparency. The darker the gray, the more transparent. The lighter the gray, the more opaque.


So, for example, if you are making a bikini top for your avatar, the alpha channel would be white in the shape of the bikini top, and black everywhere else. The white part makes the bikini top 100% opaque so that you won't be able to see through it when it's on the av, and the black part makes the rest of the image invisible so that there appears to be nothing on the av's arms, stomach, etc.


How to Create an Alpha Channel

Let's stick with the example of a bikini top.


1. On the Layers Palette turn off all layers except for the layer that has your bikini on it. (To turn a layer off, click the eyeball symbol to the left of its name.)


2. If the bikini layer has any white space around the bikini itself, use the eraser to get rid of the white space. It's very important at this stage that the bikini be on its own layer with nothing else on it.


3. On the Layers Palette, ctrl-click the thumbnail for the layer with the bikini on it. (The thumbnail is the little picture of the layer directly to the left of the layer's name.) This will select everything on the layer. You should see the "marching ants" outlining your bikini now.


4. On the Layers Palette, click the tab that says Channels to switch it to the Channels Palette. What you should see listed here are the three primary channels for your image, labled, "Red", "Green", & "Blue", and a master channel for the three, labelled "RGB". If you see any other channels besides those four, delete them now.


5. In the lower right corner of the Palette Window, locate the button that looks like a square sticker being peeled from its backing. It's the second one from the right. It's immediately to the left of the one that looks like a trash can. It says "New Channel" when you hover your mouse over it. Click it.


6. You should now see a new layer called "Alpha 1", which is currently all black. Make sure all channels except for Alpha 1 are turned off and that Alpha 1 is turned on. This should have happened automatically when you created Alpha 1, but if it didn't, do it now.


7. Your canvas should now appear to be solid black with the exception that you should still be able to see the "marching ants" outline of your bikini. Paint everything inside the outline white and leave everything outside of it black.


8. Click "Select" on the menu bar at the top of the screen to pull down the Select Menu. Click "Deselect" and you should see the marching ants disappear.


9. On the Channels Palette, trun the red, green, & blue channels back on, and turn Alpha 1 off. Now click the tab that says layers to switch back to the Layers Palette. Create a new layer by pressing the same button you previously used to create the new channel. (Just as it created a new channel while you were on the Channels Palette, it will create a new layer while you're on the Layers Palette.) Click on the name of this new layer and drag it underneath the layer with the bikini on it. Paint the new layer 50% gray or darker; black is fine. (The gray/black layer will prevent the white halo sometimes caused when Alphas are created the way we just did it. If you don't know what I mean by that, don't worry about. Just make sure to always put a gray/black layer underneath your work and you'll never have to see that white halo.)


10. Save your file as a 32-bit TGA and upload it to SL.


Viewing the Transparency on the TGA

By default, Photoshop will not show you the transparency when you look at the TGA image. Photoshop itself has no idea the alpha is intended as a transparency map. Interpreting it as transparency, or as anything else, is the job of the program the image is destined for, which in this case is SL. If you wish to see the transparency in Photoshop, you must apply a copy of the alpha channel as a layer mask, which is very simple. It should take you all of about 3 seconds, once you know how. Here's how:


1. Open the TGA file.


2. On the Layers Palette, and double click on the word "Background". A diaolg will open to change the background layer to a regular layer. Click OK.


3. Go to the Channels Palette, ctrl click on the thumbnail for the alpha channel to select it. You should now see marching ants around the white areas, indicating a selection has been made.


4. Go back to the Layers Palette, and click the button at the bottom for "Add Layer Mask". It's the second one from the left, the one that looks like a rectangle with a circle in the middle. As soon as you click it, you should see through the layer to the checkerboard below in all the areas that were black on the alpha, and partially through on all areas that were gray. That's all there is to it.


When you close the TGA, you'll lose the mask. Next time you open the file, you'll have to recreate the mask if you want to see it again. The TGA format does not support layers, so it follows that it can't support layer masks either. Don't worry though, the transparency info is still there. Remember, the alpha channel is the transparency map as far as SL is concerend. Whether or not you can see the transparency in Photoshop is irrelivant.

One last note now that you will be using Alpha channels. It is called an alpha channel for a reason, dont EVER refer to them as alpha layers. EVER.

That should help - Thanks again to Chosen Few for all the knowledge he so freely shares with the rest of us.
_____________________
-x-
Anya B Designs will be back. Currently working on my new shop... clothing, furniture and more... will keep you posted.
Jennifer McLuhan
Smiles and Hugs are Free
Join date: 22 Aug 2005
Posts: 441
12-19-2005 06:45
I never use a "grey" alpha for transparencies. I just use the Opaque slider to make the layer simi-transparent. What if you have something with two layers, one solid and other a transparent, top layer? Alpha channels would help you here. Or say with thongs that are transparent in the crotch and solid on the thong straps? Again, alpha channel won’t help.

I use the alpha as a mask. It cuts off what I don’t want to be seen. To make is simi-transparent, I use the Opaque slider.

Am I wrong here?

Jen
Eloise Pasteur
Curious Individual
Join date: 14 Jul 2004
Posts: 1,952
12-19-2005 07:33
I think we're talking different sorts of transparency Jen.

The alpha channel is yes, a mask, if you want to think of it that way. It stops stuff that shouldn't be there showing up at all - like long sleeves on a short-sleeved shirt, it just chops them off so however you try you can't get them. It also, if you want genuinely crotchless thongs chops out the bits you don't want.

It can, and in most versions of PS must, be used for translucent or partially see through final products, which is where the grey comes in.

If we move up the body a little, and imagine you're making a top that's layered, with a solid underpiece and a translucent or partially clear top layer - say a shirt with a thin silk overshirt. You want to do that as one piece of clothing so you can, in PS, make that upper layer partially transparent. This will allow you to get the effect you're looking for. If you took the undershirt away (hide the layer) and upload just the top layer it will actually (for most versions of PS) upload as a solid, opaque top. Painting the right proportion of grey into the alpha channel will let you get that translucent quality back. It works at first because the total effect of the top is not see through, you're just mixing how the layers are shown.

I hope I've understood your question, and got the details right and clear.
Anyanka Bunnyhug
Silly rabbit
Join date: 27 Jul 2005
Posts: 49
12-19-2005 07:46
Hi there Jen!

If you want an opaque bottom layer to show through an upper layer you have created in Photoshop, using the opacity slider for the top layer is fine. If you want to create a semi-transparent top with nothing underneath (skin showing through the material in SL) you will need to use grey in your alpha channel.

When you use grey - it is not a separate alpha channel. You create 1 alpha channel in which the black will mask as you said, and the grey areas will allow some transparency. A dark grey will make it almost completely transparent, a light grey almost completely opaque and so on and so on.

If you only use the opacity slider in this case, lets say a dark blue shirt that you made semi-transparent, once the file is saved as a targa you will end up with a solid light blue shirt, with no transparency. If you added a grey to the alpha channel covering the material of the shirt (still using black to cut off the unwanted) you will have a lighter semi-transparent shirt showing through your skin/tatoo/undershirt.

That said: I think there is one version of Photoshop that creates "automatic" alpha and possibly will allow you to use the opacity slider to create semi-transparent targas, but it may cause many other problems like halos or incorrect masking. I have never worked with this version of Photoshop, but I do know the Photoshop "makers" very quickly supplied patches for this "automatic alpha", because of its inconsistancy.

If you look at the tuturial from Chosen Few I quoted earlier, you will see that he also recommends downloading the patch (1st paragraph).

In the end, creating your own transparency in alpha channels will allow you to produce your most realistic work. Well that's what I think anyway...

Have a great day :)
_____________________
-x-
Anya B Designs will be back. Currently working on my new shop... clothing, furniture and more... will keep you posted.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
12-19-2005 09:02
Thanks for all the kind words, Anyanka. I guess my only proper response to this thread can be "Listen to Anyanka. She knows what she's talking about when she says 'listen to Chosen.'" :D
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
Jennifer McLuhan
Smiles and Hugs are Free
Join date: 22 Aug 2005
Posts: 441
12-19-2005 11:59
Once again, Jennifer looks to the left then to the right to make sure no men are watching. Then quickly, with grace, and humility, she eats her humble pie.


I was using 7.0. Never could upgrade. I had to get CS2.

So, now I have to try a new technique. Thanks, Eloise, Anyanka and of course, Mistress Chosen one of the Design and Texture mentors of SL.

Jen
Robin Sojourner
Registered User
Join date: 16 Sep 2004
Posts: 1,080
12-19-2005 13:08
Don't forget that you can quickly and easily make Alpha channels based on layer transparency by simply holding down the Command/ctrl key and clicking on the Layer Thumbnail image, then going to Select > Save Selection and accepting the defaults.

If you have more than one layer, or you have some layers set to partial opacity, just move to the top of the stack, hold down ctrl+alt+Shift on a PC, or Command+Option+Shift on a Mac, and tap the E key. In CS2, that will make a composite layer, using all visible layers in your document. (In earlier versions, you need to make a New Layer first, as noted by Anyanka below.)

Hold down Command/ctrl and click on that thumbnail to make your perfect Alpha, every time, without ever having to open the Channel Palette.

(Hide the bottom, opaque layer that you added to eliminate the White Halo when you do this, of course, or your Alpha will be totally opaque, too.)

Edited to add the last line, and the bit about Save Selection, and New Layer.
_____________________
Robin (Sojourner) Wood
www.robinwood.com

"Second Life ... is an Internet-based virtual world ... and a libertarian anarchy..." Wikipedia
Anyanka Bunnyhug
Silly rabbit
Join date: 27 Jul 2005
Posts: 49
12-20-2005 01:26
Hi Robin

Now I'm a bit dazed and confused.

Doing what you discribed does give you a selection marquee around "objects" in your layers, but does not create an alpha channel. You still need to open your channel palette, create an alpha channel and fill the selection. You will also need to use the grey method for semi-transparent areas. Or are you also referring to that 1 obscure version of Photoshop I've never seen?

Also - this selection technique works for people who only draws exactly what is needed. I tend to have my textures much bigger than needed and rely on my alpha to give the desired shape. One of the reasons is to prevent halos. (I have other reasons, but I might start ranting - so I'll just give you the one :))

So for the designers out there that have textures that actually looks like a shirt, skirt or whatever your working on - Robin's selection technique does work well.

One last thought: if you want to use the "hold down ctrl+alt+Shift on a PC, or Command+Option+Shift on a Mac, and tap the E key" to create a composite layer technique that Robin described, create a new empty layer. Have this layer selected when you make the composite and the composite will be created in the empty layer. (everything visible in your file will merge, in your history you will see "stamp vissible";).

If you have one of the layers you have been working on selected, the composite layer will be created in/over this layer and you will loose that seperate layer.

To illustrate: lets say you are making a t-shirt with a picture of a duck on it (can be any duck) and your t-shirt layer and the positioned picture of the duck is visible.

If you select the duck layer and create the composite, you are now left with a t-shirt layer, but your duck layer is now replaced with a t-shirt with a duck on it. Now if you want to make another colour duck t-shirt, you will have to cut out the duck picture again.

If you created a new layer to create the composite in, you will have the new composite duck and t-shirt layer, and still your separate t-shirt layer and your duck layer.

And a duck on its own layer is a happy duck :)
_____________________
-x-
Anya B Designs will be back. Currently working on my new shop... clothing, furniture and more... will keep you posted.
Jennifer McLuhan
Smiles and Hugs are Free
Join date: 22 Aug 2005
Posts: 441
12-20-2005 05:06
Anyanka - Robin posted this before. She didn't mention, this time, that after making the selection, you need to go to Select - Save Selection. This will create the Alpha.

I use her technique all the time now and, love it.

Jen
Anyanka Bunnyhug
Silly rabbit
Join date: 27 Jul 2005
Posts: 49
12-20-2005 06:17
Thanks Jen for clearing that up.

Take care :D
_____________________
-x-
Anya B Designs will be back. Currently working on my new shop... clothing, furniture and more... will keep you posted.
Robin Sojourner
Registered User
Join date: 16 Sep 2004
Posts: 1,080
12-20-2005 12:44
Ooops. Jennifer is right. You need to go to "Save Selection" to make the selection. :blush:

I'm going to edit the original post, for people who don't read all of them.

I also forgot that you need to make a new layer before you use the key-combo for "composite layer" if you are using a version of Photoshop prior to CS2. In CS2, you don't. The new layer is made automatically, above whatever layer you are working on.

Really, unless some of your layers have reduced opacity or are partially masked, you can just use the shift key and click on one layer thumbnail after another to select the non-transparent pixels. Reduced opacity pixels will be selected properly, with their opacity reflected in the selection.

Reduced opacity layers, on the other hand, will be selected as if they were fully opaque, and masked layers will be selected as if they weren't masked; which is why you need a Composite Layer to get the correct opacity for the alpha in those cases.

(If you have just one masked layer, you can Command/ctrl+click the layer thumbnail, and then Shift+Option+Command+click for a Mac, or Shift+alt+ctr+click for a PC on the mask thumbnail to get the Intersection of the selections, and select only the visible pixels, but do you guys really want to get that far into this?)

And yes, this will make an Alpha based on layer transparency, as stated in the first sentence. :)

I'm not saying that is what you'll always want to do. But, in case you do, this will work without having to paint an Alpha Channel by hand, trying to match the layer opacity, which is what some people here are trying to do. I just want them to realize that they don't have to do all that work. The program is perfectly capable of doing it for them.

I do sometimes use this trick for clothing, because I put the "bleed" for the seams on the layer with the fabric. So I can safely use this technique to select the areas that I want to be fully opaque on the avatar by simply hiding the "Mask" layer, used to prevent halo, before I make the selection, and I don't have to paint on the Alpha Channel at all.

In fact, I very seldom paint on the Channel. It's a lot easier, for me, to just do things using selections and Levels, since what I'm trying to do is perfectly match an existing image.

There are many ways to skin an AV, after all. :D
_____________________
Robin (Sojourner) Wood
www.robinwood.com

"Second Life ... is an Internet-based virtual world ... and a libertarian anarchy..." Wikipedia