Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

PSP and transparency white halo

Eirynne Sieyes
PrimPlay Owner
Join date: 15 Oct 2005
Posts: 59
02-16-2007 12:35
Hi,
Lots of info on ridding the white halo around transparencies in PS, but not in PSP. I've tried extrapolating from one to the other (even tried it in PS CS2, which I'm not too familiar with), but I can't get the trick with flattening against a similar background color to work.

So, I guess this is really two questions:

1. Any specific PSP tricks?

2. Exactly how is the similar colored background used? I'm assuming it lays behind the merged image and is hidden when the layers are flattened.

Thanks in advance. This is a great forum and I'd be lost without it!
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
02-16-2007 13:20
In Photoshop, you don't "Flatten" it. If you're doing any sort of 'flattening' in PSP, that is the problem.

The black layer that you put behind the tranaparent layers is masked by your alpha channel, and the way it interprets the edges, that makes it fade to black, rather than fading to white. When you save to 32-bit tga format, it makes a file that is 'flat', plus an alpha channel. But that is not the same thing as flattening the image vefore saving it.

You may want to re-read the section on how it's done in Photoshop, so you can figure out how to apply it to PSP.
_____________________
Sorry, LL won't let me tell you where I sell my textures and where I offer my services as a sim builder. Ask me in-world.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
02-16-2007 15:28
The process is exactly the same in PSP as it is in Photoshop.

And as Ceera said, don't flatten your images.
_____________________
.

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.
Eirynne Sieyes
PrimPlay Owner
Join date: 15 Oct 2005
Posts: 59
02-16-2007 15:29
Sorry for the miscommunication.
I'm not "flattening;" I "merge visible."
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
02-16-2007 15:42
Don't "Merge Visible" with the solid color later, either. Just have a black solid-fill layer behind the transparent one when you make the .tga file. That is all it needs.

(It can also be a sloid color very similar to whatever the edges of the transparent area are, but black works fine.)
_____________________
Sorry, LL won't let me tell you where I sell my textures and where I offer my services as a sim builder. Ask me in-world.
Eirynne Sieyes
PrimPlay Owner
Join date: 15 Oct 2005
Posts: 59
02-16-2007 15:53
OK, that makes sense - I think. Have the dark image behind the transparent one...

Do you mean that (to prevent the white haloing) that I have the layer that mimicks the image colors behind my merged image when I save to tga?

And do I save to tga with the "mimicking" layer visible or hidden?

Are we still on the same page?
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
02-16-2007 16:02
From: Eirynne Sieyes
Sorry for the miscommunication.
I'm not "flattening;" I "merge visible."

Same thing. Don't do it.

TGA files are inherently layerless. Whether your working document has one layer or a million layers, the exported TGA will turn out exactly the same. When you flatten (or "merge", or whatever you want to call it), you're not affecting your TGA output in any way, but you are destroying your ability to edit your work easily if you need to.

Here's a simple example of why not to flatten. Let's walk through the steps real quick for making a simple stop sign. The problem with flattening will present itself as we go, and I believe so will your answer for how to use the de-haloing layer.

First you'd make a red octagon. Then you'd put the word "STOP" in white text over the top. Then you would make an alpha channel with the octagon area white, and the background black, so that only the octagon part is opaque on the texture. Finally, you'd put a solid red background layer behind the whole thing to prevent any haloing.

That's where you should stop and export to 32-bit TGA, but let's say you go one step further, and you do that flattening you were talking about before you export. Now, you upload your image to SL, apply it to an in-world road sign, only to discover you've got a typo. Instead of "STOP", you apparently had typed "SLOP". How the heck do you fix it? Since you flattened your layers you can't; all you can do is start completely over, and make a whole new image. If you hadn't flattened, you could simply edit your text layer to correct the spelling, and then resave a new TGA, and all would be well.

I recommend you always archive your layered work, either as PSD or in PSP's native format. Treat your TGA's just as output product, which is all they are.

And does that clear up your de-haloing confusion? The transparency data for your TGA output is stored in the alpha channel. The layer transparency you can see in PSP is a completely different thing, which has nothing to do with it. You don't want to see any visible transparency when you export to TGA, or you will end up with a halo. To prevent haloing, make sure you've got a completely opaque background with similar coloring to what's in the foreground. Don't fret over the fact that you can't see the transparency. As long as the alpha channel is there, the transparency will be there in SL.

If you'd like to know why it works that way, by the way, it's because of the nature of what alpha channels are, and the fact that PSP is pretty smart program, far smarter than SL when it comes to 2D raster graphics. Technically, the alpha channel doesn't have to mean transparency. It could mean literally anything. It's just a data map. As I've often mentioned in the past, you can even use alpha channels to calculate your taxes if you're so inclined.

Interpreting the alpha channel data to mean transparency, or anything else, is the job of the specific program reading the file. Second Life, and most video programs, happen to be set up to interpret the fourth channel in TGA files to mean transparency. That's all they know. PSP, on the other hand, won't do that by default since it knows a whole heck of a lot more about how images work, so it's smart enough to understand that that fourth channel could have any number of purposes. It makes no assumptions.

If you've got a properly made alpha channel in place, you've got your transparency map for SL in place. Don't worry about the fact that PSP isn't showing it to you.

If for some reason you do want to see the alpha transparency inside PSP, there's an easy way to do it. Simply put all your layers into a group, and apply the alpha data as a mask on the group. Just be sure to delete the mask, or at least turn it off, before you export to TGA. Again, TGA's are layerless, so they can't understand layer masks. Keeping the mask turned on at the time of export will put you right back into halo land, and you don't want to go 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.
Eirynne Sieyes
PrimPlay Owner
Join date: 15 Oct 2005
Posts: 59
02-16-2007 17:22
Thank you soooo much Chosen. You just explained how to do this in PS. I do my saves to tga in PSP, which requires merging visible, etc. Glad to hear PS doesn't!!!

Many, many thanks and *hugs* to you and Ceera.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
02-16-2007 19:22
Eirynne, I can promise you merging the visible layers is not a necessity in PSP, nor in any other raster editor that works with layers and can export TGA's. As I said before, TGA files are inherently layerless. The number and configuration of layers in you working source document are completely irrelevant to the TGA. I'd highly recommend you do NOT merge your layers for the reasons I mentioned in my last post. For best results, work as nondestructively as possible, always.

I am aware that there are several tutorials floating around that do include the step of merging the visible layers. I really wish the authors of those tutorials had given a little more thought to their instructions before publishing. A lot of people are confused on this issue. It's gotten a lot better since the transparency guide got stickied here, but there are still those who swear those old, bad tutorials are the only way to go. I'm hoping you'll let me help you not to become one of them.
_____________________
.

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.
Eirynne Sieyes
PrimPlay Owner
Join date: 15 Oct 2005
Posts: 59
02-16-2007 19:34
Hmmmm... That is VERY good information. I thought the only way to create a tga file with alpha in PSP was to merge layers - since that's how I was taught. I will certainly unlearn that method immediately! I HATE it that the image becomes uneditable!

Wow! :)
Eirynne Sieyes
PrimPlay Owner
Join date: 15 Oct 2005
Posts: 59
02-16-2007 19:53
Double WOW!!!

Not only did your method work like a charm, but it is also many fewer steps than the alternate!

Thank you!!!