Game Development Community

Thin White Borders

by William Lee Sims · in Torque Game Builder · 07/27/2010 (6:11 pm) · 5 replies

machinecodegames.com/showoff/ThinWhiteLine.png
There are a few images in our current game that, when rendered in game, have a thin white line in areas. The image above shows the problem: there is a thin white line at the upper left-hand side of the center hex, the top of the hex at the bottom center, and on the bottom left of the hex at the bottom-right.

I've seen comments that say that the color of the purely clear portions is white, but I can't show that here. In fact, I've even filled the background with the border color and just used a mask in Photoshop to hide the areas outside of the hex. It worked for some tiles, but not all of them.

I've got some sample images that have the problem (which you can click to download):

machinecodegames.com/showoff/b_0.png
machinecodegames.com/showoff/w_1_0.png

If anybody has any ideas on alternate rendering modes or a way to fix this in Photoshop, I'd be very grateful!

Thanks!

#1
07/27/2010 (6:24 pm)
I noticed the same thing in my minimap graphics. I cut out the border trying to get rid of it, but that just changed the location of the artifact. I assumed it was something with PNG format.
#2
07/27/2010 (8:08 pm)
Disable the filter and filter pad settings in the ImageMap editor.
#3
07/27/2010 (9:50 pm)
Yes, if you change the filter from "SMOOTH" to "NONE", that particular artifact will go away. Of course your graphics will also look really crunchy and gnarly if they have to be resized or rotated ever...

I'd LOVE to see a proper fix for this issue... those little white lines are all over the place in our game, and disabling filtering just makes it look worse in most cases. :(
#4
07/28/2010 (7:13 am)
I do resize my graphics quite a bit (from about 25% of the original to 150%), so I need the linear/smooth filter.

After a bit of experimentation (who doesn't love the scientific process), I found out that a hard-line, horizontal edge that is 100% solid with 100% transparency right next to it causes the white lines, even when rotated.

I drew a line with 5% transparency right at the edge and the line disappeared.

I know some people will think that the transparent pixels must have had white for the RGB value. All I can say is that I filled the background with the dark blue color and used a layer mask to hide the unseen portions. How white would get in there is beyond me.

machinecodegames.com/showoff/WhiteLinesFixed.png
#5
07/28/2010 (3:58 pm)
Very nice!

Thanks for sharing... I'll give this a try.