Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

See through skirts

Chelle Petlyakov
Registered User
Join date: 14 Mar 2008
Posts: 12
05-13-2009 11:03
This board is just a wealth of information. Love it! I made my first skirt, but you can see through it enough to vaguly make out the legs underneith. A friend told me I needed to save the texture as a .jpg and then save it as a .png file before uploading it to sl. I tried that and it worked like a charm. No more see through skirt. I don't see any difference between the two textures. so anyone know why that worked? Any reason not to do it? Are they any alternative fixes to the see through skirt?
Har Fairweather
Registered User
Join date: 24 Jan 2007
Posts: 2,320
05-13-2009 11:18
I'll bet you the see-through skirt will sell better than the opaque version.

In fact, MUCH better. ; )
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
05-13-2009 11:30
From: Chelle Petlyakov
This board is just a wealth of information. Love it! I made my first skirt, but you can see through it enough to vaguly make out the legs underneith. A friend told me I needed to save the texture as a .jpg and then save it as a .png file before uploading it to sl. I tried that and it worked like a charm. No more see through skirt. I don't see any difference between the two textures. so anyone know why that worked? Any reason not to do it? Are they any alternative fixes to the see through skirt?


Your friend told you something that worked accidentally. Uploading a file as PNG is a fine idea. So is uploading as TGA or even JPG. Once the file is in Second Life, it isn't saved in any of those formats anyway. (It's saved as JPG2000.)

The problem you were seeing is a VERY familiar one, popularly called the "alpha glitch." You really need to spend some time reading the sticky threads at the top of this forum to learn about such things, specifically the sticky concerning Alpha Channels and Transparency. What happened is that your original file was a 32-bit image. That means that it contained an extra 8-bit channel in addition to the RGB channels that carry color information. The extra channel (the alpha channel) is used in SL to carry transparency information.

If your design contained transparent elements on purpose, then you really needed that extra 8 bits per pixel. Even if you didn't create the channel deliberately, SL THOUGHT you meant to, so it treated your image as if it had transparency. When you saved the file the second time as a JPG image, that had the accidental effect of wiping out the extra channel, since JPG images can only be 24-bit RGB images. You could have uploaded that JPG file and had the same result as resaving it to PNG before uploading.

For future reference, create your images in Photoshop (or whatever program) and save them as TGA or PNG files, always checking deliberately to see whether you are saving them as 24- or 32-bit images. Right now, though, take time to read that sticky thread. It does a WAY better job of explaining things than I just did. :D
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask.... ;)

Look for my work in XStreetSL at
Chelle Petlyakov
Registered User
Join date: 14 Mar 2008
Posts: 12
05-13-2009 16:31
From: Rolig Loon


For future reference, create your images in Photoshop (or whatever program) and save them as TGA or PNG files, always checking deliberately to see whether you are saving them as 24- or 32-bit images. Right now, though, take time to read that sticky thread. It does a WAY better job of explaining things than I just did. :D


Thanks for all the info. Have read through some of the sticky threads but will look over them again, especially the one on alpha channels. Just so I'm sure I'm understanding though, if the image has no transparency I should save it as a 24-bit .png image but if it does save it as a 32-bit .png image?
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
05-13-2009 16:50
From: Chelle Petlyakov
so anyone know why that worked?

JPG does not support transparency. So by saving to JPG before saving to PNG, you eliminated whatever transparency information was already in the image.

Just so you know, accidental transparency is a common issue with PNG. Because the format supports so called "simple transparency", the margin for error is great. If so much as a single pixel in the image is less than 100% opaque, the entire image will end up as 32-bit when uploaded to SL.

This is one of many reasons why using TGA instead of PNG will save you headaches. It's almost impossible to accidentally save a TGA as 32-bit in any graphics program I've ever used. You either do it or you don't, and that's that. The margin for error is incredibly close to zero.


From: Chelle Petlyakov
Any reason not to do it?


JPG is a lossy, low quality format. By converting your image to JPG first, you reduced the quality. The effect might not be immediately obvious to the untrained eye, if you used highest possible quality settings, and if you only saved once. But if you know what to look for the damage will be visible. By definition, there's absolutely no way to create a JPG file without losing some fidelity. Compression artifacts are part of the nature of JPG.

So you know, JPG is a relic from back in the days when in took an entire hard drive to store an uncompressed image. Back then, file size was infinitely more important than image quality, so JPG's small sizing made it ideal for many situations, despite its lossiness. Nowadays, however, storage space is practically unlimited, so file size barely matters. Plus, newer formats, such as PNG and JPEG2000 offer lossless compression. JPG in today's world is totally obsolete.

Still, JPG does remain popular for Web imagery, since the Web is the last medium still in existence in which file size is more imporant that visual quality. But that is changing, as more sophisticated formats like PNG gain more of a foothold.

From: Chelle Petlyakov
Are they any alternative fixes to the see through skirt?


There are many options. Here are a few, in no particular order:

1. Be exceedingly careful not to introduce unintended transparency into your imagery in the first place.

-OR-

2. If you're using Photoshop, use the Save For Web & Devices option instead of just Save, whenever saving PNG files. In the Save For Web & Devices dialog, choose PNG-24 from the format list, and uncheck the box for transparency.

-OR-

3. When you don't want transparency, just don't use PNG. Instead use 24-bit BMP or 24-bit TGA. Those are the two lossless formats SL can use that do not support transparency.

-OR-

4. Stop using PNG altogether for texturing, and instead use TGA exclusively, just like 99% of all texture artists in the world do. You'll need to learn how to create alpha channels for when you do want transparency, which some people find to be a little tricky to understand at first. But once you grasp the concept, you'll find the alpha transparency workflow to be far superior to the simple transparency worfklow in every measurable way, including speed. This, of course, is contrary to what those who actively refuse to learn proper alpha workflow would have you believe, but it is the truth.



From: Chelle Petlyakov
Have read through some of the sticky threads but will look over them again, especially the one on alpha channels.


If there's anything you don't understand in there, ask. :)


From: Chelle Petlyakov
Just so I'm sure I'm understanding though, if the image has no transparency I should save it as a 24-bit .png image but if it does save it as a 32-bit .png image?


Not quite. PNG works more automatically than that (unless you're using Save For Web). If you've got transparency present in the image, any transparency at all, even if it's just in one pixel, the image will become a 32-bit texture when uploaded to SL. In order to end up with a 24-bit (totally opaque) texture, your source image MUST have no transparency in it at all.

24-bit BMP, 24-bit TGA, and JPG all fit that description. PNG might or might not. As I said, the margin for error with PNG is significant.
_____________________
.

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.
Chelle Petlyakov
Registered User
Join date: 14 Mar 2008
Posts: 12
05-15-2009 09:19
From: Chosen Few



If there's anything you don't understand in there, ask. :)



Will do! Thanks so much. I have avoided alpha channels because they intimidate me, but maybe it's time I jump in feet first and get over it.
Ciaran Laval
Mostly Harmless
Join date: 11 Mar 2007
Posts: 7,951
05-15-2009 15:57
From: Har Fairweather
I'll bet you the see-through skirt will sell better than the opaque version.

In fact, MUCH better. ; )


1 user agreed.