Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Transparency and Alpha Channels: The Definitive Guide

Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
11-12-2007 06:05
Good question. I've been meaning to update the original post with a section on PNG, but I haven't had time to give it a full effort. PNG supports two types of transparency, alpha transparency (just like TGA) and simple transparency. Simple transparency treats transparency as a color rather than as a separate property of the image, and is completely WYSIWYG. So to use it, simply paint your foreground imagery onto an otherwise transparent background. That's it.

With the simplicity comes a few disadvantages. Chief among these are a lesser degree of control, permanent destructiveness, and the inability to copy transparency from image to image. Alpha channels, in contrast, provide for 100% total freedom to quickly and easily control the exactly level of transparency for every pixel in the image, without disturbing the color data in any way. They're completely non-destructive, so you can change or remove them at any time in order to remove or alter an image's transparency scheme without having to alter any other aspect of the image itself. Also, alpha channels are copyable from image to image. Simple transparency, however, offers none of those benefits. If you want to make a radical change to a simple-transparent image, you might well need to start the whole thing over again. And if you want two images to have the same transparency scheme, you'll have to paint them both the same way from scratch.

To summarize, I'd put it like this. Alpha transparency may be less immediately intuitive to some people in the beginning, but once you understand its basic mechanics, you'll find it to be super fast, almost ridiculously easy to use, and incredibly powerful (which it's why it's been an upheld standard for decades). Simple transparency, on the other hand, while undeniably more intuitive to understand for the novice, is far less powerful, often much slower to use, and offers little if any flexibility.

I highly recommend you make the conscious decision to stop thinking of alpha channel creation as a "dance" (I take it that term means you think it's either hard, time-consuming, or both). Making an alpha channel, even the most complex one could possibly come up with, only takes a matter of seconds after you've let yourself get used to the process. While simple transparency may seem tempting as an easy out in the beginning since it requires no new learning, it's not something you'll want to rely on. Alphas are one of the most basic foundations of how most things in graphics work. Learn how to use them well, and you'll not only position yourself to be able to do a great many things you could never otherwise do, but you'll also kick yourself eventually for having ever thought it was hard in the first place.
_____________________
.

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.
Blackfyr McBride
Registered User
Join date: 1 Aug 2007
Posts: 10
11-12-2007 11:42
From: Chosen Few
Good question. I've been meaning to update the original post with a section on PNG, but I haven't had time to give it a full effort. PNG supports two types of transparency, alpha transparency (just like TGA) and simple transparency. Simple transparency treats transparency as a color rather than as a separate property of the image, and is completely WYSIWYG. So to use it, simply paint your foreground imagery onto an otherwise transparent background. That's it.


Actually, the method I use for making a transparent PNG in Photoshop involves having the image I want on a layer seperate from the transparent background. Or is that what you meant when you said to paint it _onto_ an otherwise transparent background? This does require having Photoshop saving it as a coopy, but that's an easy thing to do.

From: Chosen Few
With the simplicity comes a few disadvantages. Chief among these are a lesser degree of control, permanent destructiveness, and the inability to copy transparency from image to image. Alpha channels, in contrast, provide for 100% total freedom to quickly and easily control the exactly level of transparency for every pixel in the image, without disturbing the color data in any way. They're completely non-destructive, so you can change or remove them at any time in order to remove or alter an image's transparency scheme without having to alter any other aspect of the image itself. Also, alpha channels are copyable from image to image. Simple transparency, however, offers none of those benefits. If you want to make a radical change to a simple-transparent image, you might well need to start the whole thing over again. And if you want two images to have the same transparency scheme, you'll have to paint them both the same way from scratch.


Here you've lost me. I have copied transparent PNGs onto other items in Photoshop without losing the transparency, unless you are talkiing about something else? As for copying the transparency itself between images, I have yet to have a need or desire for doing that that a simply matter of copying the layer mask hasn't been able to handle.

And could you expand on the "lesser degree of control" and "permanent destructiveness" comment? I am not sure what you are referring to as I have not experienced any loss of control or destructiveness in working with PNGs.

From: Chosen Few
To summarize, I'd put it like this. Alpha transparency may be less immediately intuitive to some people in the beginning, but once you understand its basic mechanics, you'll find it to be super fast, almost ridiculously easy to use, and incredibly powerful (which it's why it's been an upheld standard for decades). Simple transparency, on the other hand, while undeniably more intuitive to understand for the novice, is far less powerful, often much slower to use, and offers little if any flexibility.


I understand that it is more powerful, but, like Unix's power, it comes with a significant learning curve. And I have not seen it to be faster, not do I see how it _can be_ faster than simply leaving the areas of the non-background layers I'm working with blank. Should I need to _mask_ areas, then I could see it's use, but that has not been anything I've needed to do yet for anything other than t-shirts

From: Chosen Few
I highly recommend you make the conscious decision to stop thinking of alpha channel creation as a "dance" (I take it that term means you think it's either hard, time-consuming, or both). Making an alpha channel, even the most complex one could possibly come up with, only takes a matter of seconds after you've let yourself get used to the process. While simple transparency may seem tempting as an easy out in the beginning since it requires no new learning, it's not something you'll want to rely on. Alphas are one of the most basic foundations of how most things in graphics work. Learn how to use them well, and you'll not only position yourself to be able to do a great many things you could never otherwise do, but you'll also kick yourself eventually for having ever thought it was hard in the first place.


That may be, but I have yet to see a way to take a multi-layered image that I've built in Photoshop and simply and easily make an alpha channel transparency. When I can do this simply by saving it as a simple transparent PNG and it takes multiple steps to make an alpha channel that doesn't screw up someothing on at least one of the layers I've built, I don't see the simplicity and I DO see it as a dance requiring multiple stages and steps. I realize it isn't hard for you, but it isn't easy for me.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
11-12-2007 13:42
From: Blackfyr McBride
Actually, the method I use for making a transparent PNG in Photoshop involves having the image I want on a layer seperate from the transparent background. Or is that what you meant when you said to paint it _onto_ an otherwise transparent background? This does require having Photoshop saving it as a coopy, but that's an easy thing to do.

Sure. Use as many layers as you want. I was only speaking in the simplest terms possible. Absolutely, keep separate image elements each on their own individual layers in your working document, always. The fact that your output format might be PNG or TGA or anything else doesn't change that.



From: Blackfyr McBride
Here you've lost me. I have copied transparent PNGs onto other items in Photoshop without losing the transparency, unless you are talkiing about something else?

I wasn't talking about copying imagery from one document to another. That has virtually nothing to do with file formatting, and can always be done. What I was talking about was copying the transparency itself, as you picked up on for your next point.


From: Blackfyr McBride
As for copying the transparency itself between images, I have yet to have a need or desire for doing that that a simply matter of copying the layer mask hasn't been able to handle.

Well, if you're making masks already, I can't imagine why you would shy away from alpha channels. The principles of layer masking are exactly the same as the principles of making alpha channels. The only difference is that the alpha channel affects the entire image at once, whereas a layer mask affects only one layer.

Let's say you've got an image with lots of unique layers (my textures often have dozens, or sometimes even hundreds, of layers), and you want to copy its overall transparency to a new image. Sorting and copying all the individual masks intelligently could take a long time, especially if the new image has a different layer structure than the first one. But copying the alpha channel takes less than a second.

And considering that most people who would use simple transparency wouldn't even be using masks in the first place, copying the transparency alone would be impossible for them.

Just as you noted that there's tremendous power in keeping your subject elements on individual layers, there's at least that much power, if not more, in keeping the master transparency map as a separate entity as well.


From: Blackfyr McBride
And could you expand on the "lesser degree of control" and "permanent destructiveness" comment? I am not sure what you are referring to as I have not experienced any loss of control or destructiveness in working with PNGs.

I'll take the second part first, destructiveness. With simple transparency, you've got the transparency levels embedded directly into the color information of the image. So there's no way to change one without also changing the other. No single thread can ever be pulled without affecting the whole tapestry.

But with alpha transparency, you have total freedom. You want to change the transparency without changing the colors? Fine, go right ahead. Nothing you do on the transparency map will ever affect the colors in any way. Also, want to change colors without affecting the transparency? Same deal. Nothing you do to the colors will affect the transparency. They're totally separate, completely independent entities. That makes all the difference in the world.

To illustrate this, I usually use the example of stained glass, a material which often has lots of transparency variation within a single color tone. To emulate this effect with simple transparency, you'll need to spend a very long time painting in all the different opacities to build up the image to something that would accurately resemble that kind of glass. And when you're done, there's no going back. If you want to change the pattern of either the transparency or the color, you'll have to do the whole thing over again.

However, if you use an alpha channel (or a mask), all you need to do is first fill the canvas with your base color(s), and then apply a cloudy pattern to the alpha (or to the mask). If you want to change the transparency later it'll only take a second, and you won't have to change anything at all about the colors. And vise versa; you can change the colors at any time without affecting the transparency.

To summarize Alpha transparency is completely non-destructive since it maintains the transparency information separately from the color information. Simple transparency, on the other hand, is totally destructive, as it combines all data sets into one. Make sense?

As for the lesser degree of control, you could use the above example as an illustration of that as well. The bottom line is that with alpha transparency, you have complete, focused control over the exact transparency level of every pixel in the image at all times. But with simple transparency, you can never very well alter the transparency without also repainting the coloring.


From: Blackfyr McBride
I understand that it is more powerful, but, like Unix's power, it comes with a significant learning curve.

I wouldn't say it's "significant". You only have to know three things. White is opaque, black is transparent, and all shades of gray fall in between. That's it. Granted, it's harder to explain it with text than it us just to do it, so these text-only discussions tend to go on for a long time on forums like this (which is fine), but really, all you need to do is make an alpha channel successfully one time, and then you understand the process. It's perhaps one of the simplest things to learn in all of computing, even if it's not immediately obvious at first. There's no great mystery to it; I promise.

You yourself, from what you're saying, are using layer masks, which employ the exact same logic. Did it take "significant" learning for you to start using them, or did you just see how they work and then start using them? I'd bet the answer is the latter. It's the same with alpha channels.

From: Blackfyr McBride
And I have not seen it to be faster, not do I see how it _can be_ faster than simply leaving the areas of the non-background layers I'm working with blank. Should I need to _mask_ areas, then I could see it's use, but that has not been anything I've needed to do yet for anything other than t-shirts

If all you ever plan to make is a completely opaque foreground subject against a transparent background, then sure, throwing up some paint in front and leaving the background blank will be faster than anything. However, the minute you start doing anything even slightly more complex than that, WYSIWYG transparency becomes significantly slower than alpha mapping.

Again, I invite you to consider a material like stained glass, which often has organic, cloudy, swirling patterns of transparency and opacity. Painting all that in WYSIWYG could take hours just for each pane. Doing a whole window realistically could take weeks. But building the transparency pattern as a grayscale image only takes a few seconds at most for each one, and then you're all set. And since you're then free not to have to worry at all about the transparency values during your coloring, painting those colored panes will also only take a few seconds. The same image that might have taken weeks to do with WYSIWYG is now done in mere minutes. The time savings from alpha mapping could not be greater.



From: Blackfyr McBride
That may be, but I have yet to see a way to take a multi-layered image that I've built in Photoshop and simply and easily make an alpha channel transparency.

You must be missing something then. I can see how it might look intimidating when you see pages of tutorials, each written as a highly detailed series of steps, with lots & lots of words. At first glance, it might feel like Intro To Rocket Science 101. However, when you actually perform the steps, you see that all those words are describing what amounts to a 2-second process. No alpha channel ever should take more than a second or two to make.

Also, to be through in answering, since you kind of emphasized the descriptor, "mutli-layered", I should take a minute to say that the number of layers your image has is irrelevant to the process of making an alpha channel. The channel will behave the same way whether your image has one layer or a thousand, and in most cases will be made by the same procedure. Layers and channels are entirely separate things. Don't ever let the abundance of one affect your assessment of how to make the other.

From: Blackfyr McBride
When I can do this simply by saving it as a simple transparent PNG and it takes multiple steps to make an alpha channel that doesn't screw up someothing on at least one of the layers I've built, I don't see the simplicity and I DO see it as a dance requiring multiple stages and steps.

Okay, now I KNOW you're missing something. There's simply no way an alpha channel should be able to alter anything on a layer. That's just not what alpha channels do. If that's happening, then you're definitely going about things the wrong way.

Exactly WHAT you're doing wrong, I don't know. I'd have to find out more about your work flow to determine that.


From: Blackfyr McBride
I realize it isn't hard for you, but it isn't easy for me.

Let's fix that. I'm sure there's probably just something basic that you're missing, and as soon as it clicks, you'll go "Oh duh!" and then you'll never look back.
_____________________
.

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.
Blackfyr McBride
Registered User
Join date: 1 Aug 2007
Posts: 10
11-12-2007 14:59
From: Chosen Few
Well, if you're making masks already, I can't imagine why you would shy away from alpha channels. The principles of layer masking are exactly the same as the principles of making alpha channels. The only difference is that the alpha channel affects the entire image at once, whereas a layer mask affects only one layer.

OK, so, effectively, an alpha-channel is an image-wide mask. That makes sense.

From: Chosen Few
Let's say you've got an image with lots of unique layers (my textures often have dozens, or sometimes even hundreds, of layers), and you want to copy its overall transparency to a new image. Sorting and copying all the individual masks intelligently could take a long time, especially if the new image has a different layer structure than the first one. But copying the alpha channel takes less than a second.

OK, I can see that. It's just something I've never needed to do, nor do I forsee doiong so. Should I need to do somthing where I need to do it, I would likely make one image and use that as a template file to make all the others.

From: Chosen Few
Just as you noted that there's tremendous power in keeping your subject elements on individual layers, there's at least that much power, if not more, in keeping the master transparency map as a separate entity as well.

There I'm not so sure that I agree. With masks, I can control the transparencies on each layer seperate. With one universal mask (alpha-channel), the same level of transparency gets applied to all the channels at once. Good for stained glass (once deleting the solid bits from the effects), but not so much for other things I can think of.

From: Chosen Few
I'll take the second part first, destructiveness. With simple transparency, you've got the transparency levels embedded directly into the color information of the image. So there's no way to change one without also changing the other. No single thread can ever be pulled without affecting the whole tapestry.

I have to disagree. The masks in the original files are not directly affecting the colors on their respective layers, any more than the alpha channel is. And any changes I'd make in either an alpha channel or a mask would require re-saving the target image again anyway. To explain my process, I never skip saving the file as a PSD anymore. I was burned by that in my early efforts and have been religious about doing so since then. So, changing a "single thread" requires re-saving anyway. I'm still not seeing a specific advantage unless I have a 'universal mask' needed.

From: Chosen Few
To summarize Alpha transparency is completely non-destructive since it maintains the transparency information separately from the color information. Simple transparency, on the other hand, is totally destructive, as it combines all data sets into one. Make sense?

Given that, once uploaded to SL, it all gets compressed to one file, it makes sense only for those occasions when I want to apply transparency equally to all layers of the original image

From: Chosen Few
As for the lesser degree of control, you could use the above example as an illustration of that as well. The bottom line is that with alpha transparency, you have complete, focused control over the exact transparency level of every pixel in the image at all times. But with simple transparency, you can never very well alter the transparency without also repainting the coloring.

Again, what I do with masks does not affect the color of the original file, only the output to the target image, which has to be recreated every time something is changed, regardless of whether I use PNG or TGA. And with multi-layerd images with multiple masks, I have finer control over the transparency than an alpha channel unless I _truly_ want it to apply to everything in the image. At least, this is what I'm getting from what you're saying.

From: Chosen Few
I wouldn't say it's "significant". You only have to know three things. White is opaque, black is transparent, and all shades of gray fall in between. ... You yourself, from what you're saying, are using layer masks, which employ the exact same logic. Did it take "significant" learning for you to start using them, or did you just see how they work and then start using them? I'd bet the answer is the latter. It's the same with alpha channels.

Yes, actually, it took a fair amount of time for the masking to sink in and how to properly use it. It was non-obvious and I had to be shown how to do it before I figured out how to apply it.

From: Chosen Few
If all you ever plan to make is a completely opaque foreground subject against a transparent background, then sure, throwing up some paint in front and leaving the background blank will be faster than anything. However, the minute you start doing anything even slightly more complex than that, WYSIWYG transparency becomes significantly slower than alpha mapping.

Slower in the creation or slower in the output? I would have to do the layer masking anyway, so I don't see how adding a step (making the alpha-channel) would speed it up. And as for the output, those tend to be the times I step away from the computer for a rest, bathroom break, tea or lunch anyway.

From: Chosen Few
Again, I invite you to consider a material like stained glass, which often has organic, cloudy, swirling patterns of transparency and opacity. Painting all that in WYSIWYG could take hours just for each pane. Doing a whole window realistically could take weeks. But building the transparency pattern as a grayscale image only takes a few seconds at most for each one, and then you're all set. And since you're then free not to have to worry at all about the transparency values during your coloring, painting those colored panes will also only take a few seconds. The same image that might have taken weeks to do with WYSIWYG is now done in mere minutes. The time savings from alpha mapping could not be greater.

This I will grant. And should I ever need a way to apply a mask to every layer of the source image file at the same time, I will now look at using the alpha channel. You have convinced me of this. But so far that's all I can see it being used for.

From: Chosen Few
Okay, now I KNOW you're missing something. There's simply no way an alpha channel should be able to alter anything on a layer. That's just not what alpha channels do. If that's happening, then you're definitely going about things the wrong way.

Exactly WHAT you're doing wrong, I don't know. I'd have to find out more about your work flow to determine that.

OK, let's see if I can explain, as it appears I wasn't as clear here as I intended. When I speak about it messing up something from one of the layers, I was referring to the way to output oicture looks, not to the original file. If I put something on one layer and accidentally cover that area up in the alpha channel, it's screwed up the output image, regardless of whether the data is there or not, it can't be seen now and I have to go back and redo the image, the same way I would if I accidentally masked out something I didn't want to on one of the layers.

From: Chosen Few
Let's fix that. I'm sure there's probably just something basic that you're missing, and as soon as it clicks, you'll go "Oh duh!" and then you'll never look back.

I think the "duh" moment was that the alpha channel is a universal mask rather than a layer specific mask. Unless I am wrong about that, too. This makes it one more tool I have to use, but an apparently optional one, since I'm already using masks, etc.

I admit that I still don't see that absolute need for it, nor do I see how what I am currently doing is less powerful, more destructive or harder.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
11-12-2007 17:48
Blackfyr, if I'm reading you right, it seems you're using lots and lots of individual layer masks, which basically means you're NOT working with simple transparency in the traditional sense. You're actually employing alpha type methodology at the layer level all along. So in your particular case, I'd have to agree that what you're doing is not less powerful or more destructive than what I've been suggesting. I just didn't realize that that was what you were doing when I said it.

Most people who use simple transparency will work, well, simply. They'll start with a transparent background, paint over the top to create the opaque parts, and maybe erase a bit here and there to clean up any messes. If they want translucency, they'll paint with a lowered opacity setting, or else partially erase. That's what I meant by destructive work flow, but that doesn't sound like what you're doing at all. Masks are about as non-destructive as it gets, so it's good that you're making such heavy use of them.

In any case, the answer is yes, an alpha channel is an image-wide mask. In fact, you could composite all your existing masks quite easily into a single alpha channel to create the master transparency map if you wanted to. Simply shift-ctrl-click each one's thumbnail to select the lot, and then hit the Create New Channel From Selection button on the channels palette.

By saving to PNG instead of TGA, you're basically skipping that last single step, and allowing your masks to dictate the simple transparency output. This gives you a lot of flexibility, just not quite as much as you'd have with an alpha channel. Let me give one example to illustrate.

Let's say you've built your layered image with all your masks the way you normally would. Then, when it's all done, you want to apply an image-wide transparency gradient across the whole thing. With simple transparency, that really wouldn't be an option, but with an alpha channel, you could do it quite easily. You wouldn't have to alter any of your layer masks to create the extra transparency effect. The alpha channel would take care of it. Make sense?

The point is that overall image transparency shouldn't always come directly from layer transparency. Sometimes you want the image as a whole to be able to do things that the sum of the layers alone cannot do. This is where the power of channels comes in.




On a tangent note, regarding what you said about having needed to be shown how to use masks in order to understand them, that was kind of my point from before. Once somebody showed you how, you got it, and now you find the concept to be rather simple. Until then, it was challenging to follow written instructions. I try to be as descriptive as I can when writing this stuff, in an effort to make it all as easy to follow as possible for people of all skill levels, but there really can be no substitute for plain old fashioned monkey-see-monkey-do type learning.

If it were possible to sit the whole of SL down in one class room, and then say "Ok, everyone watch this. Now you do it," I'm sure all the questions about alpha channels would disappear after just a few minutes. But since I can't do that, and since I seem to be consistently neglectful towards crossing my long list of intended video tutorials off my to-do list, my only option is to write these lengthy, detailed explanations of things, and unfortunately those are not 100% ideal for every last person.
_____________________
.

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.
Kaimi Kyomoon
Kah-EE-mee
Join date: 30 Nov 2006
Posts: 5,664
11-23-2007 09:44
From: Chosen Few
Simply shift-ctrl-click each one's thumbnail to select the lot, and then hit the Create New Channel From Selection button on the channels palette.


Could you explain a bit more about the advantages to doing this, Chosen? I like to have masks on different layers so that I can make new versions of the same thing by just adding new textures to them. e.g. If I make a pair of pants with a belt the pants and the belt will be on separate layers, each with it's own mask (and blend layers for highlights, shadows, texture etc.) So I can then make the the belt and the pants layer with new textures and keep the transparency.
_____________________



Kaimi's Normal Wear

From: 3Ring Binder
i think people are afraid of me or something.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
11-23-2007 10:29
I think you've explained some of the benefits of masks pretty well, Kaimi. What more would you like me to elaborate on?

If you're asking about how to use the masks to create your alpha channel, the procedure us pretty simple. If you ctrl-click the thumbnail for a mask you'll form a selection in the shape of the mask, complete with all transparency values accounted for. To add additional masks to the selection, hold down shift and ctrl-click their thumbnails as well. When you've got them all, go the Channels palette, and hit the "Make new mask from selection" button at the bottom. The entire selection (a copy of all the masks at once) will then composite into a single alpha channel. From there, you can either leave the channel as is, or you can edit it any way you want in case you want the total image transparency to differ from the sum of all the layer transparency.

A good example of where you might want it to differ would be when making something like fishnet stockings. You might use one layer mask to create the basic shape of the fishnet, and then another to create any additional patterning that might go on it (a designer logo, a butterfly patch, a flower patch, whatever). Each individual element has it's own mask, just as you'd expect.

But what if, after that, you decide you want the upper thigh area to be more opaque than the lower parts of the legs? It's not unusual for stockings to have this feature, after all. You could readjust all your individual masks, or you could just leave the masks uniform, as they were, and alter the master transparency by adjusting the alpha channel. Make the lower leg areas a bit darker in the alpha, and the whole thing (masks and all) will become more transparent in those areas. This is a HUGE time saver over editing a bunch of different masks separately, and it's a lot less destructive. You could have one version of the stockings with uniform transprancy, and another version with the more transparent lower legs, both from the same set of masks, both made within seconds of each other.

Make sense?
_____________________
.

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.
Kaimi Kyomoon
Kah-EE-mee
Join date: 30 Nov 2006
Posts: 5,664
11-23-2007 10:31
From: Chosen Few
I think you've explained some of the benefits of masks pretty well, Kaimi. What more would you like me to elaborate on?


I'm not sure what the purpose is of combining all the masks. (I think you were explaining how to do that.)
_____________________



Kaimi's Normal Wear

From: 3Ring Binder
i think people are afraid of me or something.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
11-23-2007 10:50
Looks like I was editing my last post to add to it while you were writing your reply. Let me know if you have any questions on the added parts.

Anyway, the purpose of combining the masks is it's an easy way to create an alpha channel directly from visual transparency in the image. Consider it a slightly more advanced version of what's written in the "Method 3" section at the beginning of the thread.

A good example where this technique came in really handy was a stone archway texture I recently made. The arch itself was made of stone blocks with slightly irregular shapes, to make them appear as if they had been cut by hand, as if they were centuries old. All the blocks were made from a single stone texture that spanned the canvas, and the block shapes themselves came primarily from the layer masks, along with blending effects (beveling, inner shadowing, drop shadowing, etc.).

To make the hole in the wall under the arch, I used another layer mask quickly to make a classic Tom & Jerry type "arched mouse hole" in the wall. This hole had totally clean edges, but you couldn't see that with the stone blocks sitting on top. The composited appearance was such that the blocks appeared to be framing the hole, as you'd expect.

Then, to make the alpha channel I simply composited all masks, and the texture was finished. In this way, I was able to mark off the opaque parts of the wall and the blocks very quickly while keeping the area under the arch completely transparent. Had I tried to paint the alpha by hand, it would have taken longer, and it might not have been as accurate.

Make sense?

EDIT: Oh, and by the way, since this particular wall/archway image did not need the overall transparency to differ from the layer transparency, I could have used Blackfyr's PNG method if I'd wanted to. However, if I later wanted to go back add another hole in the wall, maybe a window or something, I'd have to make a lot more changes than I'd need to with my method.

To add a window (my way), all I'd need to do would be to create the frame and make the inside of it black in the alpha channel. The fact that the window is not visually transparent in the working document wouldn't matter. But to do it visually, I'd have to either mask or erase a portion of every layer beneath the window frame. With a simple image like the one I just described, that wouldn't take all that long, but with something more complex, it could take all day.

Of course, I could simplify it a bit by grouping the layers, and then masking the group, but sooner or later groups of groups of groups can get a little ridiculous when all you want to do is punch a hole. I'd always rather keep the master transparency map as a separate element from all the individual layer transparency maps.
_____________________
.

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.
Kaimi Kyomoon
Kah-EE-mee
Join date: 30 Nov 2006
Posts: 5,664
11-23-2007 10:58
Ah, of course. I've actually been using a much clumsier method to get the same result. I love it when I finally learn the elegant way to do things - so thanks very much.
_____________________



Kaimi's Normal Wear

From: 3Ring Binder
i think people are afraid of me or something.
Kaimi Kyomoon
Kah-EE-mee
Join date: 30 Nov 2006
Posts: 5,664
11-23-2007 10:58
Oh! I see what you mean. I've actually been using a much clumsier method to get the same result. I love it when I finally learn the elegant way to do things - so thanks very much.
_____________________



Kaimi's Normal Wear

From: 3Ring Binder
i think people are afraid of me or something.
Blackfyr McBride
Registered User
Join date: 1 Aug 2007
Posts: 10
11-23-2007 13:46
From: Chosen Few
EDIT: Oh, and by the way, since this particular wall/archway image did not need the overall transparency to differ from the layer transparency, I could have used Blackfyr's PNG method if I'd wanted to. However, if I later wanted to go back add another hole in the wall, maybe a window or something, I'd have to make a lot more changes than I'd need to with my method.

To add a window (my way), all I'd need to do would be to create the frame and make the inside of it black in the alpha channel. The fact that the window is not visually transparent in the working document wouldn't matter. But to do it visually, I'd have to either mask or erase a portion of every layer beneath the window frame. With a simple image like the one I just described, that wouldn't take all that long, but with something more complex, it could take all day.

Of course, I could simplify it a bit by grouping the layers, and then masking the group, but sooner or later groups of groups of groups can get a little ridiculous when all you want to do is punch a hole. I'd always rather keep the master transparency map as a separate element from all the individual layer transparency maps.


In my updated method, using the alpha channel to modify something universal, I'd create the frame on a new layer on top, then put the universal transparency on the alpha channel. But I would only use that channel for times I wanted to modify what was seen of every layer.
Kyrstian Matova
Registered User
Join date: 28 Nov 2007
Posts: 5
11-28-2007 12:14
I, unfortunately am using Gimpshop. If someone could PLEASE make a tutorial for it, I would insanely happy.
Kell Bracken
Registered User
Join date: 23 Apr 2007
Posts: 1
12-11-2007 08:49
I, too, am using GIMP, and desperately trying to figure out how to make it work for me.
Although I have a good eye for proportion, color, texture, and style, inworld clothes-making can only take you so far. I am a computer novice, so despite reading and reading these forums and some of the tutorials, I find myself confused and lost more than half the time. Also, there is a WEALTH of info here, but it is scattered, and you can literally spend hours and hours reading to find the answer to one or two questions. Despite wanting to, some of us just don't have that kind of time to devote to learning.

And then, when I find the answer in a thread...I end up scratching my head almost as much as I did prior to reading the explanation. Too much of the terminology goes over my head. Sometimes, I think the pros know this stuff so well they assume we know simple things that we really don't. Yes, we probably should, but we all start somewhere. I guess I give beginner a whole new meaning...sigh.

I understand it will take practice and patience, but a step-by-step tutorial through one or two clothes-making sessions, would be a god-send. That's probably considered cheating in the eyes of someone who's struggled through and put in the blood, sweat, and tears of learning things the hard way...and I apologize for that...but despite the aid given, we will all muck through the learning and practicing stages to some degree. Some of us actually learn better with minimal dialogue....visuals....and a chance to DO it as we follow the directions.

I have tried Natalia Zelmanov's Day 181 Creating Clothes...a step by step GIMP tutorial for making a simple shirt...and it was great. I need to make male clothing, however...not a woman's shirt...lol. STILL, it was great, because I was able to see how to use the tools and have a chance to do it as I was following her explaination. It was simple, basic, visual, and written so even I could follow.

HOWEVER, I mucked something up on my GIMP work palete, and cannot for the life of me figure out what I did or how to recoup my original tools. On the GIMP tool palette I have my tool images at the top, but when you click on one of those tools, it should bring up modes at the bottom of the GIMP Tool Palette....and mine no longer does. In other words, when I select the 'Create and Edit Paths' tool, at the bottom of the palette I should see options to design, edit, move, create selection from path, stroke path...etc. I don't see those options, and don't know how to get them back. I had them at one time...but they are now gone.

I've spent hours reading GIMP program info, and playing with things, but I am having no luck. I have even tried reloading GIMP, to see if a new version would work the way my original one did, but it doesn't. Right now, I'm feeling rather frustrated, and it's probably a very easy problem to fix...but I have no clue how to do that.

If anyone has any suggestions, I'm open to trying pretty much anything right now. Thanks.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
12-11-2007 11:49
The reason I haven't added a GIMP tutorial yet is twofold. First, I haven't had time to learn GIMP to the point where I feel comfortable trying to teach it. It's so nonstandard in so many ways. Already knowing Photoshop, I was able to learn enough about PSP to teach it competently within just a few hours. Most commercial paint programs adhere to a common logic, so transitioning from one to the next is more or less painless. That's just not the case with GIMP, however.

The second reason is a direct result of the first. I haven't yet figured out how to get GIMP to use transparency in any way other than WYSIWYG. While some consider WYSIWYG to be a good thing, since it's easy to understand at first glance, it's not always the most effective way to work. There are lots of times when editing your transparency map as a grayscale image, separate from the apparent visible transparency of the working image, is an extremely important thing to be able to do. I'd be very surprised if GIMP is truly incapable of this, but I have yet to discover how it does it.

When I do learn enough about GIMP to speak on it more intelligently, I'll certainly add a tutorial (or several) to it to the beginning of this thread. Until then, you'll have to make do with whatever you can find elsewhere. Sorry.
_____________________
.

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.
SnakeArsenic Zabelin
Registered User
Join date: 4 Jul 2007
Posts: 15
12-16-2007 11:04
Chosen Few, you cannot edit the channels directly in GIMP from the Channels dialog, you can only disable the channels you are currently using and some of the tools(eg. the brush) seem to rely on at least one colour channel being enabled to edit the image.

You could use masks, but there is a way to edit all the channels as layers.

When you're ready to edit the alpha, you can go to "Filters > Colors > Decompose" and choose RGBA to make a new Grey+Alpha image with the individual channels as layers (red, green, blue & alpha). It looks like the grey channel is all that's needed for all the tools to work.

When you are finished go to "Filters > Colors > Compose" and chose RGBA to make yet another image with the RGBA layers as the channels.

Hope that helps.
Lana Tomba
Cheap,Fast or Good Pick 1
Join date: 5 Aug 2004
Posts: 746
Gimp
12-16-2007 11:15
I've used teh GIMP for over three years now..did all the updates and plugins..it has a learning curve of a second grader(prolly why i stuck with it) and also is "free".

I've been able to add alpha channels..compose offset textures..take apart GIFs and make offset textures as well with this proggy..It also has a nifty lil texture making script FU function which is quite handy...font plugins for logos etc and even hue saturation functions that totally remove that "white glow" around your avatar when trying to super impose a TGAd snapshot of yourself .Lighting effects etc make this a very attractive proggy to me.

I have PS....dont know why..I'm totally hooked on teh GIMP..old dogs and new tricks and all that.

~Lana Tomba
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
12-16-2007 12:22
Snake, thanks for that. I'm sure your tips will be very helpful towards my learning what I need to know to write some decent tutorials. I'm reluctant to write anything until I've taken the time to get really fluent with the program, but I think you've probably steered me considerably closer to the right direction on this particular subject.

For what it's worth, the work flow you described is exactly the kind of non-standardness (if that's a word) I was talking about. GIMP is very powerful, but it manifests that power in such unusual ways, it's incredibly difficult for people already trained on commercial software to understand whatever logic might be behind it. I've never heard of "decomposing" an image in the fashion you described. No other program I know of has such a function.

Lana, I'm not sure what kind of learning curves second graders have or even how that description might make sense, so I'm afraid I don't understand what you mean. In any case, I do agree with you somewhat on the "old dog, new tricks" sentiment. Once people learn any certain methodology, it can be difficult to learn a different one. (And since I'm just that much of Discovery Channel fanatic, I can even tell you why. It actually takes significantly more chemical changes in the brain to break a habit than to form one. We're wired for habit.) I just find it unfortunate that while almost every image editing program on the planet adheres to similar, if not identical, underlying logic, so that habits are relatively easily transferable from one to the other, GIMP stands more or less alone as just about the only one that does not.

I'll definitely add tutorials for it though whenever I can get comfortable enough with using it.
_____________________
.

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.
SnakeArsenic Zabelin
Registered User
Join date: 4 Jul 2007
Posts: 15
12-16-2007 14:13
Chosen Few, my Photoshop background is in large-format print and it is not uncommon to split channels or "decompose" as Gimp likes to call it to make better use of certain printers and inks or a final touch-up, I'm just glad it could translate.

I've been dedicated to learning Gimp for about a few months now and there are a few places where it excels over Photoshop and PSP, especially the perspective tool and it is a very different program and well worth the time just to play around in the menus a bit to get used to it. I've also learnt to expect everything to be new and it's a lot of fun!
Colomben Bailey
Registered User
Join date: 14 Feb 2007
Posts: 4
12-31-2007 05:18
Good!

About file format I usually use PNG as it also support transparency, it's supported by SL and according to my test, generally provides lighter texture files.

The same 1024x1024 texture (with transparency) is 4097 kb in TGA and 1297 kb in PNG.

One point for PNG, it's directly viewable in XP thumbnails.

Regards,
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
12-31-2007 08:17
From: Colomben Bailey
Good!

About file format I usually use PNG as it also support transparency, it's supported by SL and according to my test, generally provides lighter texture files.

The same 1024x1024 texture (with transparency) is 4097 kb in TGA and 1297 kb in PNG.

One point for PNG, it's directly viewable in XP thumbnails.

Regards,

Colomben, please read my other sticky, the one about file formats. Yes, PNG files will be smaller than TGA files. PNG is a compressed format; TGA (usually) is not. There's your difference right there.

However, the PNG compression, or lack thereof, makes no difference whatsoever to how the file will turn out in SL. All images in SL are stored in JPEG2000 format. The TGA or the PNG is just your client-side source format. Neither actually gets uploaded. As soon as you hit the Upload button, your source file is copied to a JPEG2000, and it is the copy that gets uploaded, not the original. Server side, SL is never even aware that your source file had ever existed in the first place. All it knows about internally is JPEG2000. As far as the system itself is concerned, there is no other format.

In any case, there is one potential drawback to using PNG, which is why I recommend TGA over it. Because PNG supports both alpha transparency and simple transparency, sometimes the conversion to JPEG2000 gets botched, and you end up with a 32-bit texture in SL where you meant to have a 24-bit texture. If any color in the PNG has any degree of transparency in it (whether deliberate or accidental), SL will think you want the file to be 32-bit, so it will throw an alpha channel into the JPEG2000.

Needless to say, having 32-bit images where you don't need them is bad. It causes sorting problems, and it makes the files 33% larger than they need to be.

This potential for accidental 32-bit files is just one reason among many why it's better to keep transparency information and color information as completely separate image elements. Because TGA inherently keeps them separated as individual channels, there's zero margin for error there.


Oh, and as for TGA thumbnails in Windows, there's an easy fix. Just install Greggman's thumbplugs. He's got thumbnail plugins available for TGA, PIC, and IFF. http://greggman.com/pages/thumbplug_tga.htm

Don't think of Windows' lack of ability to do this without a third party plugin as somehow a shortcoming of the TGA format itself. It's absolutely an example of Microsoft being idiots. As I've said many times in this thread and elsewhere, TGA has been a major staple of the graphics industry for decades. The fact that MS never saw fit to build their own thumbnail plugin for it is completely ridiculous.

On a side note, if you also want thumbplugs for PSD and AI files, you can grab them here:
http://www.sitepoint.com/blogs/2005/12/13/adobe-cs2-and-the-case-of-the-disappearing-thumbnails/
_____________________
.

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.
Chawndra Jewell
Registered User
Join date: 3 Apr 2007
Posts: 5
photo elements madness,....
01-15-2008 23:29
not to sound completely illiterate ,.. but could u walk through the whole PSE from the begining ,.. first, when i start out making a background ,. do i start with a transparent or white one ,also i have a premade pattern im trying to use for a fabric with the part i want transparent "cut"out of the material, i have other patterns and thing s saved for all the times i have tried but failed to follow the proper steps ,. and cant get my "selection" to give me the alpha1 i need when i save all it says in the save selection is "new",.. i have tried to clear all history and clipboard to try to start with a clean slate ,.to no avail,.. please help
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
01-16-2008 08:34
From: Chawndra Jewell
first, when i start out making a background ,. do i start with a transparent or white one

It makes no difference. The only transparency information that will be visible in the final outputted texture will come from the alpha channel. It doesn't matter if the background in the working document is transparent, white, or pink with purple polka dots. All that matters is what's on the alpha channel.

From: Chawndra Jewell
also i have a premade pattern im trying to use for a fabric with the part i want transparent "cut"out of the material, i have other patterns and thing s saved for all the times i have tried but failed to follow the proper steps ,. and cant get my "selection" to give me the alpha1 i need when i save all it says in the save selection is "new"

First, make sure you're reading the PSE tutorial, not any of the Photoshop tutorials. You probably won't get anything in PSE visibly called Alpha 1. If I recall correctly, you don't get any choice whatsoever in naming your saved selection. The program is just going to call it whatever it wants.

If I'm wrong about that, and you are in fact given an opportunity to name the saved selection, then call it whatever YOU want. It could be "Alpha 1", or it could be "Chawndra's Awesome Selection", or whatever else you feel like. The name doesn't matter. All that matters is that the selection be saved as a channel, and that that channel is ONLY other channel in the document besides the three color channels already present.

Again, the way it works is the first three channels (already present) define the color information. The fourth channel defines transparency information. It doesn't matter what the channels are named. For example, channel 1 is Red. You could change the name to "Grandma's Underpants" and it would still contain the red information for the image. As long as it's in the channel 1 slot in the image structure, that's all that matters. Likewise, whatever you've got in the channel 4 slot, regardless of whatever arbitrary title has been assigned to it, will be the transparency map.

Second, how have you determined the alpha channel wasn't created the first time you followed the procedure? PSE doesn't really give you any good way to tell. Did you try previewing the texture in an application that will actually display alpha transparency? Remember, PSE will not show you alpha transparency at all. In order to know if the alpha channel is there, view the image in something that will show alpha transparency, like the SL upload preview window.

Third, keep in mind that if you've done the process more than once in the same document, you now have too many channels. As I often say, alpha channels are like The Highlander; there can be only one. If you've got two or more, the transparency will fail. It's been a while since I've used PSE, but I'd be surprised if it offers no way to delete saved selections.

Check the Select menu for a Delete command. Assuming it does exist, then when you use it, it will either delete your most recent save, or it will open a dialog showing all the saved selections in the document. If it's the former, then just keep hitting it over and over again until it grays out. If it's the latter, then you'll be able to see exactly what needs to be removed. Delete all previously saved selections and start again.

Try the following just to show yourself that the procedure actually does work:

1. Create a new document, 256x256.

2. Flood the canvas with any color you want. Let's say purple.

3. Grab the circular marquee tool and create a large circular selection with it in the middle of the canvas.

4. Go Select -> Save Selection.

5. Save the image as 32-bit TGA.

6. In SL, go File -> Upload, and select your new TGA image. How does it look in the preview window? If you did everything right, you should see a solid purple circle against a transparent background. The transparency will be indicated by the presence of a checkerboard pattern. For proof that it is indeed transparency, and not actually a checkerboard, move the preview window around. You'll see that the pattern remains still while the window moves around in front of it. The checkerboard is not actually part of the image; it's the absolute background behind it.

If that process worked for you, then the process outlined in the tutorial will work as well. The only difference is that in the tutorial, you're using a different method to form your selection. What you're actually doing with the selection after that is exactly the same.


From: Chawndra Jewell
i have tried to clear all history and clipboard to try to start with a clean slate ,.to no avail

The history and the clipboard have nothing to do with it.



On a side note, if you have any further questions, please punctuate them properly. Your post was quite difficult to read. A lot of people automatically ignore any post that doesn't make use of normal punctuation. I do ignore a lot of of them since they take so long to read. I just happened not to have ignored this one.
_____________________
.

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.
Archie Lukas
Transcended
Join date: 5 Jan 2007
Posts: 115
compressed files
01-22-2008 03:53
Compress images - this makes them into jpeg 2000 files

but stupidly it adds the suffix *.j2c
if you change the suffix to *.jpe they will open in your photo processor.


they are the same -just named wrongly; Lindens -you Fools!
_____________________
Archie Lukas

"Just the facts ma'am"
MI5
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
01-22-2008 07:19
From: Archie Lukas
Compress images - this makes them into jpeg 2000 files

but stupidly it adds the suffix *.j2c
if you change the suffix to *.jpe they will open in your photo processor.


they are the same -just named wrongly; Lindens -you Fools!

What exactly does that have to do with anything in this thread?
_____________________
.

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.
1 ... 4 5 6 7 8 9 10 11 12