[won't change] Artifacts with filtering + transparent PNGs

Bugs that have been resolved.

Moderator: Graf Zahl

Locked
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

[won't change] Artifacts with filtering + transparent PNGs

Post by Nash »

Load this into the TX_ namespace as raw data, then use it on a transparent 3-d floor.

If filtering is turned on, you will see white lines that make up the 64x64 grid for Doom flats at the edges of the blood.
Attachments
NGORE06.png
NGORE06.png (5.05 KiB) Viewed 999 times
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

The stray white lines come from the way texture filtering works. For the filter the transparent pixels still have the color they have originally. Inside the graphic I can recolor the borders of tranaparency to the neighboring pixels but at the edges it is not that easy. Just make sure that the blood does not touch the outer edges and the effect will go away. Considering the calculation overhead required to fix this I'd say it isn't worth it.

One piece of advice: Don't use a color that stands out that much for transparency. Something less intrusive is always advisable because otherwise you may run into the same problem across the entire picture in lower mipmap levels.
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

So I have two ways to get rid of the artifact:

A) The actual graphic must not touch the edges.

B) If they absolutely have to touch the edges (tiling textures for example), I'll just have to use a transparency colour that doesn't stand out.

Got it. Thanks.
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

Sorry to bump this. I have a question. How do I set the transparent colour in Photoshop? Do you know? It is always white for me. :/
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post by Graf Zahl »

Photoshop is pretty bad when it comes to trivial issues like this. I normally use XNView to set the transparent color but that only works well for paletted pictures. Otherwise I use Image Alchemy but that's a command line tool.
User avatar
BetaSword
Posts: 132
Joined: Thu Sep 01, 2005 0:01

Post by BetaSword »

With me, all I do is use the eraser tool, making anything I want transparent have that checkerboard background, and then when I select indexed color, I check the box that says "transparency", or whatever. Seems to work fine.
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

Beta - I know how to do transparent PNGs with Photoshop, but I don't know how to set the actual transparency colour.

using your technique, I wasn't able to choose a transparency colour...
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

If it helps, in "Paint Shop Pro" when you save a PNG, click the options button and pick "Run Optimizer". That allows you to pick which colour will be used to mark transparent areas.
Locked

Return to “Closed Bugs”