PNG Images on UI and losing graphic fidelity

I have created a menu where I have a PNG image (logo) in the UI. Image / logo was created in photoshop. Issue is I am losing the smoothness of the image around the edges when its imported as
Texture Type: “Sprite (2D and UI)” or “Editor GUI and Legacy GUI”.

This is the result when game is played. (Losing smoothness)

This is the result in scene, when fiddling around with import settings. (Showing as intended - no loss in quality)

I have also made sure the Rect Trasform of the RawImage object has the same size / resolution of the actual image itself.

Scene in play

What am I doing wrong in my settings to be getting this loss of smoothness / quality of my image? Is this a scale issue on the rect transform, as it was dropped from
X:1 , Y:1, Z:1 to
X: 0.2, Y: 0.2, Z: 0.2

Hi Vladimir,

First of all, set the scale to (1, 1, 1). If possible, do not change the scale of UI elements. Is there a reason why you used Raw Image instead of Image? If there isn’t any, use Image.

In the Impirt Settings, click on Advanced. Are Mip Maps enabled? If so, disable them, click on Apply and check your game again. If they are disabled, enable them, click on Aplly and check your game again.

1 Like

It seems like enabling Mip Maps (they were previously disabled) fixed the issue. Thanks Nina.
There was no particular reason to use RawImage, I just picked. I have tried both Image and RawImage, and they both seem to display the image as intended now. What’s the reason for picking Image over RawImage in this case?

I suggested to test Image because there is always a chance that different components process data in a different way. If the result looks the same, keep what you prefer.

https://docs.unity3d.com/Packages/com.unity.ugui@1.0/manual/script-RawImage.html

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms