Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

'ghost' line around image

Jinne Ling
Registered User
Join date: 23 Jun 2007
Posts: 24
06-04-2008 04:09
what can i do to eliminate the 'ghost' or white line from appearing around the edges of an image in a transparent texture? i usually create a transparent image by selecting an image in my image editor and then copy/paste it onto a new transparent image and then saving it as a png file -- but no matter what process i use (mask, whatever), i always have a white edge around the image. i've read that this can be prevented by 'bleeding' the image onto a new layer, but i don't understand that process or what 'bleeding' means. can someone help me?
Anya Ristow
Vengeance Studio
Join date: 21 Sep 2006
Posts: 1,243
06-04-2008 05:36
Check the "Transparency and Alpha Channels: The Definitive Guide" sticky at the top of this forum. See the section titled "Why do I see a white halo around my partially transparent images in SL?".

/109/32/80851/1.html
Jinne Ling
Registered User
Join date: 23 Jun 2007
Posts: 24
06-04-2008 05:59
but i save the file as a png file, and the png. format doesn't have an alpha channel, so this is a bit different.

torley linden and others are now recommending using the pgn format rather than the tga format for partially transparent files in sl.

(see the march 20, 2008 Tip of the Week #27)
http://blog.secondlife.com/2008/03/20/tip-of-the-week-27-making-transparent-textures-featuring-a-giant-leek/

so since there is no alpha channel involved, something other than dealing with alpha channels must be done.

any and all suggestions are welcome
Jinne Ling
Registered User
Join date: 23 Jun 2007
Posts: 24
06-04-2008 06:24
actually, i think i've answered my own question. if you fiddle with the optimizer in the png. saved file, you can pretty much eliminate any halo.

i think ...
remus Wilber
Registered User
Join date: 6 Jan 2007
Posts: 14
06-06-2008 03:49
there is an alpha channel in png's. how it handles them is different to TGA's, but it still has one. If you read chosen's sticky on graphics formats at the top it explains how images are made up regardless of file format, all the format really is, is different ways of writing the same information, and regardless what program you are in, they all, once the image is loaded in, read them the same way, either as say 3-4 8 bit channels aka PNG and TGA or indexed color like gifs.

the difference I think you refer to with PNG's is you don't NEED to go in and make a separate alpha channel to get the transparency as the software creates the information for you when it's saved.
Atom Burma
Registered User
Join date: 30 May 2006
Posts: 685
06-06-2008 08:48
A bleed is where the overlaying image is slightly smaller, therefore eliminating the ghost line. You can always fill with 50% grey as well. I always cut my alpha channels by hand. Time consuming, but much better.
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
06-06-2008 10:29
From: Atom Burma
A bleed is where the overlaying image is slightly smaller, therefore eliminating the ghost line. You can always fill with 50% grey as well. I always cut my alpha channels by hand. Time consuming, but much better.


The answer is more complicated than that. The problem to be solved is a white halo that appears when the transparent region created in your alpha channel overlaps an area in your design where there are no pixels on any layer. There are several ways to beat the problem:

1. Don't leave any regions in your drawing layers where there are no pixels. That is, if you were to merge all visible layers, there shouldn't be any places where you see a checkerboard pattern. This is my own preferred method. If I am making a dress, I fill one entire layer with the fabric -- I never cut pieces out -- and let the image in my alpha channel do all the trimming. That way, I know that there are NO places where the dreaded white halo can be created.

2. Create an extra layer at the bottom of your stack and fill it completely with a dark color (black or 50% gray, as Atom suggests, will work). That guarantees that there are no "checkerboard" regions where a halo can appear. This is a nice, simple method that a lot of people like. It has the disadvantage that it might leave a small DARK halo in places where light-colored parts of your design don't line up perfectly with edges of the alpha channel image.

3. Make the opaque regions in your alpha channel image slightly smaller than the areas you have drawn in your layers (or make the drawn areas slightly bigger than the non-transparent regions in the alpha channel). From a technical perspective, this is hard to do, but again it guarantees that there will always be pixels under the edge of any transparent regions in the alpha channel image. It also beats the "dark halo" problem because pixels at the edge of anything "cut out" by the alpha channel are automatically the right color.

4. "Bleed" some pixels from things you have drawn into the "checkerboard" regions next to them. This is a simple way to accomplish strategy #3. You can do it either by carefully using your smudge tool to smear pixels at the edge of your drawn regions into the empty, checkerboard space, or you can use a routine like the Flaming Pear plug-in that does it for you with a couple of mouse clicks.

5. Don't use an alpha channel at all. Create your work and save it as a PNG file with simple transparency. (Yes, you can also create a PNG file with an alpha channel. That's a different story.) This method is truly attractive to many people who don't want to mess with an alpha channel. The big limitation is that once you start making complicated designs, it's hard to keep track of what's transparent and to modify it easily. An alpha channel encapsulates all the transparency information in one place that's easy to see and easy to modify.

How you choose to avoid or remove the white halo is a personal matter, influenced in part by the kind of design work you do. Once you understand why the halo is there, you can devise work methods that fit your own style --- and then join in arguments on this forum about which method is "best." :)
Nalates Urriah
D'ni Refugee
Join date: 11 Mar 2008
Posts: 113
06-15-2008 21:54
Wow! THat is getting complex...

I do these all the time (Photoshop)... NP. I put a clear/transparent layer at the bottom of the layer stack... Use as many layers as I like. Save for web as a 24 bit PNG with Transparency and no mat. Import/upload with RC8+ and Lossless Compression.

If you are erasing edges in the clothes, PS can feather the edge of the brush you use and leave invisible pixels that come out as halos. THe selections in PS may also feather and not be visible. Often one can find these problems by adding a correction layer and max'g the contrast or changing layer bends to Difference.
_____________________
Nalates Urriah
D'ni Refugee - Guild of Cartographers
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
06-16-2008 06:29
Yup, that's option #5. Many people like PNG. With simple transparency, there's no alpha channel and no halo. If you don't do much difficult work with transparency or if you just can't get the hang of working with alpha channels, it's a fine choice. As Chosen has pointed out many times, though, it's not the easiest choice to use if you are making a complex design with transparent elements on several layers.

When you are using an alpha channel, all transparency information is in one place. You can see what's opaque and what's not, and can change it without having to edit multiple layers in your design that might each have transparency information in them. That's the big advantage of using an alpha channel -- it's all there in black and white (and shades of gray).

As I said before, though, there's no "best" way to work. There's a way that's most appropriate for you and the particular kind of projects you take on. Personally, I think it's smart to learn all the options so you have a choice when you run up against a new challenge. ;)
Bad Bobbysocks
Registered User
Join date: 7 Jul 2005
Posts: 99
06-16-2008 07:47
I work on a transparent layer and don't have any probs with halo and I don't use an alpha even with very complex images personally I find it easier but I draw everything and only really had an issue with the halo using cloning. I agree there is no real right or wrong way alot is trial and error and finding what suits your style of work
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
06-16-2008 10:08
From: Nalates Urriah
Wow! THat is getting complex...


I just had one of those "Wait a minute ..... what did he say?" moments, so I went back and looked at your post. It occurs to me that you may have misread what I wrote last week.

I listed five different ways to deal with a white halo, NOT five complicated steps in a single procedure. Dealing with a white halo is actually very easy with any of the five methods (well... maybe not with #3). Personally, I like alpha channels and I prefer my option #1 for most things. Like PNG's simple transparency (option #5), it never creates a halo in the first place. The other methods all work too, though. Take your pick.