Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest WME version: WME 1.9.1 (January 1st, 2010) - download

Author Topic: White spots/pixels on character edges  (Read 3848 times)

0 Members and 3 Guests are viewing this topic.

Purpur

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
    • View Profile
White spots/pixels on character edges
« on: December 02, 2012, 07:47:16 AM »

Hi there!

Got a strange problem and hope somebody can help.
While playing the demo I noticed some white spots/pixels on the edge of my character.
Opened with Photoshop and underlayed with a dark background there's absolutely nothing special to see.

I tried to figure out what the problem is but i haven't got a clue.
The entire graphics we use in our game are .png without interlace and RGB colors in 8 Bit.
I also tried 24 and 32 Bit - for nothing. I've changed the format to .tga with alpha channel for a transparent background - without success.
I've taken a look into the WME Sprite Editor but didn't find a solution.

Here's a part of a screenshot with focus on the white spots.
If you can't see them, please zoom in:




When the character is standing in brighter scenes the spots aren't really noticable ... but in darker scenes it's kinda ugly, especially when playing in fullscreen.

Any ideas? :(

Edit:
Shame on me.
I totally overlooked this one: http://forum.dead-code.org/index.php?topic=5343.0
But to be honest i don't really understand what needs to be done ...
« Last Edit: December 02, 2012, 08:07:39 AM by Purpur »
Logged

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re: White spots/pixels on character edges
« Reply #1 on: December 02, 2012, 11:45:51 AM »

The article is correct although wording is a bit strange. To say it simpler even the transparent pixels in a PNG has a color value. Most of the programs (if not all of them) use white as color value for those pixels. I don't know if that's part of the PNG specs or programs do it to produce smaller PNGs as having the same color everywhere is easily compressible data.

The issue with GPU scaling (wme and most engines use) is that for anti-aliasing reasons it blends the edges of the file which includes those transparent (white) pixels and so you get the white artifacts.

What the document suggests is adding more pixels around your graphic files but not 100% transparent (so they don't get white when saved) but 99%. The color of those pixels should be the same as the border of your character. This way the image will be blend with those pixels and not with the white ones.

The way this guy does it is by duplicating the character layer below the character and blurring it just a little bit.
Logged
fl*p

Purpur

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 10
    • View Profile
Re: White spots/pixels on character edges
« Reply #2 on: December 02, 2012, 06:11:43 PM »

Hi odnorf!
and blurring it just a little bit.
That was the point, it works perfectly!

At first I duplicated the characters layer for four or five times so the edges became thick. I fused the layers so it became one single layer.
After that I opened the layer options and put a black colored outline on it with 1 pixel thickness and 1% opacity.
When starting the demo now, all of those white spots are completely gone, great!

But I also found out that duplicating the layers is NOT necessary. The black outline (which actually is invisible) is absolutely enough and it work's perfect.

Thank you very much!! :)
Logged
 

Page created in 0.038 seconds with 19 queries.