These forums are CLOSED. Please visit the new forums HERE
Transparency and Alpha Channels: The Definitive Guide |
|
Taylor Forti
Registered User
Join date: 15 Jun 2006
Posts: 2
|
07-17-2006 18:43
Thanks you Chosen Few, ill have to look it up.
|
cheyenne Angel
Registered User
Join date: 15 Apr 2005
Posts: 9
|
Is there an easier way?
08-06-2006 14:17
Just wanted to know is there an easier way when your painting the mask in to possibly do like the majic wand in PsP so all ya have to do is fill it in insted of painting such percicly around Your picture?
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
08-06-2006 16:06
Just wanted to know is there an easier way when your painting the mask in to possibly do like the majic wand in PsP so all ya have to do is fill it in insted of painting such percicly around Your picture? Any of the selection tools can be applied to pixels on a mask, just as they can to pixels on layers. To do what you're sayig, simply view your image without the mask visible, make your selection using whatever tool you want (magic wand, marquees, etc.), then switch over to working on the mask, and fill in the selection as you see fit. As long as you don't actively deselect, you'll still see the marching ants outlining your selection whether you're viewing the mask or viewing your layers. _____________________
.
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. |
Dan Magpie
Second Life Resident
Join date: 19 Nov 2004
Posts: 1
|
new GIMPshop tutorial
08-07-2006 10:11
FYI, I've written a tutorial for making transparent textures with GIMPshop:
Making textures with GIMPshop on the ZoomLab wiki Hope it's helpful to you. ![]() |
Autumn Beaver
Registered User
Join date: 25 Jul 2006
Posts: 3
|
OK Im a Noob...
![]() 08-11-2006 09:43
OK Maybe it is just the fact that Im retarded
![]() ![]() ![]() |
Loli Nori
キタ━━(゚∀゚)━━!!
Join date: 22 Jun 2006
Posts: 59
|
08-11-2006 10:58
I'm having trouble removing the 'white halo' from transparencies I make in Paintshop Pro 7 and have no idea how to fix it. I cannot afford a copy of Photoshop or later versions of PSP (which I am most familiar with) so I must work with what I have
![]() I haven't seen much mention of PSP7 on the forums ... so is there a way to remove the ugly white halo from my transparencies? Im having particular trouble with a picture I'm cropping out of a white background, though all of my textures have a white halo. I always work on a transparent background, so I don't understand why I'm getting the halo. If I don't work on the transparent background I can't save the image to mask for making the alpha channel. Thanks for your help. |
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
08-11-2006 21:02
I'm having trouble removing the 'white halo' from transparencies I make in Paintshop Pro 7 and have no idea how to fix it. I cannot afford a copy of Photoshop or later versions of PSP (which I am most familiar with) so I must work with what I have ![]() I haven't seen much mention of PSP7 on the forums ... so is there a way to remove the ugly white halo from my transparencies? Im having particular trouble with a picture I'm cropping out of a white background, though all of my textures have a white halo. I always work on a transparent background, so I don't understand why I'm getting the halo. If I don't work on the transparent background I can't save the image to mask for making the alpha channel. Thanks for your help. Hi Loli. I can tell you exactly why you're having haloing problems and how to solve them, but just so you're aware, I'll have to do it without providing step-by-step specifics on PSP 7 itself. That program is way too old, and I don't have it, so I can't walk you through exact procedures like menu layouts and command sequences. That really shouldn't be a problem though. The concepts I'm about to explain are universal, and since you already seem to know how to use your program, you should be able to apply this knowledge right away, without much hand-holding. Before we begin, I would encourage you to stop thinking with what-you-see-is-what-you-get mentality, and try to think more about the process of what is happening mathmatically when images are generated onscreen. That may sound a little scary or uncomfortable if you're not one who is into math, but trust me, it's not hard to understand. I don't like math much myself, but fundamentals are important, and rudimentary understanding of at least the mathmatical concepts behind image construction are important to know, even if you never care to know exactly how all the calculations are performed. Okay, first step, this might sound odd since you're apparently used to WYSIWYG, but I want you to forget all about the transparent background thing. Transparency data in a TGA is stored on the alpha channel, not in what you see in the color composite. Whatever the alpha channel says goes. Black is transparent, white is opaque, and gray is inbetween. That's it. As far as the computer is concerned, the alpha channel is the transparent background, and that checkerboard thing that you as a human user are looking at, that doesn't exist at all. That's just part of the GUI of whatever program you're using, not part of the image itself. There's no such thing as transparency, unless the alpha channel says so. So what actually happens to that "transparent" background that you think you're looking at? Well, all the computer knows is that any part of the image that doesn't have color (which your "transparent" background obviously does not) is simply colorless, and colorlessness in a TGA equals white. In other words, your transparent background is mathmatically identical to a white background, so it gets treated as if it were white. (That behavior is easy enough to obeserve just by saving 24-bit TGA. Notice all uncolored areas become white whether they were transparent before saving or white before saving.) So, put that all together, and what you've got is the foreground elements of your image against a "white" background, and where the edges of those foreground elements meet the background, there's going to be anti-alisaing. Since those colored edge pixels are anti-aliasing against white, they get lightened, very lightened. Now, when the REAL transparency data is read out of the alpha channel, all the computer knows is that those edge pixels are not transparent, and the color channels are saying that those same pixels are much lighter than the rest of the image. The (entirely predictable) result is you get a white halo. So, now that you're armed with a little understanding of the process involved in creating the halo, the method for combatting it should hopefully be fairly self evident. Don't have transparent background. It couldn't be more simple. To summarize, visually transparent = colorless, colorless = white (mathmatically), white background + anti-aliasing = lightened edge pixels, lightened edge pixels = white halo. Remove the white background from the equasion, and the white halo goes away. But wait, it gets better. The procedure you need to follow is even simpler than the concept. Just as it states in all the tutorials in this thread, all you need to do to prevent the halo is the following:
So, to put this rather lenthy post into some quick perspective, all you were missing before was one simple step. Avoid those false transparent backgrounds like the plague. You want good, solid, opaque backgrounds on the color channels, and you want to let the computer rely solely on the alpha channel for the transparency values. That is what it's there for, afterall. _____________________
.
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. |
Loli Nori
キタ━━(゚∀゚)━━!!
Join date: 22 Jun 2006
Posts: 59
|
08-12-2006 10:46
Wow, Chosen! Thank you for taking the time to write that out. It helped a TON, and not just with the halo problem ... with understanding how the whole process works. I really appreciate the time you took to explain all of this
![]() |
xCarrerax Savard
Registered User
Join date: 1 Jul 2006
Posts: 11
|
08-14-2006 14:27
Thank you so much for this very in depth information on Alpha Channels. This is how everything needs to be explained..-bows lots-..
|
Katya Koolhaas
Registered User
Join date: 20 Dec 2004
Posts: 4
|
Getting rid of whitish edges on selection in Photoshop
08-22-2006 06:04
Hi, all!
I had a good look at Robin's tutorial using alpha channel for getting rid of unwanted whitish/greyish edges on the cut out image on the transparent background. It's a great technique, but I have been doing it a bit differently - using Unsharp Mask filter. The beginning is all the same till the point after I go over unwanted transparent patches with white brush on the alpha channel. But after that I enable the image layer, choose alpha selection again and add feather to it (Select >>> Feather). Never use feather radius more than 1 pixel. Next I choose Filter >>> Sharpen >>> Unsharp mask. Threshold is better left to 0, and Amount should be very small - within 5% max. Radius - between 1.1 and 1.5. After applying this filter I invert the selection and hit delete. If this seems to be not enough, I repeat this process a few times, using very small values for Unsharp mask ( and NEVER use Sharpen Edges Filter!), especially Amount. To keep a check on what's going on I keep a contrast colored layer under my working layer. Once I am happy with the result, I DISCARD alpha channel and temporary colored layer, select the contents of the layer, and make another alpha channel - as a usual procedure for saving Alpha in .tga. You might say that you are getting a bit of unwanted sharpness with this method - well, if your take care of the Amount values, it shouldn't be a problem, but unlike in Robin's tutorial, I am not getting any extra pixels on the edges and have them crisp and smooth. |
Robin Sojourner
Registered User
Join date: 16 Sep 2004
Posts: 1,080
|
08-22-2006 07:43
Hi Katya! If the tutorial you're referring to is the video tutorial on my website, it's very old.
I don't take care of the halos that way myself any more, because I've found that Flaming Pear's Solidify filter (one of the freebies on this page, near the bottom,) does a much better and faster job. Yeah, they need updating. I'll do that in my copious free time, as soon as I feel well enough. ![]() It seems to me that you're doing several extra steps with your method. If you want the alpha to be sharper (which is the end result) why don't you simply sharpen it? I'm just curious. Remember, once you upload, the transparency is determined entirely by that alpha. The image portion can be solid, and in fact, that's the recommended way to go to make sure there are no white halos. You never need to worry about "extra pixels on the edges" of the image interfering with the shape in Second Life. They can't possibly do that, unless they are also in the Alpha. The halos are caused by flattening the image onto white during the Save as Targa process, after all. Any image pixels that are less than 100% opaque during this process are combined with the layer below them. If there is no layer below them, they are combined with white. So a pixel that is 50% red on a transparent ground becomes pink. When the rendering engine in Second Life displays the image, any gray pixels in the Alpha channel are displayed as partially transparent. This includes the anti-aliased pixels on the edges of the image. What this means, of course, is that the anti-aliased edge shows that pink pixel at 50% transparency. If you'd used a method that fills in the pixels in the image with the colors of the edge pixels, that red pixel would have been flattened onto red, not white, and would remain red. So the image would display a 50% transparent red pixel, instead of a pink one. Your method appears to work because you are, in essence. removing the anti-aliasing. In other words, you're not seeing the 50% transparent pink pixel because the 50% transparent pixel has been removed, or is no longer 50% transparent, not because it wasn't flattened onto white. Which is fine, if you want to do it that way; but as I said, it would be faster to just sharpen the alpha, and run Solidify (or something) to catch the edges and ensure that nothing will be flattened onto white. Hope this makes sense. I'm still pretty sick, but I felt I needed to answer this. ![]() _____________________
Robin (Sojourner) Wood
www.robinwood.com "Second Life ... is an Internet-based virtual world ... and a libertarian anarchy..." Wikipedia |
Enysy Mikita
Registered User
Join date: 18 Jul 2006
Posts: 7
|
Only getting 100% Transparency
08-22-2006 07:53
I'm close.... But not quite there...
I'm trying to make a Japanese home from scratch. This involves making various window panels. I'm creating wood frames etc. and then I want to have some that are "windows" (Not MS Windows ![]() I'm able to do the tutorial with my selections "reversed" to operate on the window panes and they are coming out "clear" - so I know I'm selecting the right stuff. My problem is, no matter what amount (%) of "gray" I paint with, I only get clear panes. I want semi-transparent. My next questions is: Should I be able to make a colored pane semi-transparent also? How would I do that? Last question: What is the best way to get the most clear and focused image for my frames in the windows? Thanks in advance for your help! Enysy |
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
08-22-2006 08:23
My problem is, no matter what amount (%) of "gray" I paint with, I only get clear panes. I want semi-transparent. Are you using Photoshop 7.0 or did you ever at any time install an automated alpha channel creator? If the answer to either of those questions is yes, then you won't be able to create alpha channels properly until you repair your Photoshop. If you're using 7.0, upgrade to 7.0.1 (for free) by downloading the patch from adobe.com. If you're using a different version, but you killed your TGA saver utility by installing any of that automation crap, uninstall and reinstall Photoshop. If that's not what's going on, then it's somethng in your technique that's the problem. When you're painting gray, you are painting directly on the alpha channel, not on any of the color channels, right? My next questions is: Should I be able to make a colored pane semi-transparent also? How would I do that? Absolutely. I'd highly recommend you read through the entire FAQ section of this thread for a detailed understanding of what channels do and how they work. To summarize quickly here, it's the alpha channel and ONLY the alpha channel that contains transparency data. Whatever's going on on the color channels has absolutely nothing whatsoever to do with what happens on the alpha channel, and therefore nothing to do with transparency. So, if you've got a bright red square on your color composite, and that same square is black on the alpha channel, it will end up invisible, even though the color channels say it's red. By the same token, if that square is gray on the alpha channel, you'll end up with a square that is partially transparent, and since the color channels say that square is red, you'll get a partially transparent square that happens to be red. Last question: What is the best way to get the most clear and focused image for my frames in the windows? Not sure I understand the question. What do you mean by "clear and focused"? Whatever you paint is what you'll get. If you want something to look clean, paint it cleanly. If you want it to look blurred, blur it. I have to assume I'm missing somethig in the question. Please explain what you're actually trying to ask. And, if it's not an alpha channel question, please post it in a new thread. It would not be a good idea to divert this alpha channel guide to other topics. That's not what it's for. I'm happy to help with any question I can, but this particular thread is just for alpha channel stuff. _____________________
.
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. |
Katya Koolhaas
Registered User
Join date: 20 Dec 2004
Posts: 4
|
That's cool
08-22-2006 10:25
Thanks, Robin,
I wasn't aware that the tutorial was outdated, and yes, I forgot to mention that I started using Solidify Filter of late. Anything which makes it faster would help! ![]() But, by the way, just removing anti-aliasing makes the edge more jaggered, Unsharp mask helps to fine-tune it, so to speak... But, well, I guess, I'd rather try your suggestions. ![]() Get well soon! And I LOVE your website! |
Enysy Mikita
Registered User
Join date: 18 Jul 2006
Posts: 7
|
Getting only 100% Transparancy
08-22-2006 14:49
Chosen,
Thanks for th quick reply! Quote: "Are you using Photoshop 7.0 or did you ever at any time install an automated alpha channel creator?" No, CS2. Quote: When you're painting gray, you are painting directly on the alpha channel, not on any of the color channels, right?" Correct, only the Alpha chanel. I'm using the fill command. Each end of the % from 20% - 80%. This is what doesn't make sense according to the tutorial. Quote: "Absolutely. I'd highly recommend you read through the entire FAQ section of this thread for a detailed understanding of what channels do and how they work." Several times now <smile> Quote: "To summarize quickly here, it's the alpha channel and ONLY the alpha channel that contains transparency data. Whatever's going on on the color channels has absolutely nothing whatsoever to do with what happens on the alpha channel, and therefore nothing to do with transparency." Quote: "So, if you've got a bright red square on your color composite, and that same square is black on the alpha channel, it will end up invisible, even though the color channels say it's red. By the same token, if that square is gray on the alpha channel, you'll end up with a square that is partially transparent, and since the color channels say that square is red, you'll get a partially transparent square that happens to be red." So, should the panes in my soji screens have color, I should place the panes on their own layer? I should select them and add an Alpha chanel, paint that chanel with a percentage of gray to reflect the level of transparancy I'm looking for - right? When I save the file as Targa, Should I merge the layers first or not? Limits are one Alpha channel per image, or layer? So far only using one BTW. The focus question I can ask elsewhere. Sorry for the off topic. Thank you for your help. I hope my answers help make it clear what my questions is and what I'm seeing. We will get there <smile> Enysy |
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
08-22-2006 16:18
No, CS2. Correct, only the Alpha chanel. I'm using the fill command. Each end of the % from 20% - 80%. This is what doesn't make sense according to the tutorial. Not sure where you're having the problem then. Common causes of trouble include using PS 7.0 (which you're not), using automated alpha channel generators (which you're not), having more than one alpha channel present, and not saving as 32-bit TGA. The latter two generally cause a lack of transparency, not an overabundance of it. I'm sorry I'm having such trouble diagnosing the problem, but it's hard to imagine what might cause the transparency to be either full on or full off with nothing inbetween. Maybe if you outline your exact procedure? So, should the panes in my soji screens have color, I should place the panes on their own layer? Placing them on their own layer will make selection easier, but it's not a necessity, just so you know. I should select them and add an Alpha chanel, paint that chanel with a percentage of gray to reflect the level of transparancy I'm looking for - right? Yes. When I save the file as Targa, Should I merge the layers first or not? I usually recommend not flattening. It won't affect the TGA output either way since TGA's are inherently flat, but for archival purposes, it's always best to preserve your layered work (as a PSD). If you need to edit something later, it will take a lot longer if all you have to work with is the flat TGA. Limits are one Alpha channel per image, or layer? So far only using one BTW. Per image. TGA files can only contain a maximum of 4 channels (Red, Green, Blue, and Alpha). Just so you know, channels and layers are not related or dependant on eachother in any way. All color images intended for screen display will always have the three RGB channels, and then possibly one or more alpha channel depending on the specific properties of the image (properties besides transparency would be things such as bump, specularity, lighting, etc., which don't exist in SL), regardless of how many layers they have. You could have an image with one layer and a hundred alpha channels, or an image with a hundred layers, and one alpha channel. Again, for SL purposes though, always make sure you have no more than one alpha channel present. _____________________
.
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. |
Enysy Mikita
Registered User
Join date: 18 Jul 2006
Posts: 7
|
Translucent doesn't work
08-22-2006 19:46
Chosen,
Well, I've hit the wall.... (And now my hand really hurts...) I have several friends in game who are builders... I'm using the same steps they are... Works for them, not for me. This example is not using Alpha, but they do it this way. I've tried this with Alpha (coloring the Alpha channel) as well... No go. 1) Draw a layer with a square that covers the document. Make it 80% (or some value) 2) Create a new layer and draw something with a hole in it to see the underlying layer's translucent qualities. 3) Save as TGA 32 bit. I have a sample image that I created using Alpha that is 100% clear. Works fine. Shows a checkered background in SL preview. My partials, show fine in PS CS2, show solid in SL Preview and when uploaded. I've updated my PS CS2 to the latest and greatest. If anyone has any ideas I would welcome them. Thanks, Enysy |
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
08-23-2006 07:06
This example is not using Alpha, but they do it this way. I've tried this with Alpha (coloring the Alpha channel) as well... No go. Sounds like your friends are using Photoshop 7.0, or one of those automated thingies I was talking about. That's the only way layer transparency would affect overall image transparency upon TGA output. Even after all these years since Adobe abandoned that failed experiment, there are still some people out there who are convinced the PS7 methodology is a time saver. In actuality, it doesn't save any time at all; it just saves the effort to learn how to use alpha channels properly by offering those people an excuse not to. The result is files that are incompatible with most graphics applications, images that are quite sloppy dues to lack of control, and somewhat destructive workflow, not to mention that certain types of images (like stained glass windows) actually take a lot longer to produce. 1) Draw a layer with a square that covers the document. Make it 80% (or some value) 2) Create a new layer and draw something with a hole in it to see the underlying layer's translucent qualities. 3) Save as TGA 32 bit. I believe the part I highlighted in bold is where you're going wrong. I'm assuming by "80%", you mean 80% layer transparency (there are hundreds of possible things that could mean, but since we're talking transparency, I'm guessing). If so, you seem to be confusing layer transparency with channel transparency. There's a huge difference. Only formats that support layers can possibly understand what layer transparency means. TGA is inherently layerless, so regardless of whether you set the bottom layer in the source document to be 100% transparent, 100% opaque, or anywhere inbetween, it will ALWAYS be totally opaque as a TGA. As far as the TGA file knows, the only transparency data present is that contained in the alpha channel. Nothing else exists. I have a sample image that I created using Alpha that is 100% clear. Works fine. Shows a checkered background in SL preview. My partials, show fine in PS CS2, show solid in SL Preview and when uploaded. Again, the part I've hilighted in bold sounds problematic. When you view a TGA file in Photoshop, it shouldn't be showing you any transparency by default, even if you've got an alpha channel present. TGA's in Photoshop will always look completely opaque. The reason, just so you know, is that interpreting the alpha channel to mean transparency is the job of whatever program the file is destined for (in this case, SL). Alpha channels don't automatically mean transparency; they could mean all sorts of things, and since Photoshop is a full-featured raster editor, fully aware that alpha channels have multiple purposes, it makes no assumptions about what any particular one might be for. Second life considers alpha to mean transparency, always, but another application could just as easily interpret it to mean bump, or lighting, or specularity, or any number of other things. If you want to see the alpha actually affect the image as a transparency map in PS, you can, but it's a rather round-about process, not a setting or anything like that. It's only done on a per-image basis, and can only happen AFTER the file has been opened and after you've performed certain deliberate actions, so there's no way it could just happen automatically. If you haven't gone through the specific procedure, you shouldn't be seeing any transparency in your TGA's at all. In case you're wondering, the procedure I'm talking about is first to change the background layer to a normal layer, and then to apply a copy of the alpha channel to it as a layer mask. Said mask is only for temprorary viewing, and you'll need to discard it before closing the file or you'll end up with haloing. Unless you've deliberately gone through that procedure, Photoshop will never visually display transparency in a TGA file. So, to put all this together, I have to assume something in your understanding of the process as a whole is amiss. I'm trying hard to think what it might be, but without seeing exactly what you're doing, it's hard to pinpoint it. Sorry I don't have a better answer for you yet. I'm sure we can solve this, but it may take some more dialog. _____________________
.
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. |
Enysy Mikita
Registered User
Join date: 18 Jul 2006
Posts: 7
|
Transparency - No, call it "Translucence"
08-23-2006 12:26
Chosen,
For the moment, let's forget about discussion of Adobe PS version "whatever" and concentrate on CS2 - which is what I am using, both PC and MAC. This I think I totally understand <smile>" Quote from Tutorial: "Again, images that have transparency start with the three primary color channels, but also have a fourth channel, called Alpha, which represents opacity. They therefore exist in what is called RGBA color space, obvious extension of RGB. " Got it! I can make a totally transparent portion of the image using an Alpha channel. It works. What I want to do that isn't working: Quote from Tutorial: "For RGBA images, white in the alpha channel represents complete opacity and black represents the absence of opacity (transparency). Shades of gray represent semi-transparency. The darker the gray, the more transparent. The lighter the gray, the more opaque." Thanks, Enysy |
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
08-23-2006 14:00
Enysy, let's try a different approach. Please do the following, and let me know what happens.
Assuming you do everything correctly, what you should see on the prim is a square image with a solid colored border around it, and 4 vertical sections of varying transparency. The section on the left should be completely transparent, whith the word "Transparent" printed opaquely, and appearing to float in mid air near the top. The section immediately to the right should look partially transparent, with "50%" written opaquely near the top. The next one should look mostly opaque, but still a bit see-through, with "75%" written opaquely near the top. The section all the way to the right should be totally opaque, except it should have the letters of the word "Opaque" appear to have been punched out of it so you can see through them. EDIT: Here's a quick render of a texture (rendered in Maya since SL is currently offline), which I created exactly as I outlined above, so you can see what it should look like. The texture just has two components, one solid red layer, and the alpha channel I just gave you. I applied it to a polygonal plane (analogous top applying it to a cube in SL), and then I put it against a simple background to demonstrate that it could be seen through. ![]() Notice the variance in transparency, created entirely by the different gray values on the alpha channel. If you're unable to get the same effect yourself, then either there's something very wrong with your Photoshop, or I'm unable to explain how to do it in terms you can follow. If it's latter, I apologize, but I'm not sure how else to cover it. Perhaps a video? I really want to make sure no one's confused on this. _____________________
.
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. |
Enysy Mikita
Registered User
Join date: 18 Jul 2006
Posts: 7
|
Making progress
08-24-2006 16:45
Chosen,
Without even posting the results, I can say that your steps worked. The results I see are very much like the example you posted. I’m excited at the progress we are making. Now here is the next step to making my shoji screens work, that is not working for me. For my shoji screens I have two layers: 1) The top layer is the frame of the shoji screen. It is a wood frame that should stay full opacity. 2) The second layer is the paper part of the screen. In my screen I’m working on, it is a sort of yellow color. This is the layer I want to make translucent. In our test, we are using only one layer and applying an Alpha layer to it and then applying the grayscale image (I tested this by drawing a gradient to the Alpha layer and that works too as expected). Where my project yields undesired results now, is it seems no matter what I do, the Alpha effect is applied to all the layers so the frame has the Alpha effect just like the paper background. I need to understand a method to apply the Alpha effect ONLY to the bottom “paper screen” and not the top layer, the shoji frame. Thank you Chosen! Enysy |
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
08-25-2006 06:59
Enysy, I'm glad to hear you're making some progress. Here's a sample sholi screen type image I whipped up real quick, and an example of what its alpha should look like. The image itself is a little rough since I made it in all of about 60 seconds, but it should be enough hopefully to help you complete your understanding of how alphas work.
If the RGB composite looks like this: ![]() The alpha channel should look something like this: ![]() Notice that the area that constitutes the framework in the image is white on the alpha, so it will be completely opaque. The area that makes up the screening is gray on the alpha, which which will make that part if the image translucent. It's a fairly light gray, so it will be more towards the opaque side of the transparency scale, but since these screens are made of paper in RL, which isn't incredibly see-through, you might want to go even lighter with it. The lighter you go (on the alpha channel), the less you'll be able to see through it. As for your observation that the alpha channel is affecting all the layers, that's exactly what it's supposed to do. As I said before, layers and channels are not dependant on eachother in any way. In fact, the TGA format doesn't even know layers exist. Whatever happens in a channel will always affect the image composite as a whole, regardless of whether that composite is put together from a thousand layers or just one. Think of it this way. If all the layers in an image got together to play football, the channels wouldn't be players in the game. They'd be the sunlight shining down in the field, the dampness of the earth beneath the players' feet, the temperature of the air, stuff like that. Channels affect the image globally. Layers are just the players on the field. I hope that makes sense. Anyway, let me know how you make out. I think you're almost there. _____________________
.
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. |
Enysy Mikita
Registered User
Join date: 18 Jul 2006
Posts: 7
|
Success!
08-25-2006 22:05
Chosen,
Success! I get it. I know these details were there to be seen, but in my particular application, they alluded me. For anyone trying to follow this thread, please let me detail where I was struggling so that if anyone is helped, I can maybe “Pay It Forward” a little. So, the trick for this type of image is that you really need more than one, (in my case two) gray contents applied to the one Alpha channel. The examples so far seem to all point to one application of the effect. This would be great if I was say for example, rendering some open curtains to the outside, but I’m my example, I need an Alpha effect for the panels ie: show translucence, and one for the frame, opaque. I realize I'm not as detailed in my steps here, but I'm focusing on the steps for my shoji. Steps: For my shoji, I create the image using two layers, one is the “frame”, the other is the “paper” or “window”. You can vary the order of which layer you want to use first, but you will be applying Alpha effects to a selection, and then the inverse of that selection. Turn off the “paper” or “window” layer to make this easy. Using the frame layer, select the open spaces where the paper goes. For me selecting the contiguous option was helpful. You are selecting everything but the frame. Save the selection. This is just good process if you need the selection again for something. Go to the channels tab and create an Alpha channel. If the selection layer is there, delete it. Load and apply your selection to the Alpha channel if you don’t just have it already. Paper windows: Go back to layers and make sure you have the “Paper” layer selected. Then, go back to the Alpha Channel. For the selection of the paper windows, with your selection of the paper areas, apply the value of gray to yield the translucence you wish. Next, go back to the layers and select the frame layer. Go back to the Alpha channel and select the inverse – ie: the frame. The frame will be full opacity so fill the frame regions with white. Now, save you tga file and go to the SL client. Choose to upload it and preview you image. If it doesn’t look right, you did something wrong so don’t bother uploading it <smile>. You may have a project that requires different opacities in several different areas of your image. You can use various selections all on the same Alpha Channel as required. I want to thank Chosen for all the assistance and patience. I hope my experience and description will be helpful to others wanting to use this technique to for obtaining varried opacities and / or translucence for multiple sections of an image. I am obviously not “the expert” here, but if I can be of help, I will do my best. Enjoy! Enysy |
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
08-26-2006 06:32
I'm glad you got it solved, Enysy.
![]() Please do me one favor though. Please edit your last post to remove all instances of the phrase "alpha layer", and replace them with the proper wording, "alpha channel". Confusion over layers and channels is one of the biggest things I've been trying to combat on this forum for the past couple of years now. There's no such thing as an "alpha layer". Thanks. Again, I'm glad you were able to work out the problem you were having, and thanks again for sharing how you did 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. |
Jesseaitui Petion
king of polynesia :P
Join date: 2 Jan 2006
Posts: 2,175
|
08-26-2006 16:11
I have a tattoo and the black images have an opacity of 62. How come they are turning out real dark when I upload it into SL but it looks fine in PS?
Does it have to do with the coloring the inside of the "marching ants" white when i`m in the "channels" tab? Because I noticed the more I colored it in, the outside of the 'marching ants' was turning white so I stopped... |