Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Alpha texture problems

Gin Clayton
Writer
Join date: 12 May 2005
Posts: 76
08-09-2007 22:47
I took off all the alpha textures on some hair I bought. But it's still acting like alpha textures are still there. As you can see in the picture that's the problem at hand. Any ideas?

http://waffleimages.nwpshost.com/files/bf/bfc67a70109de99d5e10082b6c4b7552d2510413.jpg
Sylvia Trilling
Flying Tribe
Join date: 2 Oct 2006
Posts: 1,117
08-10-2007 00:42
If your textures are tga's check the bit depth. A 32 bit tga will do the waffle even if there is no visible transparency. The right bit depth is 24.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
08-10-2007 06:58
That would be my guess as well. Looks you're using 32-bit textures where you should be using 24-bit. So you know, the additional 8 bits ARE the alpha channel. If you can't see any transparency in a 32-bit image, it's because the alpha channel is all white. That doesn't mean it's not there though. If you want to remove the alpha, you MUST save as 24-bit.

For more on this, read the transparency guide at the top of the forum. Here's a relevant excerpt:

From: Chosen Few
_________________________________________________
What’s the difference between 24-bit and 32-bit TGA?


As was mentioned above, color images for the screen are comprised of 3 primary color channels. Each of these channels constitutes 8 bits of data per pixel. Since there are 3 channels, color images are 24-bit.

Images with transparency contain a 4th channel, called alpha, which adds another 8 bits, bringing the total to 32. Therefore, images with transparency are 32-bit.

It’s a common misconception among those new to digital art that more bits must somehow be better than less bits, and they end up saving everything as 32-bit. This is a big mistake. Only images that need transparency should ever be saved as 32-bit. Fully opaque images should always be saved as 24-bit. Using 32-bit unnecessarily increases an image’s file size by 33%, and can cause display problems. See the next question for more on this.


_________________________________________________
Why do sections of images sometimes disappear or seem to change position in SL?


This phenomenon has to do with a glitch common to nearly all 3D applications in what’s known as alpha sorting. It happens in nearly all video games, and even in high end 3D modeling packages costing thousands of dollars. What happens is when two or more 32-bit images are placed so that they intersect or overlap in close proximity, the renderer has trouble determining which one to draw first. As a result, the images can appear to flip-flop their positions in 3D space, to cancel each other out, or to otherwise behave strangely.

The way to cut down on this is to make sure that 32-bit images are only used when absolutely necessary. Images that do not need transparency should always be saved as 24-bit. Beyond that, there are certain building techniques in SL that can minimize the effect, and others that actually take advantage of it, but building is beyond the scope of this guide. There are plenty of tips about this on the building forum.
_____________________
.

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.
Gin Clayton
Writer
Join date: 12 May 2005
Posts: 76
08-10-2007 08:30
It's a 24 bit last I checked. :/
Michael Bigwig
~VRML Aficionado~
Join date: 5 Dec 2005
Posts: 2,181
08-10-2007 08:32
This may be an obvious question, but have you removed the alpha channel itself? The channel? If there is still a mask exclusion, you'll still get the alpha in Targa.

Is it possible to save as a JPG in this case...that will destroy the alpha damn skippy!

:)
_____________________
~Michael Bigwig
__________________________________________________Lead Designer, Glowbox Designs
AJ DaSilva
woz ere
Join date: 15 Jun 2005
Posts: 1,993
08-10-2007 09:22
The ailiasing at the edge of the hair in that pic looks like the transparent bits are part of a prim hair model to me...
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
08-10-2007 10:43
From: Michael Bigwig
This may be an obvious question, but have you removed the alpha channel itself? The channel? If there is still a mask exclusion, you'll still get the alpha in Targa.

Is that what happens in GIMP? Very odd behavior, indeed. In Photoshop, the number of channels for TGA output is an option at the time of save. You could have a thousand channels in your working image if you want, but as soon as you hit Save As TGA, it asks you what bit depth you want for the output. Select 24-bit and you'll have three channels; select 32-bit and you'll have 4. There's no way to have anything extra present and not know it.

From: Michael Bigwig
Is it possible to save as a JPG in this case...that will destroy the alpha damn skippy!

If you're gonna go that route, I'd suggest BMP over JPEG. JPEG compression can be pretty ugly on textures, depending on what's in the image, especially when combined with the lossy compression that SL does at the time of upload. You're compressing twice when you use JPEG for SL, which means every artifact gets compounded.

BMP's are uncompressed, so you'll never have that problem. You'll still end up with some artifacting from SL itself, no way around that, but no more so than with TGA.
_____________________
.

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.
Thunderclap Morgridge
The sound heard by all
Join date: 30 Sep 2006
Posts: 517
08-10-2007 12:45
I would use something other than Gimp. But beyond that I agree.
_____________________
Gimp:
n : disability of walking due to crippling of the legs or feet
ie. lameness, limping, gameness, claudication

secondlife://Amaro/77/130/39
Come to Thunderclap: the gospel chapel
and Thunderburst: Mens clothes and more.
Gin Clayton
Writer
Join date: 12 May 2005
Posts: 76
08-10-2007 14:23
I use photoshop and gimp. But in this case I used PS, I changed the tga to 16bit and it worked perfectly fine. 24 bit was still messing up though.
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
08-10-2007 15:13
From: Gin Clayton
I use photoshop and gimp. But in this case I used PS, I changed the tga to 16bit and it worked perfectly fine. 24 bit was still messing up though.

Are you using Photoshop 7.0, Gin? If so, then that would explain the behavior you're seeing. Version 7.0 was extremely flawed. It cannot save alpha channels properly. If that is what you're using, upgrade to 7.0.1 via the free patch from adobe.com, and it will solve the problem.

So you know, a 16-bit TGA should be a grayscale image, not a color image, and SL shouldn't even be able to upload it. It sounds like you've got an extra channel in place that you can't see, which would be in keeping with 7.0 behavior.

If it's not 7.0, did you ever at any time install any sort of automated alpha channel creator? If so, then that's your culprit. You'll need to uninstall and reinstall Photoshop to restore proper functionality.
_____________________
.

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.