Why no halo?
|
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
03-12-2008 14:38
I've been trying to puzzle out why I don't seem to have the dreaded white halo problem that comes up so often in this forum, and I think I have the answer. Chosen, Robin, .... somebody ... tell me if this is a solution or if I've just been lucky .....
It seems to me that the white halo appears when there are no pixels beyond the edge of the areas that are opaque (white) in your alpha channel. All of the methods that people use to beat the halo involve somehow guaranteeing that there IS color out there. The Gaussian blur method and the Flaming Pear plug-in simply drag pixels from your "fabric" into transparent areas of your image, and the trick of putting a darker layer at the bottom of your stack assures that there are NO transparent areas once your file is flattened. Right?
Well, when I work, I never trim my fabric layer(s) to match the outlines of the finished clothing. In the very simplest case -- say, a blouse that is made of a single fabric -- the topmost layer in my PSD file is 100% fabric from edge to edge. Nothing cut out. If the work is more complicated -- say, a shirt with piping around the collar -- the fabric on that uppermost layer (the piping) still goes all the way to the edge of the canvas and is only cut out where it needs to expose another fabric layer below it. No matter how many fabric layers I have, the fabric that is visible beyond the opaque (white) regions of my alpha channel always extends all the way to the edge of the canvas.
I started doing things this way because I was naive and (mostly) lazy. I just didn't want to bother with masks any more than I had to. The way I figured it, all my layers were going to be flattened on upload anyway, and the image in the alpha channel was going to do the work of "cutting out" the shapes of my pieces of clothing, so why should I go to all the trouble of cutting around them on my fabric layers?
So, tell me ... have I just been incredibly lucky in my naive way of doing things all this time, or have I accidentally been using the simplest possible method of avoiding the dreaded white halo?
|
|
Beezle Warburton
=o.O=
Join date: 10 Nov 2006
Posts: 1,169
|
03-12-2008 14:45
Do you do any sexy clothing with cutouts or stuff with tears in?
_____________________
Though this be madness, yet there is method in't. -- William Shakespeare Warburton's Whimsies: In SLApez.biz
|
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
03-12-2008 14:56
No, but it wouldn't change my method of work if I did. I still figure that the alpha channel is going to do the work of cutting out those holes, so why should I cut them out on my fabric layers too? Seems like a waste of time, and it creates a nasty halo too.
|
|
Nyoko Salome
kittytailmeowmeow
Join date: 18 Jul 2005
Posts: 1,378
|
03-12-2008 15:09
beware of replicating alpha channels via 'shift-select' in photoshop/other programs... they can radically shift the 'alpha' of your files! (there are cases where duplicating the same alpha channel to another mask channel will not result in the same 'strength' of alpha...
you will want to instead copy the layers and set them to 'screen', and make sure to compare your original files to what you are working on to make sure the new version matches.
_____________________
 Nyoko's Bodyoils @ Nyoko's Wears http://slurl.com/secondlife/Centaur/126/251/734/ http://home.comcast.net/~nyoko.salome2/nyokosWears/index.html "i don't spend nearly enough time on the holodeck. i should go there more often and relax." - deanna troi
|
|
Emily Lang
maker of Emily's.
Join date: 1 Jul 2006
Posts: 62
|
03-12-2008 15:14
Yes Roliq, that's just another way of doing things  Beezle, cutouts are taken care of at the alpha channel level.
|
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
03-12-2008 15:22
From: Nyoko Salome beware of replicating alpha channels via 'shift-select' in photoshop/other programs... they can radically shift the 'alpha' of your files! (there are cases where duplicating the same alpha channel to another mask channel will not result in the same 'strength' of alpha...
you will want to instead copy the layers and set them to 'screen', and make sure to compare your original files to what you are working on to make sure the new version matches. I agree, Nyoko. It wouldn't have occurred to me to replicate the alpha channel and use it as a mask. The way I figure it, the alpha channel is already acting as a mask, so why should I need another one? Also, If I need to change the alpha channel for any reason, I either edit it directly (with the Channels palette open), or I remake it from scratch.
|
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
03-12-2008 15:52
From: Rolig Loon It seems to me that the white halo appears when there are no pixels beyond the edge of the areas that are opaque (white) in your alpha channel. All of the methods that people use to beat the halo involve somehow guaranteeing that there IS color out there. The Gaussian blur method and the Flaming Pear plug-in simply drag pixels from your "fabric" into transparent areas of your image, and the trick of putting a darker layer at the bottom of your stack assures that there are NO transparent areas once your file is flattened. Right? Right. From: Rolig Loon Well, when I work, I never trim my fabric layer(s) to match the outlines of the finished clothing. In the very simplest case -- say, a blouse that is made of a single fabric -- the topmost layer in my PSD file is 100% fabric from edge to edge. Nothing cut out. If the work is more complicated -- say, a shirt with piping around the collar -- the fabric on that uppermost layer (the piping) still goes all the way to the edge of the canvas and is only cut out where it needs to expose another fabric layer below it. No matter how many fabric layers I have, the fabric that is visible beyond the opaque (white) regions of my alpha channel always extends all the way to the edge of the canvas. Good. From: Rolig Loon I started doing things this way because I was naive and (mostly) lazy. I just didn't want to bother with masks any more than I had to. The way I figured it, all my layers were going to be flattened on upload anyway, and the image in the alpha channel was going to do the work of "cutting out" the shapes of my pieces of clothing, so why should I go to all the trouble of cutting around them on my fabric layers? No reason you should. What you're doing will work just fine. You may ask then how come none of my tutorials say to do it that way. The answer is simply that it's harder to explain the concept that way. Most people's first instinct is to work additively, rather than subtractively. so it's just easier to go with that. I did post a subtractive tutorial once, but it wasn't in the stickied thread, obviously. Maybe I should resurrect it. From: Rolig Loon So, tell me ... have I just been incredibly lucky in my naive way of doing things all this time, or have I accidentally been using the simplest possible method of avoiding the dreaded white halo? I don't know if it's THE simlest method, but it's A simple method, and it certainly works. As you correctly guessed, the main thing is just to make sure that the pixels immediately surrounding the edges of opaque parts have the same colors in them as those of the edges themselves. There are a hundred ways to get there. Yours is a good one. From: Nyoko Salome beware of replicating alpha channels via 'shift-select' in photoshop/other programs... they can radically shift the 'alpha' of your files! (there are cases where duplicating the same alpha channel to another mask channel will not result in the same 'strength' of alpha... I'm not sure what you mean, Nyoko. Can you explain further. I've never experienced the problem you're describing. There's no way that simply making a copy of an item, whether it be a channel or anything else, should have any effect on the original item. The item shouldn't change, simply by virtue of having been copied. If what you're saying is that by applying both an alpha channel and an identical layer mask to an at the same time, can have deleterious effects, that can be true, yes. The way to prevent that is simply turn the mask off before you export to TGA. The mask can't affect anything if it's not on. From: Nyoko Salome you will want to instead copy the layers and set them to 'screen', and make sure to compare your original files to what you are working on to make sure the new version matches. I'm not sure why you'd do that. What is it you're trying to accomplish, exactly? From: Rolig Loon It wouldn't have occurred to me to replicate the alpha channel and use it as a mask. The way I figure it, the alpha channel is already acting as a mask, so why should I need another one? It's handy if you want to check quickly how the transparency looks. Put all your layers in a group, ctrl-click the alpha, and hit the New Mask button. The group will end up masked exactly as the alpha channel would mask the image in SL. You can also work the other way around. Start with a mask, so you can see precisely how your painting of the grayscale map is affecting the transparency of the image. Then ctrl-click the mask to select it, and hit the New Channel button. Your alpha channel will be created as an exact duplicate of the mask. Then simply turn the mask off (or delete it) before TGA export, and you're all set. This mask-to-channel/channel-to-mask work flow is what you would do in programs that don't have a channels palette, like Paintshop Pro or PS Elements. Photoshop just gives you a bunch of other alternatives, but the same thing works in it too.
_____________________
.
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.
|
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
03-12-2008 17:27
Hallelujah, or words to that effect. I couldn't figure out for the life of me why everyone was working so hard to get rid of a white halo instead of taking the -- to me -- simpler route of not making a halo in the first place.
Thank you, Chosen and Emily.
|
|
Nyoko Salome
kittytailmeowmeow
Join date: 18 Jul 2005
Posts: 1,378
|
03-12-2008 20:08
 guess i mean that i often make alpha channels first via 'screen'ing a white layer (with a mask layer defining how much white goes upon the underlying layers). but there's a 'big' difference between duplicating that same layer with the same 'screen' layering instead of shift-selecting the layer mask and shift-filling a blank mask with the amount. other words, i now make sure i copy/paste the whole layer (usually via dragging the whole photoshop layer) instead of simply shift-selecting a mask layer and shift-filling a new layer thinking that will wholly replicate the same mask - it does not. you will want to drag any sensitive layers/mask, instead of trying to 'recreate' them by refilling another layer (or layermask). cuz to do so otherwise will not competely recreate the same amount of alpha in the new mask. zat make sense??  )
_____________________
 Nyoko's Bodyoils @ Nyoko's Wears http://slurl.com/secondlife/Centaur/126/251/734/ http://home.comcast.net/~nyoko.salome2/nyokosWears/index.html "i don't spend nearly enough time on the holodeck. i should go there more often and relax." - deanna troi
|
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
03-12-2008 20:53
No. I thought I understood your original comment, but now I think I probably didn't. You lost me with the term "screening," so I don't really understand how you are creating your alpha channel. (Or are you maybe talking about the percentage of gray in areas that are to be semi-transparent????)
In any case, though, Chosen is right .... it shouldn't make any difference whether the image in your alpha channel and whatever mask you created it from are perfectly identical. When you get ready to prepare the image for uploading, turn off all masks. They won't show. The only thing that counts in "masking" the final clothing components is the opaque (non-black) area in the alpha channel.
|
|
Robin Sojourner
Registered User
Join date: 16 Sep 2004
Posts: 1,080
|
03-14-2008 09:07
Hi Nyoko! If I'm understanding you correctly, and I may not be, what you're saying is that you draw a layer, with various levels of transparency, and then use a mask on it. If that's what you're doing, then yes, you will change things if you just copy the layer mask to use as the Alpha Channel, because you're actually using two kinds of transparency on your layer; the drawn transparency and the mask. Using just one of them as the Alpha Channel will, obviously, not have the same effect as using both. Be careful using terms like "screen"ing, though. Screen is one of the layer blending modes, and if you use it, you will vastly change what you have; especially if the layer that you set to Screen has white on it, since anything under it will become white. (Gray makes things lighter. Only pure black has no effect on the layers below in Screen mode.) Rolig, many, if not most, of the people who are having problems with haloing are having it because they aren't just drawing the image; they are using a photograph and extracting the image from it. So it's not a question of "not making" it in the first place by using a Subtractive process. The edges are what they are. If you're not willing to sacrifice some of the edge of the image when you make the Alpha Channel, you need some method of bleeding that edge out into the image to prevent the halo. Which is where the Flaming Pear filters come in.  Hope this helps!
_____________________
Robin (Sojourner) Wood www.robinwood.com"Second Life ... is an Internet-based virtual world ... and a libertarian anarchy..." Wikipedia
|
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
03-14-2008 11:38
From: Robin Sojourner Rolig, many, if not most, of the people who are having problems with haloing are having it because they aren't just drawing the image; they are using a photograph and extracting the image from it.
So it's not a question of "not making" it in the first place by using a Subtractive process. The edges are what they are. If you're not willing to sacrifice some of the edge of the image when you make the Alpha Channel, you need some method of bleeding that edge out into the image to prevent the halo.
Hmmmmm... Not being one who typically works from photos, that insight hadn't occurred to me. Thanks, Robin. Still, unless I'm missing some technical nuance, I don't see that it makes much difference in the long run whether you start from a drawn image or a photo. As I commented in another thread last night, you ought to be able to avoid haloes if you simply start with a layer that is filled with the photo and then let your alpha channel do any necessary trimming. It doesn't seem correct that "the edges are what they are." Why do there need to be any edges, other than the ones "cut" by the alpha channel? Leaving empty pixels just seems like asking for trouble. I'm stretching to understand a good reason for leaving any part of the canvas empty once all your visible layers are stacked up.
|
|
Robin Sojourner
Registered User
Join date: 16 Sep 2004
Posts: 1,080
|
03-14-2008 11:54
Because quite often those edges are white, which causes a halo when you import to SL.  One of the ways to make it easy to take a photograph of something with highly irregular edges, such as a plant, is to put a piece of white cardboard behind it when you snap the picture. You could leave it as it is, and have that brick wall, or the heat pump, or the rest of the garden as the background; but if you did, you'd have a much harder time making the Alpha Channel, since you'd have to do it all by hand. By using a solid color, it's easy to extract the image from the background. But it does mean that the background will have to be eliminated somehow. Otherwise, even if it's not white, it can leave a halo of whatever color it was. I'm sure you've seen this when you've watched special effects on TV or in the movies, where you can see a blue or green halo around the object. That's an artifact of the Green Screen or Blue Screen. You get that in SL, too, as a green or blue halo if you're using a chromo-key setup to take RL shots of things you're going to import, or if you're taking pictures against the sky. It's even worse for people who are using royalty-free or free-to-use textures from the web. Quite often, those are flattened onto white, and have jpg artifacts in and around the white area, to boot. The edges of the image, as I said, are what they are. So is the background, and, all too frequently, it has to be removed and replaced with something that matches the colors of the edge pixels in order to look good in SL. So yes, you are right that it's just asking for trouble to leave any area of the canvas empty. That's why the Flaming Pear Solidify filter fills it. But, quite often, it winds up empty as part of the creative process, and what we're trying to explain here is how to fill it with pixels that will make your image look better when you import it, not worse. Does that explain why it's frequently necessary to extract images?
_____________________
Robin (Sojourner) Wood www.robinwood.com"Second Life ... is an Internet-based virtual world ... and a libertarian anarchy..." Wikipedia
|
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
03-14-2008 13:27
Gotcha! I was seeing the challenge the other way around. It hadn't occurred to me that the problem comes in the step of making the mask. That's what comes of not working from photos, or at least not when I'm creating work that includes an alpha channel.
As an experiment, while waiting for the response I hoped you were posting (and just did), I spent the past hour with a photo, carefully masking an excerpt to use as a mask and creating an alpha channel from it. When I use my method, turning off the mask but leaving the photo to fill the entire visible canvas, I don't get a white halo from the uploaded Targa. That's what I expected.
Given your explanation, though, the reason I didn't get a halo is that I was VERY careful in hand-cutting my mask, pixel by pixel. It was slow, laborious work -- not what I would want to do every day. If I had taken my photo against a contrasting background, it would have been even slower and harder to cut that mask without leaving some of the background pixels behind or sacrificing some of my image. I almost certainly would have seen a halo unless I used Flaming Pear or some other trick.
So, thank you for a very helpful lesson, Robin. I will continue to use my "subtractive" method for the sort of work I do. It is fast, reliable, and clean if the image is one that I have drawn from scratch. If I find myself working from a photo, though, I'll know to take one of the other routes.
|
|
Monica Weir
Registered User
Join date: 16 Feb 2007
Posts: 62
|
03-14-2008 14:42
From: Rolig Loon I've been trying to puzzle out why I don't seem to have the dreaded white halo problem that comes up so often in this forum, and I think I have the answer. Chosen, Robin, .... somebody ... tell me if this is a solution or if I've just been lucky .....I started doing things this way because I was naive and (mostly) lazy... That's what I've been calling my holy grail method of making clothes and I wish this was the way it was explained in tutorials to begin with. About a month ago, I also stumbled on this method for the same reason--being lazy and sick and tired of fiddling with fabric layers. It annoyed me to no end to cut out the fabric, then cut out the alpha and have the alpha shift a little, or the pixels go weird during the inverse commands. Finally it dawned on me to do all my cutouts in alpha. Clothing edges became sharp, fabric textures looked soft, sheer or nubby, straps cast gentle shadows onto the skin. Simple t-shirts that used to take me hours took less than 10 minutes from fabric drop to upload. Edited to add, as for working from a photo of something, Expand and Contract are my friends  .
|