Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Simple question, sorry if it has been asked. My TGA loses its tranparency?

Rockwell Maltz
Registered User
Join date: 17 Sep 2005
Posts: 34
09-22-2005 07:26
what format do I save my picture to keep it's tranparency?

Thank you ahead of time. I tried tga in photo shop, 32 bit, and for some reason it flattens it and it loses its transparency. I know sl doesnt upload gifs, so how exactly should I do it.

sorry if this has been asked before.

thanks

rockwell
Zapoteth Zaius
Is back
Join date: 14 Feb 2004
Posts: 5,634
09-22-2005 07:35
They need to be TGA's...

Heres a tutorial for photoshop and paintshop pro ..
_____________________
I have the right to remain silent. Anything I say will be misquoted and used against me.
---------------
Zapoteth Designs, Temotu (100,50)
---------------
Rockwell Maltz
Registered User
Join date: 17 Sep 2005
Posts: 34
09-22-2005 07:39
Got it, thank you.

I was having trouble with the tga flattening, I didn't realize you had to manually make a transparent layer, even if its on a transparent background.


A mod can close this. So even textures (like with clothes/body uploads) are 512 x 512?
Shep Korvin
The Lucky Chair Guy
Join date: 30 Jun 2005
Posts: 305
09-22-2005 07:55
From: Rockwell Maltz
I have them as TGA's. I have a texture with a transparent background, but when I save as a TGA it flattens the picture.


TGAs have special information attached to them - "the alpha channel" - which determines which parts of the image should be treated as transparent. When you're dealing with tgas, the "transparancy" effects shown in your editor don't count for anything, unless you explicitly load that transparancy information into an alpha channel. Check out the tutorials referenced above for a guide.
April Firefly
Idiosyncratic Poster
Join date: 3 Aug 2004
Posts: 1,253
09-22-2005 07:56
From: Rockwell Maltz
I have them as TGA's. I have a texture with a transparent background, but when I save as a TGA it flattens the picture.


Sorry, another question. What size are your textures supposed to be?



I have a tutorial in world that might help. It's screenshots and step by step. IM me in world and I'll drop one on you.

As for texture sizes, there's an interesting thread Here
_____________________
From: Billybob Goodliffe
the truth is overrated :D

From: Argent Stonecutter
The most successful software company in the world does a piss-poor job on all these points. Particularly the first three. Why do you expect Linden Labs to do any better?
Yes, it's true, I have a blog now!
Stephane Zugzwang
Brat
Join date: 26 Jun 2004
Posts: 192
09-22-2005 07:57
Here's the lore I'm living by, someone please holler if what follows is wrong:

Textures can be any size, but SL will convert dimensions in pixels to powers of 2. So 32x32, 64x64... all the way up to 1024x1024 are going to load with no rescaling.

It's actually hard to justify bigger than 256x256 in most cases. Also, you'll get a smoother, better effect and *much* faster load if you use small, tileable textures.

Non square textures (e.g. 128*256) are perfectly all right.
_____________________
Stephane Zugzwang
--
To see a world in a grain of sand and heaven in a wild flower
Hold infinity in the palms of your hand and eternity in an hour
Rockwell Maltz
Registered User
Join date: 17 Sep 2005
Posts: 34
09-22-2005 08:23
Thanks, you guys are very helpful.


I followed that photoshop tutorial (which is probably one of the best I've seen as far as simplicity), and saved my file. I close down the work, then load the texture back into my Photoshop. The background is no longer transparent. I looked at the channels though, and it shows all the layers, so I am hoping that is how it's supposed to be? No longer transparent background on the tga file, but the game itself will have it transparent?
Elianna Malaprop
Registered User
Join date: 24 Jul 2005
Posts: 15
09-22-2005 08:47
I think you might like the tool posted in this thread:
/109/8b/48537/1.html

which saves you the extra step of adding an alpha mask before you save.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
09-22-2005 09:55
From: Elianna Malaprop
I think you might like the tool posted in this thread:
/109/8b/48537/1.html

which saves you the extra step of adding an alpha mask before you save.

Actually, I wouldn't recommend using that. It will save you a little work, but it's not going to yield very precise results. You'll quite often end up with a white halo around your images if you use it. Let me share a little Photoshop history here, and then I'll answer the question on how the image will have transparency in SL even though it doesn't appear to have transparency in Photoshop.

The "tool" described in that thread is the TGA saver from Photoshop 7.0, the only version of Photoshop ever to toy with automatic alpha channel creation for TGA's. As the autohor of the other thread mentioned, "advanced users" don't like it. Let me explain why.

When PS7 first came out, I thought it was really cool. No more having to bother "painting" transparency into images, what an improvement, right? WRONG!

It quickly became apparent that this auto-alpha process was seriously flawed. Unlike a human being, the software has no way of determining what it is you really want your image to look like. Because of that, the automation often led to several problems. Areas of partial transparency became really hard to get right. Anti-aliasing along edges caused ghostly white halos, which could not be gotten rid of.

In short, for lack of a better term, this thing was kind of the lazy man's dummy approach to transparency, and it didn't work very well at all. It provided no way to precisely control the appearance of the image.

Realizing the error of their ways, Adobe very quickly released a patch (7.0.1), which restored TGA workflow to how it had always been before, and they've kept it that way ever since. They learned an important lesson: if it ain't broke, don't break it.

So, if you decide to use that "tool" from 7.0, do so at your own risk. Understand that while it appears to save a little effort, it seriously compromises the quality of your work, and for complex images with lots of variation in transparency (like, say, a stained glass window, for example), it will actually greatly increase the amount of time and effort you'll have to spend in order to get your work to look right. The best thing to do is to learn once and for all the ins and outs of alpha channels, and get in the habit of making them. Once you develop the habit, it shouldn't take you more than a minute or so to make even the most complex alpha in the world. It's a really simple process.

From: Rockwell Maltz
I followed that photoshop tutorial (which is probably one of the best I've seen as far as simplicity), and saved my file.

It seems like you learned the basics from that tutorial, which is a good start. Personally though, I'm not a fan of that particular tutorial, since it doesn't actually teach you any conceptual understanding of why you're doing what you're doing, just a quick how-to without any why. I've always been of the opinion that if you teach someone the why's behind what they're doing, they'll never have to memorize the how; they'll just know it. But, If you only teach them how without any why, they'll have to learn through memorization, which will leave them crippled as soon as the specific situation changes.

Also, some if the terminology used in the tutorial is wrong. It uses the words "layer" and "channel" somewhat interchangeably, which is really confusing. Layers and channels are not the same thing, and the two words should never be flip-flopped so carelessly like that.

I think that tutorial hs great visuals, and it's easy to follow. It just needs some polish in its wording, and a section to explain why it says to do what it says to do.

If you want some understanding of what channels are, what Alpha Channels are, and how to use them, I've posted it a great many times on this forum. I won't do it here since this post is already pretty long, but here's a link to the last thread I did post it in.

From: Rockwell Maltz
I close down the work, then load the texture back into my Photoshop. The background is no longer transparent. I looked at the channels though, and it shows all the layers, so I am hoping that is how it's supposed to be? No longer transparent background on the tga file, but the game itself will have it transparent?

To answer your question of why you can't see the transparency when you open the TGA in Photoshop is simple. Photoshop has no way of knowing that you want the alpha channel to be a transparency map unless you specifically tell it. Alpha's are used for all sorts of things besides just transparency (although transparency is the most common use). Interpreting the alpha to mean transparency (or anything else) is a function of the application the image is destined for (in this case, SL). Had the image been destined for another 3D application, Maya for instance, Maya could be set to read the alpha as not just a transparency map, but a specularity map, a bump map, etc.

In other words, a channel is just a channel. It has no inherent meaning. Even the Red, Green, and Blue channels don't really mean anything in and of themselves. They govern color in Photoshop (and just about everywhere else) simply because the program has been told that the channels with those particular names govern those particular colors. That's all.

If you want to tell Photoshop that the alpha channel means transparency, it's easy to do (although entirely unnecessary for SL purposes). Here's how:

1. Open any TGA image that has an Alpha Channel.

2. On the Channels Palette, ctrl-click on the thumbnail for the Alpha Channel. (The thumbnail is the little picture directly to the left of the channel's name.) This will form a selection. You should now see the "marching ants" lining the opaque parts of your image, indicating they've been selected.

3. On the Layers Palette, click the "Add Layer Mask" button. It's at the bottom, the second one in from the left, the one that looks like a square with a white circle in the middle of it. This will apply the selection you made from the Alpha Channel as a mask (transparency map) on the currently active layer. Since TGA's are flat, the currently active layer is the only one there is, and since because of that, there's nothing underneath the active layer, you should now see the checkerboard matt showing through the transparent areas. That's all there is to it.

So, the good news is that that kind of masking is really easy to do. The bad news is there's no way to save the mask when you close the image. TGA is a layerless, flat format. The mask is a Photoshop layer function. There's no way to force the two to coexist. Once you close the file, if you want to see the mask again, you'll have to make it again next time you open the file. That's just the nature of TGA.

As I said though, the mask is completely unnecessary for SL purposes. All the transparency information SL needs is contained in the Alpha Channel. In a sense, SL will be applying the same type of mask on its own. The only practical purpose for doing the mask in Photoshop is simply to test your Alpha Channel to make sure you've got the right transparency in the right places before you upload the image to SL.


Edited for sectioning by quotes, to make the post easier to read
_____________________
.

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.
Rockwell Maltz
Registered User
Join date: 17 Sep 2005
Posts: 34
09-22-2005 10:37
Thank you, very helpful, very insightful.