+1 vote

I am new to Godot Engine, and use NinePatchRect to make a dialogue box.
But I encounter the problem is that the corners(the place circled on the image) looks too small.
In Unity, the solution is changing "Pixels Per Unit"of the sprite smaller, I didn't see any similar option on Godot.
Where can I change "Pixels Per Unit"? , or other ways to solve it?

(It's the image)

Godot version Godot 3.3.2.stable.mono
in Engine by (13 points)

Do you mean the embroidering on the corners look too low-res? If that's the case, try this:
Godot Interface
(I'll be using the above image to demonstrate)
In the FileSystem (bottom left on the image), select the image you used in your Sprite node. Once you have selected, go to the "Scene" tab (top left on the image). Right next to the "Scene" tab should be the "Import" tab.

Import tab

Once you are in the Import tab, it should look like the above.

Note the file selected in the "FileSystem" and the "Reimport" button.

Once you are here, you should try fiddling around with the properties. Try to turn "filter" on and off. To apply the changes, press "reimport". If you turn filter off (and it doesn't work), turn it on again and turn on "mipmaps".

(I'm also assuming the image you are working with is a Raster image (.PNG, .JPG), and not a vector image.)

And also a few more things to note from my own experiences:
If your images are low-res, of lower quality, or they are too small, well then you should find yourself a better image.
If your images are vector images (and they are .SVG format), try scaling the vector image in the "SVG" section.
And finally, if your images are too big (so if they are too big, or you scaled them up too much in the SVG section), as soon as you down-scale the big image, it will turn pixelated and weird. If this is the case, turn on 'filter' and 'mipmaps'.

For further reading:

Thank you for answering my question, Let me describe my problem more detailed.
In short, my box is displayed like A on Godot, but I need it displaying like B.


Is the embroidery a sprite? Is it auto-generated?

Edit: I've looked again, and it seems as if it's a sprite. Could you explain to me how your text box is generated?

How about making your sprite texture itself bigger? Your texture looks really small.

Or you could even just upscale the 'Scale' property under the 'Rect' section. You might have to change a few things, but it will make everything bigger.

Edit: I'm also sorry for overlooking a few things in the original question. Kinda took you into a full circle.

OK,It seems like I can't adjust some options to enlarge the sprite on Godot..., I will enlarge my sprite. Thank you for helping me!

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.