Jump to content

Flickering PNG's and haloed alpha PNG's


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

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

Recommended Posts

1. So I found this: VWR-20185: https://jira.secondlife.com/browse/VWR-20185? But it just gives me the info that there is some problem with png's? But not exact. Now on PNG w/o alpha I get some flickering effect; where as the texture stops showing as if becoming an alpha. That when panning angles. If I use a lossy jpg (jpg's are ebil imo), then there is no flickering on/off of that jpg image format texture. If I layer some prims with png's like one ontop another at about 1m distance in this case, the top prim with the png will not show at all - or very hard to find an angle for it to show. That's my observation at least. However, on an older build, where I used PNG's (non-alpha), no problemo. Any new build though, just flickers. Have tried multiple viewers. Oh and have seen this problem with other peoples builds, like transparent/flickering tree ttextures, where you see through holes in the trees to trees behind them etc... though I'm sure those are alpha textures more like in the jira report.


2. getting a halo around png alpha textures on prims. Wasn't happening before. Seems to have just started the past few weeks or so. So like the alpha png flag on my ship, I now get a white boarder around the texture between the masked alpha part and the visible areas (the flag texture). This really shows up pretty intensely at night settings as opposed to day settings. Looked fine before, and still works fine in other real-time rendering engines, but suddenly not here so well.

 

So is there something going on, and is there a work around? I don't usually use TGA, havent tried it here, though the jira is reporting some problems with it as well so guessing I'll get the same effect. Actually I only use png or DDS highly preferable, though I see no option for DDS :(

 

edit: hmm actually didn't know they convert it all to jpeg2000, just found that out. So I guess it's not the png or tga formats that are the problem, but the jpeg2000 conversion they are using? So I guess this is why I'm not having problems in other render engines. hehe why on earth jpeg2000 in a real-time rendering engine?!? Personal opinion, but DDS as it is the only format that stays compressed in VRAM and then some other format for transparencies imo would be better (and common). But anyway, guess it’s something to do with their reformat.

Link to comment
Share on other sites

For solid, 'opaque' textures I always upload BMPs, which are lossless, and have never given me weird problems.

For transparent / semi-transparent textures ('alphas') I use a free PS filter called 'Flaming Pear', save the tex as a TGA and then upload. This ensures that the hideous white line doesn't appear.

http://www.robinwood.com/Catalog/Technical/SL-Tuts/SLPages/EasyAlphas.html

Link to comment
Share on other sites

You have discovered the "white halo" problem.  If you wander around SL, you'll find that quite a few people have discovered it before you.  It's an edge effect.  Essentially, what happens is that the pixels immediately adjacent to an area that is transparent in your image are rendered as white because they are being averaged with the opaque and transparent pixels on either side.  There are several standard solutions. 

One is the "Flaming Pear" plug-in that smears opaque pixels into the transparent area so that there are no ambiguous edge-effect pixels under the black/white boundary in your alpha channel image.  You can do the same thing by running gently over the edge of a transparent area with a blur tool. Still another variation is to make a copy of the layer that you use for your main image, stretch it just slightly, and place it under the original.

Another popular solution is to leave an opaque background layer under your entire image, again so that there are always opaque pixels everywhere that there's a black/white boundary in the alpha channel image.  It's best to fill that background layer with a color that is near to the color of whatever is in the layers above.

My own favorite method is not to create an edge effect in the first place. Let the alpha layer do all the cutting for you, and leave no transparent pixels in active layers in your image.  Chosen and Robin refer to this as a "subtractive" method.

Some people prefer to use PNG rather than TGA because they figure that it's another way to avoid the white halo problem.  As you've discovered, though, that's not always the case. The edge effect can still be there, especially around dark-colored regions.  Also, as you've discovered, once a texture is uploaded to SL it doesn't make any difference what its parent was on your computer.  It's no longer a PNG, TGA, JPG, or BMP image.  It's JPEG 2000.

Link to comment
Share on other sites

I always test-load my textures for free with Imprudence.

On some machines I have used, some PNG's will load with some kind of unwanted element of transparency. Converting them to jpeg before loading them has always cleared that up for me, producing a complete opacity.

The opposite problem on other machines, that partially transparent PNG's load up as opaque, seems to be fixed by converting them to TGA before loading them.

Has this been consistent with the experiences of others?

Link to comment
Share on other sites

I'm with Void on this.  I also use a trick that I've discribed a few times.  I never draw on an opague layer.  I always draw on a 100% transparent later........if I need contrast to see what I'm doing I place an opaque layer under my transparent layer.  I don't save any layers I use for my convenience.  I've never had the "white halo" problem........never.

Link to comment
Share on other sites

I'll clarify this... or repost part of the OP, since these posts are repeating.
"2. getting a halo around png alpha textures on prims. Wasn't happening before."

I've had the texture I mentioned for about a year in SL. I looked at the original, it was fine just like I have done for 1000's of other textures over the past three decades of computer graphics work. Some how some time it got botched, either in jp2 conversion or after, don’t know. But I’ll just replace/reupload the texture using a different format, as mentioned. Not very worried about it, it’s rare that I use alpha textures. The real upload cost hit will be replacing all my other converted png textures that just want to flicker now. Done deal.

Link to comment
Share on other sites

if it's happening to textures that were already inworld and fine, and then suddenly changed (not a newly uploaded version) then that's a different story...

I'd check that no settings on the prim it's used on have changed (glow could be an issue), and that nothing in it's inworld environment has changed (no other new textures overlying it, could be in front of or behind physically inworld, no lighting changes (other prims casting light, time of day etc)), and then make sure it's not a change in the viewer (no new viewer version installed, no graphics settings changed, etc)

Link to comment
Share on other sites

  • 5 months later...

Thank u for all this information. Most of it's over my head...but I'm going to study this carefully.  I only suffer with flickering with skirts that I wish to make a little transparent. If I use a TGA file with no transparancy, there is problem. If I want a transparent edge say on lace, then PNG's reek havoic. TGA's with masks don't help either. I know that other designers have work arounds so this is info that I seek. I have tried using PNG with transparancy on one side and TGA no transparancy other and have had a little luck but if all files upload to JPEG2000, then maybe I am just thinking things are different when not. 

 

 

Link to comment
Share on other sites

  • 10 months later...

I know this is an old post but I was having the same problem today on some mesh I was texturing with PNGs.

My solution is super quick and easy.

1. If your image isn't already on a transparent background, in photoshop create a new file with a with transparent backgound copy and paste your texture to it. (Ctrl +N to create new file)

2. After you have cut out or deleted the areas in your image that you want to be tranparent, 100% or even a graded transparency, create a new blank layer and put it at the bottom so it is the new background layer.

3. Fill this new backgound layer with either solid black or white doesn't matter which. 

4. Change this new layer to 1% Opacity in the layers window.

5. Save As a PNG file. You do not have to flatten the image or anthing else.

6. Save your work as a Photoshop file is you ever wish to make changes.

What this does is fill the area that is to be transparent in SL with pixels that are invisible to the naked eye on looking at the screen.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4270 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...