Pyxel Edit Forum Archive
ArchiveFeature requests

Tileset export: repeat colors

T
TheReverend
May 25, 2015 at 11:54 pm
First of all: great Program already. I really enjoy using PyxelEdit.

But now the request:

When exporting a tileset PyxelEdit lets me set a padding between the subimages. That padding is filled with black alpha 0.

Problem:
If a grafics engine needs to resize and thus resample the image it might mix in colors from outside the tile (in this case black0) creating seams with wrong colors.
Fix: instead of filling the padding with black0, fill it by repeating neighboring colors and alpha:



I currently do that by using a small tool called Tileset Champion:
http://gmc.yoyogames.com/index.php?showtopic=546371

Would be nice to have an option in the export window of PyxelEdit though.
W
willpowered
Jun 21, 2015 at 11:20 am
Seconded! I registered on the forum today specifically to suggest this. (I mean, I'll probably make more suggestions later too, but today I'm here for this!)

The problem for me is that when OpenGL goes to sample the color on the texture, it mistakenly interpolates the zero alpha padding pixels with the pixels of the tile.
Depending on the position/zoom/rotation of the camera, it can look pretty ugly in-game.


Very nasty seams happening there! Although the tileset looks nice when exported by Pyxel Edit, it's actually unusable in-game.

My current workaround (using libGDX) is to export the tileset from Pyxel Edit as individual tiles, then repack them with the libGDX Texture Packer, with the duplicatePadding flag set to true. This does what TheReverend's example image shows, and makes the tileset usable.