November 26, 2013

Weird transparency / alpha bug in Second Life

Second Life citizen, Tempus Heart, read an article on my blog that I wrote a long time ago about alpha channels, alpha sorting and transparency. He was experiencing odd behavior with some of his own creations where the alpha channel, instead of rendering at some % transparency, would go completely black. So, thinking I was an expert on the subject (big mistake LOL), he contacted me in-world.

After finally understanding what he was talking about and doing some of my own tests, I've confirmed that there's some sort of bug present in Second Life's rendering that's causing textures with very light transparency (say 10%) to lose that transparency and go completely black. But ONLY in the presence of 100% transparent pixels! Talk about esoteric.

To illustrate the problem, I put three boxes with different transparency texture samples in front of plywood cylinders with a dark blue solid background behind the whole mess. The textures on the prims were done in Photoshop as solid black layer shapes with each "band" having its own layer opacity setting and saved as PNG files. (Click on the image to see full size.)

The top box illustrates the problem. There are three bands in the box. From left to right they should be 100% black, 0% black (100% transparent) and 90% black (10% transparent). As you can see, the 90% band has gone completely black.

Now if we take away the 0% black (100% transparent)  band (2nd box), the 90% black band renders correctly.

Just for reference, I've added a stepped box at the bottom with bands ranging from 0% black to 100% black showing that with multiple transparencies, the box renders correctly.

Weird huh? Anyone have any clues as to what's going on? Tempus has tried various viewer settings (Firestorm) and lighting combos to no avail. It seems to be a server-side baking issue. I'm seeing the same behavior on Cool VL Viewer.

Reported as a JIRA bug here:

No comments:

Post a Comment

All thoughts are welcome.