All of my "9-Patch" Panel Sprites are blurry

Hey guys! So, everything in my game is pixel-perfect without any issues - except for panel sprites. I’m trying to create a basic box for menus and textboxes that I can reuse for different things by resizing, except no matter what I do, every time I make a Panel Sprite it always comes out blurry once I start the preview. Pixel-Rounding is off, I have it set to Nearest Neighbor, I triple-checked my resources and image-smoothing is turned off, but no matter what, anytime I put down a panel sprite it becomes horribly blurry. I’ve tried using the exact same image on other things like regular sprites or tile sprites and it works just fine - crisp, clear, and pixel-perfect. But I specifically need a panel sprite that I can use to repeat the edges instead of stretching them, so I can’t use a regular sprite. I’ve attached an image of the problem below - I’ve included the exact same object with the exact same measurements, but as a Sprite on the left and a Panel Sprite on the right. I’ve tried everything but can’t seem to find any solutions, so any help would be greatly appreciated - thank you!

1 Like

Hello there,
Can you give more details about game size, asset size and version of GDevelop?
Here’s a menu box as a standard sprite and a 9-patch
(without any special pixel-perfect setting):

Uhhhh, maybe? >_< I’m new to all of this so I don’t really know how to find all of that. I know the menu box is around 64x64 pixels, and I’m pretty sure I have the latest version of GDevelop, since it updated the other day when I tried to open it (So I think it’s just Gdevelop 5?). I, uh… don’t really know about game size - I’m sorry, I’m totally new to this so I wish I could be more help…

Can you show a screenshot of the Properties panel of how you have the panel sprite set up, as well as the image you are using to make it?

1 Like

By game size, I meant the display size (game resolution) you set up in the Project properties, where you write the name of the game.
By asset size, I meant the size in pixels of the png/jpg image file you use as 9-patch object.
By version of GDevelop, I meant the exact build version. If you think you have the latest, it should be 5.0.126 or 5.0.127. This info is in Help/About.

The details requested by beanmatt will be helpful too. :slight_smile:

1 Like

Ohhh alright, I understand now! Thank you guys for being so patient, I’m just learning and it helps a lot to have people willing to help and explain how all of this works. Now then, you were right - my current version is 5.0.127, game size is currently 800x600 (width by height, just for clarification), which I think is the default cause I don’t think I ever changed that? Though I will need to figure out how to make all the assets scale for different screen sizes later - but that’s a problem for another time! Anyways, the pixel size of the PNG (which I made with Piskel) is 64x64 like I thought, but now I’m confused because I’m just now looking at the actual PNG image (Since I would always just use the Piskel editor for the images) and even though it says 64x64, the image is super zoomed out and it’s blurry in the image file too? But what’s strange is, it ISN’T blurry in the scene builder, just in the image file and game preview? I took a few extra screenshots to hopefully give more detail on the situation, but because of some sort of permissions limitations I’m gonna have to attach them in subsequent replies.

Panel Sprite Properties:

PNG file screenshot… zoomed in 700%?

PNG file at default zoom (Which is super far out for some reason?)

Piskel Sprite for the Panel Image

Panel Sprite in the Scene Builder (Note how it’s not blurry here, just in the game preview like in the first screenshot I posted in this thread)

Thanks for the details.
So, I made a 64x64 sprite, in a 800x600 scene, switched to Nearest and disabled the smoothing. Here’s preview:
Did you tick that box? I think it looks slightly less crisp without it.

If you’re willing to share that image file of yours, I’ll give it a try.

Sorry for the super super late response, and if you don’t see my reply I totally get it cause it’s been like a week. I’ve been pretty busy with other things so I apologize for the REALLY late response. I can share the file! You’ll have to give me a bit and it probably won’t be until later today, but I’d be happy to do that. I do have one question though- I’ve already made a bunch of copies of the menu box in my Objects list for different things (items, stats, etc.), but since they’re all just duplicates of the same sprite would they change together if I were to somehow fix the image file, or would I have to reupload the file for all of them individually? Cause I know whenever I’ve made a duplicate of an object and changed the sprite of either the original or the duplicate, it’s changed the sprite for both. I think it’s a bug, but in this specific scenario it may actually be good for me. And to answer the questions - I made sure all of the smoothing options were turned off and I double-checked them, I just can’t figure out what’s causing the problem!

Yes, changing the image file will update the asset everywhere in the project.

The duplicate issue you mention is because when you duplicate an object, it doesn’t create a copy of the image file, so if you edit the file, the two objects will use the new file.

Ohhh gotcha! Also wow! Thanks for the really quick response! Next time I work on the project I’ll send you the file, which should be this evening or maybe in a few hours if I get time. Here’s hoping you can figure it out cause for the life of me I don’t know what’s wrong with the file!

I’m having the same issue with panel sprite. Everything looks sharp but the panel.

The game is pixel perfect (nearest) in properties
The resource checkbox for smooth is disabled
The editor screen shows it normally (sharp)

What I found is:

When in a layer without camera zoom, the panel sprite looks sharp. In a layer with camera zoom, all objects look sharp but the panel. The same object, asset and scene.
That’s why I think that’s a bug with the zoom rendering of the panel sprite.

To reproduce the bug just: create a panel sprite, configure everything in the game to be pixel perfect, put it on a layer with camera zoom 2.

My fix was: put it on a layer without zoom with an double sized resource.