Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Solid textures look partially transparent

Franklyn Constantine
Registered User
Join date: 4 Jun 2008
Posts: 9
08-13-2009 14:38
I'm not sure if this is a bug of the overall poor graphics system (in comparison to latest games like HL2), or a problem of my settings:

Solid textures on prims (especially walls, but also other stuff) sometimes are partially transparent and show objects behind them, depending on camera angle (means the effect may change or disappear with movement of the cam to another position).

This effect is not only occuring with self made textures (photoshop PNG), but also with purchased stuff. "Linden default" textures from the lib seem to be less affected, but sometimes too, especially the combinations with (half) transparent ones produce these "glitches". So it seems to be either a general problem, or of my PC/ viewer, but not of the kind of textures I'm using.

I changed today to latest GForce 8800 GTS drivers, and played with video options, but the effect does not change.

Does anybody has an idea what's happening here, and how to fix it?
Veron Helstein
Registered User
Join date: 5 May 2009
Posts: 5
08-13-2009 17:25
i got told that PNGs are always transparent to some degree because of a bug. Try again with TGA ... it solved the problem for me ...
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
08-13-2009 17:45
It's the infamous alpha sorting glitch. When two or more 32-bit textures overlap in close proximity, the renderer doesn't always define "in front" and "in back" in the same way as a human observer would. The mathematics include factors such as which surface's center point is physically closest to the camera, which surface's normal is most directly facing the camera, etc. The end result is items that a human would expect should be drawn behind other objects are sometimes drawn in front of them.

This phenomenon is common to nearly all 3D graphics applications, from video games to high end modeling and animation programs that cost thousands of dollars. In most apps, including SL, there's no way to solve the problem. All you can do is work around it. Make sure 32-bit textures do not overlap. Sometimes, that will mean redesigning your build.

In case you're wondering, the reason you don't see the problem in games is because professional game artists make a point of avoiding it. They design every single scene around the glitch. Most content in SL, on the other hand, is created by amateurs who have no idea what they're doing. So you see the glitch all over the place. At least you had the good sense to ask about it, if it makes you feel any better. Some people just sit there and complain about "SL's bad graphics", rather than take the time to wonder if they're doing something wrong themselves.

Veron's comment about PNG was half right. It's not that PNG-sourced textures are always transparent. It's just that there's a significant margin for error with PNG. Because the format supports both simple transparency and alpha transparency, you have to be exceedingly careful when using it. If so much as a single pixel in your image is less than 100% opaque, the resulting texture will be a 32-bit image. With TGA, only alpha transparency is supported, so you don't run the same risk. You either created an alpha channel or you didn't. Unless you're an extremely forgetful person, the margin for error is virtually zero.

For more information about the glitch, about texture bit depth, about alpha channels, and about how to avoid this problem and other common pitfalls, see the transparency guide, stickied at the top of the texturing 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.
Franklyn Constantine
Registered User
Join date: 4 Jun 2008
Posts: 9
TY for assistance!
08-15-2009 03:18
thanks a lot, I wasn't aware this might be a general issue of 3D computations. And I will pick the point with the graphics format. If other's than PNG don't suffer so much from this glitch, I will use them instead for my transparencies (simple windows in walls, for example). After all, I'm an amateur too, and my textures are not so highly sophisticated.
Seric Serupta
Registered User
Join date: 15 Jun 2009
Posts: 34
08-18-2009 21:42
I turned on fast alpha in the advanced menu and it fixed this problem. But on occasion some transparent textures end up opaque.
Franklyn Constantine
Registered User
Join date: 4 Jun 2008
Posts: 9
That's it
08-25-2009 12:45
Wow, thanks a lot, that's it! Looks far better now, and up to now I did not even discover the opaque effect you reported.
Seric Serupta
Registered User
Join date: 15 Jun 2009
Posts: 34
08-26-2009 02:02
In the last month I've only seen 3 textures that were wrongly opaque so it's a very rare occurrence. One was a dunktank and other two were some low quality trees. But I'd rather see that once in a great while than my hair get drawn over by a fence 30 meters away or my cloak disappear into every shiny floor. The default alpha blending is a little more accurate as far as blending, but the texture priorities are off so objects further away can blend over closer ones.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
08-26-2009 02:35
From: Chosen Few
Because the format supports both simple transparency and alpha transparency, you have to be exceedingly careful when using it.
I don't understand what you mean by "simple transparency". The only transparency possible is that due to the alpha channel. Is this some distinction in the program you're using?
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Franklyn Constantine
Registered User
Join date: 4 Jun 2008
Posts: 9
"simple" transparency
09-01-2009 14:50
Probably not, I am using Photoshop Elements in an older version. And I am just an interested amateur. From some posts I understood transparency could be more sophisticated, to reduce unwanted effects, or to add advanced features.
Obviously this is not the case? Transparent seems to be just transparent? OK, I learned something!
Ephraim Dalglish
Registered User
Join date: 11 Oct 2008
Posts: 11
10-10-2009 19:43
Sorry for necroposting, but I have a further question regarding this issue.

I have had similar problems with my builds: walls that disappear from certain angles. I have read the sticky on transparencies and alpha layers (which was excellent, by the way: thank you Chosen!), and another slightly earlier thread on this same subject; I have, I think, a pretty good handle on alpha channels, and on 24-bit vs. 32 bit TGA files. I have been using PNG files myself, created in PS Elements; I will clearly need to revert to TGA.

However, my walls almost invariably DO include transparencies in them (usually windows), so, unless I change the way that I build these, prims with 32-bit textures are going to continue to adjoin each other.

From: Chosen Few
It's the infamous alpha sorting glitch. When two or more 32-bit textures overlap in close proximity, the renderer doesn't always define "in front" and "in back" in the same way as a human observer would.

Chosen, what do you mean exactly mean by "overlapping in close proximity" here? I assume that two tightly adjoining prims, even if they are not interpenetrating, or ranked one behind the other, would qualify?

Given that my walls tend to have transparencies in them, is there any way of saving or reordering the textures that will not create this problem?

Edit: I've just realized that this thread was here, rather than in the Texturing forum, as I had assumed . . . oops.
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
10-11-2009 04:31
From: Ephraim Dalglish
Given that my walls tend to have transparencies in them, is there any way of saving or reordering the textures that will not create this problem?
No, the only alternative is to use solid textures and make the windows using surface geometry - use more prims or use sculpted prims for the walls (which has its own problems).
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore