Slice-9 different image results (DEF-3844)

Here’s what I see in the editor:
defold1

Here’s what I see when I build the project:

The one in the editor looks correct. The one in the build seems wrong, notice some black vertical lines are missing, both in the left and right sides.

I am using the latest build 1.2.148 under Windows 10. My slice-9 settings are 30,30,30,30 trying to keep the frame edges. The image size is 320x236. The results are the same even if I use a different image asset.

Am I doing something wrong?

Hmm, I recognise this. Is gui node smaller than the original image in the atlas? I recall having problems with this in the past and I think it was caused by the node being smaller than the image.

1 Like

This is probably the mipmapping problem that has been around for ages. If you turn off the mipmapping for the atlas in a texture profile this will not happen.

Furthermore I don’t think that texture is suited for 9 slicing as the mid parts will be stretched and not at all look like wood in extreme cases (but that is of course if you choose to scale it much beyond it’s origin ratio)

4 Likes

Yes the gui node is smaller (vertically) compared to the original image in the atlas. If the node is at least 1/2 of the original image size, it looks much better.

So yes it looks like the problem is when the gui node is smaller compared to the original image size. It’s just strange that it looks perfectly ok when viewed from the editor? Why is the build output different than what’s displayed in the editor?

1 Like

Turning off mipmapping solved my problem indeed. Now it looks perfect, even if the gui node is smaller. Thanks!

1 Like

Well, it’s a bug. There should never be a discrepancy between what you see in the editor and what you get when running your game. Created DEF-3844.

2 Likes