Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

targa files not uploading correctly

Wendella McGettigan
Registered User
Join date: 17 Jun 2005
Posts: 7
12-26-2005 18:04
hey all! I've been trying to upload a .tga file to make clothes, it was made on a transparent background, and saved as a targa file, but when I upload it in game the background is white! What am I doing wrong?
Torley Linden
Enlightenment!
Join date: 15 Sep 2004
Posts: 16,530
12-26-2005 18:17
GOOD DAY TO YOU WENDELLA :D

If your transparency layers are set up properly, make sure the TGA is saved as 32-bit (not 24-bit). Those extra 8 bits are needed for the alpha!
_____________________
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
12-26-2005 18:24
Hi Wnedella. You need to create an alpha channel in the image and save the file as 32 bit TGA. If you don't know what that means, here's my standard tutorial for creating alpha channels in Photoshop, preceded by an explanation of what they are and how they work. I've pasted this tutorial into many threads on this forum (hundreds by now), and just about everyone has found it helpful. My girlfriend was able to follow it, and she'd never previously used Photoshop in her life so I know it's fool proof. Note that the tutorial is for a bikini top but the concept applies to anything.

Also note that this is for all versions of Photoshop other than 7.0. Adobe made an error with 7.0 that led to a serious flaw in the way it saved alpha channels in TGA files. They quickly corrected that with the 7.0.1 update. If you're using 7.0, update before you do anything else. The patch is free from adobe.com.

Color Space & Channels
Images designed to be shown on a color screen exist in what is called "RGB color space," meaning they are comprised the three primary colors, red, green, & blue. The relative brightness of each of these primary colors in each pixel determines each pixel's actual color. For example, a pixel comprised of equal values of red and blue without any green would appear to be purple.

When taken seperately, the individual values for red, green, or blue are represented by a grayscale image, a pixel map called a channel. In an individual channel, shades of gray are used to visually represent the mathmatical values that the computer uses to construct the image. White represents the maximum possible concentration of color and black represents the absense of color. Shades of gray represent amounts of color that are less than the maximum. The darker the gray, the lesser the concentration of color. The lighter the gray, the more color is present.

Channels & Transparency (Alpha Channels)
Images that have transparency have the same three primary color channels and also have a fourth channel, called Alpha, which represents opacity. In the alpha channel, white represents comlete opacity and black represents the absense of opacity (transparency). Shades of gray represent semi-transparency. The darker the gray, the more transparent. The lighter the gray, the more opaque.

So, for example, if you are making a bikini top for your avatar, the alpha channel would be white in the shape of the bikini top, and black everywhere else. The white part makes the bikini top 100% opaque so that you won't be able to see through it when it's on the av, and the black part makes the rest of the image invisible so that there appears to be nothing on the av's arms, stomach, etc.

How to Create an Alpha Channel
Let's stick with the example of a bikini top.

1. On the Layers Palette turn off all layers except for the layer that has your bikini on it. (To turn a layer off, click the eyeball symbol to the left of its name.)

2. If the bikini layer has any white space around the bikini itself, use the eraser to get rid of the white space. It's very important at this stage that the bikini be on its own layer with nothing else on it.

3. On the Layers Palette, ctrl-click the thumbnail for the layer with the bikini on it. (The thumbnail is the little picture of the layer directly to the left of the layer's name.) This will select everything on the layer. You should see the "marching ants" outlining your bikini now. If there are elements of the bikini on any other layers, hold down shift, and then ctrl-click their respective thumbnails to add them to the selection. Make sure not to include the background or any of the template layers.


4. On the Layers Palette, click the tab that says Channels to switch it to the Channels Palette. What you should see listed here are the three primary channels for your image, labled, "Red", "Green", & "Blue", and a master channel for the three, labelled "RGB". If you see any other channels besides those four, delete them now.

5. In the lower right corner of the Palette Window, locate the button that looks like a square sticker being peeled from its backing. It's the second one from the right. It's immediately to the left of the one that looks like a trash can. It says "New Channel" when you hover your mouse over it. Click it.

6. You should now see a new layer called "Alpha 1", which is currently all black. Make sure all channels except for Alpha 1 are turned off and that Alpha 1 is turned on. This should have happened automatically when you created Alpha 1, but if it didn't, do it now.

7. Your canvas should now appear to be solid black with the exception that you should still be able to see the "marching ants" outline of your bikini. Paint everything inside the outline white and leave everything outside of it black.

8. Click "Select" on the menu bar at the top of the screen to pull down the Select Menu. Click "Deselect" and you should see the marching ants disappear.

9. On the Channels Palette, trun the red, green, & blue channels back on, and turn Alpha 1 off. Now click the tab that says layers to switch back to the Layers Palette. Create a new layer by pressing the same button you previously used to create the new channel. (Just as it created a new channel while you were on the Channels Palette, it will create a new layer while you're on the Layers Palette.) Click on the name of this new layer and drag it underneath the layer with the bikini on it. Paint the new layer 50% gray or darker; black is fine. (The gray/black layer will prevent the white halo sometimes caused when Alphas are created the way we just did it. If you don't know what I mean by that, don't worry about. Just make sure to always put a gray/black layer underneath your work and you'll never have to see that white halo.)

10. Save your file as a 32-bit TGA and upload it to SL.
_____________________
.

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.
Torley Linden
Enlightenment!
Join date: 15 Sep 2004
Posts: 16,530
12-26-2005 18:51
Again, Chosen, your info is so great, I wish it was all compiled into a BOOK! And it'd be EPIC! :)
_____________________
Blaze Columbia
on Fire!
Join date: 21 Oct 2005
Posts: 280
12-27-2005 07:09
We really ought to take clips from Chosen Few (like the one shown above--I swear that Chosen types 200 wpm), Robin Sojourner, Chip Midnight and others and put them all in one place.... Now that would be a great little texture/clothes making handbook!
Mika Muromachi
Kitsune-at-large
Join date: 31 Mar 2005
Posts: 37
To Chosen - Request for aid
12-27-2005 12:32
Dear Chosen,

Please pardon this unwieldy and slightly off-topic method of contacting you. I have now attempted no less than five times to update my Adobe PS 7.0, and it has failed each time, even from a clean, new installation. If there is some other way of correcting these problems, or possibly a .zip archive of the altered files available for distribution, either privatel (from a sympathetic user) or on the net, please point me in this direction, as the problem is now quite vexing.

With apologies for the off-topic query,

Yours in respect and admiration,
Mika Kyubi (Muromachi)
Kitsune-at-Large
(who wants her last name of KYUBI in SL!!!)
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
12-27-2005 16:38
Hi Mika. Hehe, thanks for all the "respect and admiration". :)

Sorry to hear the update is not working for you. My first thought is maybe you've downloaded the wrong file, but that's just a guess since I obviously can't see what's going on. Adobe has seperate pages for Mac & PC updates. Make sure you've got the right one.

Also, as with all software updates, disable your anti-virus before installation. Anti-virus programs sometimes get confused by updaters. They see the updater trying to change the existing software, and they interpret it as a potential attack. As a result, they play better safe than sorry, and they block the updater from functioning properly.

If you've got the right updater and it really won't work, you could try installing just the Targa plug-in. It won't solve all the problems with 7.0 (there are some other bugs), but it will solve the alpha channel problem. This requires no changes to the Photoshop main program, so you there's no reason I can think of that it could fail. It's just replacing one plug-in file with another. Click the apropriate link for Mac or PC and follow the instructions on the page for installation.

Good luck.
_____________________
.

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.
Mika Muromachi
Kitsune-at-large
Join date: 31 Mar 2005
Posts: 37
12-27-2005 19:25
Many many thanks, Chosen. I greatly appreciate the direct link and the aid. I can deal comfortably with any other bugs, but this one was getting to me greatly due to its' repeated mention on the forums. I will install this little bit ASAP.
As to the matter of admiration, I most fully feel you are deserving of it for the aid you have granted to this community. Please keep up the fantastic work.

Yours, STILL with admiration,
Mika Kyubi
Kitsune-at-Large
(Who wants her name of KYUBI in SL!)