• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Windows Strange artifacting around PNG images (2.0.5.74)

chubigans

Member
I've found that importing clean PNGs with shadows, specifically PNGs with light/white elements, have some strange artifacts around them.

Below you'll see the flattened dough on top of a white cutting board (both separate sprites). In Photoshop it looks clean but importing it into GMS 2 adds some black outlines. I've tried placing it in its own texture group, added more borders/de-selected no cropping, even tried re-importing multiple times just to see if that clears it up, but no luck.




Any idea what might be causing this, or what can be done to solve it?

Note: I put the build number but I don't know if this was an issue in previous builds or a new one, I just came across this issue today.
 

FrostyCat

Member
Pre-multiply the alpha on the dough sprites. GMS 1.x had to do this a lot to solve issues with anti-aliased edges and drop shadows.
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Iirc, GMS2 doesn't have a pre-multiply option yet. So, I'd file a bug report about this so that it gets looked at, and (imho) it shouldn't be required anyway. If I can import the same PNG into multiple programs and they all display it fine, then GMS2 should be the same and "just work" with those images.
 

chubigans

Member
Iirc, GMS2 doesn't have a pre-multiply option yet. So, I'd file a bug report about this so that it gets looked at, and (imho) it shouldn't be required anyway. If I can import the same PNG into multiple programs and they all display it fine, then GMS2 should be the same and "just work" with those images.
Filed as a bug. Thanks!
 

gnysek

Member
Sometimes if you draw in Photoshop over layers, and then hide them and export image with transparent background, only because you're using build-in effects they behave different with transparent background inside in Photoshop - even before export, but since of transparency it's hard to notice. For example, above, you've got merged shadows with #FFFFFF00 RGBA, but when exporting, you're for sure hiding "desk" background image and then Photoshop merges shadow effect with #FFFFFFFF or #000000FF (not sure that Photoshop treat transparency as black or white).
I've come to this issue several times, and noticed it's better to merge images before export, so they have no effects applied on them anymore, but the exported image is rather one layer (with optional transparent layer under it). To merge it, the safest option is to create one empty layer and merge with it.

To test that this issue apply in this case, you should create new image in photoshop, copy the background (table in restaurant), import exported PNG file, and place it on this image.
 
Top