Jump to content

TGA textures in 24bit


You are about to reply to a thread that has been inactive for 4808 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

uhm, the alpha layer is what makes it 32bits....

there are 3 basic channels, red, green, and blue. each has 8 bits. adding alpha, you get another 8 bits, bringing the total to 32 bits, per pixel.

there is a rumor that you can use so called "single bit" (really single value) alpha now. this is actually palletized alpha, which TGA does not support.

PNG should be able to support it, by setting the alpha mode to "pixels that match this color", and I'm pretty sure that jp2 should also support this mode in a similar fashion.... whether the SL upload algorithm actually understands this and retains it is anyone's guess, but Penny Patton suggested that it does.

the limitation of course are that anti-aliasing isn't supported in the original image for the transparent edges, and the objects they are applied to would be subject to occlusion rules (so may end up blocking some content behind them). you don't notice it with linden plants because they are small and compact so don't trigger much occlusion, but you do see it with the invisiprim textures quite a bit, particularly wiping out alpha textures....

odds are if you used it for window etc you'd see things like hair and gauzy clothing vanish behind them... it's definitely not a cure all solution.

Link to comment
Share on other sites

First, just to be sure the language is straight, there is no such thing as an alpha layer.  It's an alpha channel.  That's important, because the channel is holding information that applies to all pixels in all layers in your image, just as the R (red), G (green) and B (blue) channels do. The alpha channel carries information that SL interprets as transparency.

Second, each channel in an image is 8 bits deep. So, a "normal" RGB image has 3 x 8 = 24 bits worth of information in every pixel. An RGBA image, containing that fourth (alpha) channel, has 4 x 8 = 32 bits of information per pixel.  The 8 bits that are in the alpha channel may be empty, in which case SL interprets that pixel as completely opaque, or they may be completely full, which would make that pixel transparent in SL. Or they could have any value between 0.0 and 255.0 (This is just the same way that color works.  A pixel that has 0.0  loaded in the R channel will have no red in it.  One that has 255.0 will have the maximum amount of red in it, for example.  BTW, SL scales those values from 0.0 to 1.0 instead of 0.0 to 255.0, but it's the same thing.) 

In any case, regardless of what the value in the alpha channel is, if an image has storage room for 32 bits in ANY of its pixels it has the potential to be transparent.  If that's the case, then it also has the potential for giving rise to the phenomenon that we call the alpha glitch or the alpha sorting problem.  If you want to get rid of alpha sorting, and if you don't need transparency in a particular texture, make it a 24-bit texture.  No alpha channel, no sorting issue.

Link to comment
Share on other sites

 


jjccc Coronet wrote:

i found that you can make alpha layers with PNG files and none of the faffing about like you have to to with tga 

 

Yes, 32-bit PNG files do have an alpha channel. In fact, that can be one minor drawback of saving files in PNG format instead of TGA, at least in Photoshop.  Even if you didn't intend to do it, you can end up saving a PNG file accidentally as a 32-bit image, thus leading you to have alpha sorting issues with a texture that you never meant to contain transparency. One way to avoid that possibility, if you really mean to have 24-bit PNG files, is to use the Save for Web option.  That will force your image to save as RGB instead of RGBA.

BTW, again, it is an alpha channel, not an alpha layer. :smileywink:

Link to comment
Share on other sites

  • 2 weeks later...

I started this topic to find a solution for the alpha glitch. In the 4 years that I´m online I noticed that LL doesn´t seem to be interested in addressing this problem. I have a garden center inworld and I´m tired of seeing my trees and flowers through the walls of my houses and to see one tree wiping out the other ... and yes, those textures all have alpha "channels" and removing that channel from the textures is NOT a solution to the problem. Rotating the prim plants, sometimes helps a bit. If it were possible though, to apply a tga or png texture in 24 bits WITH an alpha channel to those prims that produce the occlusion, the problem should, at least, be partly solved.

Therefore my question is: Is it possible to make a tga/png texture WITH alpha channel in 24 bits and how do I do that?

Link to comment
Share on other sites

 


Luci Koenkamp wrote:

[...]Is it possible to make a tga/png texture WITH alpha channel in 24 bits and how do I do that?

No, and that's not even the reason it's not LL's fault.... this is a well known problem in ALL 3D graphics rendering applications... there may be some limited help on the way in the form of single value alpha (AKA single bit alpha), but it has it's own limitations... namely rough edges and occlusion. it will probably be good for plants, but not much else.

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4808 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...