Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Uploading TGA from SL and losing the transparency

Rose Stardust
Registered User
Join date: 30 Nov 2006
Posts: 3
01-20-2007 18:40
I have some TGA files that I have upladed to my hard drive from SL. When I open these files in CS2 or PSP 10 the files no longer have any transparency. Is there any way around this problem?
Wynx Whiplash
Registered User
Join date: 25 Sep 2004
Posts: 339
01-21-2007 06:41
Still having my morning caffeine, so forgive me if I missed the point of your question. ;D

I like to save my work as a layered Photoshop file and then export as a .tga when I'm done. I keep 2 copies, the Photoshop & the targa file, on my hard drive. Sometimes I throw away the .tga one once it's uploaded to SL because after you save to targa format the file gets "flattened" and you lose your ability to easily edit the transparency.

But that doesn't help you if you didn't keep the Photoshop file! So, the best way to get back the selection is to go to the channels pallete and (oooh, forgive me if this is wrong, I use a Mac and command click) control click(?) the picture next to the mask and it'll select.

Hope this made sense - I'm back to guzzling tea. Note to self: stop answering questions when you're sleepy.
_____________________
Wynx's Whimsical Wonders
Pets, Ponies, Avatars, Tinies and FUN!
Proud member of ExtroVirtual!
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
01-21-2007 07:00
Photoshop, PSP, and other high end raster editors will not display alpha transparency by default. The reason is that alpha channels don't always mean transparency. That's what they mean in SL, but they can mean literally anything in other programs. Since PS and PSP are smarter than SL when it comes to imagery, they know enough not to make any assumptions about what the alpha channel might mean somewhere else.

If you want to see the transparency, copy the alpha channel to a layer mask. Here's how:
  1. In the Layers Palette, double click on the name of the background layer to turn it into a normal layer.


  2. In the Channels Palette, ctrl-click the thumbnail for the alpha channel to select everything on the canvas.


  3. At the bottom of the Layers Palette, click the button for "Add Layer Mask". It's the one that looks like a gray square with a white circle in the middle. Whenever you've got a selection in place, pushing the button will create the mask from the selection, so in this case, the mask will be identical to the alpha channel since that's where your selection came from.


That's it. It takes literally 2-3 seconds. (Just be sure to delete the mask if you're going to export back to TGA, or you'll end up with haloing. TGA files have no layers, so they can't have layer masks either.)

That having been said, I really wouldn't worry about seeing the transparency. As long as the alpha channel exists, the transparency data is there. When you export the file to SL, or to a video game, or to a video compositing program, or to any other program that by default interprets channel 4 to mean transparency, the transparency will be visible. It's only because high end raster editors are so powerful that they don't display it by default. It's still there though, always.
_____________________
.

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.
Rose Stardust
Registered User
Join date: 30 Nov 2006
Posts: 3
01-21-2007 09:27
Wynx and Chosen,

Thank you very much for this advice. Brilliant!! You are brilliant!!! Took me less time to do this than to open the program and find the file! Now all my TGA files are back to the beautiful transparency that I had in SL

Thanks again for your quick replies!