- Home /
PNG files look ugly
I have a png that I am using for a GUITexture, the .png is 1024x768 pixels and looks pretty nice. When I import it for use in Unity it looks disgusting, I have fiddled with the scale and pixel inset properties but have had no luck...
What is causing this and how can I fix it?
Thanks
Define "disgusting". Comparative screenshots are probably best.
Answer by VivienS · Jan 31, 2011 at 08:51 AM
If you're using a texture as GUI element and it looks like the resolution is much smaller than your actual image, the problem could be the mipmap settings of the importer.
-> In the import dialogue, set the texture type to GUI (this disables mipmap generation, sets the wrap mode to clamp and disables the internal resampling to a power of two size ... as far as I've seen ;-))
greetings, vv
You're right and the texture type GUI uses another antialiasing method so the texture doesn't look blurry
i've given this a try but it still generates the same result (maybe marginally better)
$$anonymous$$hh. That would have been my first idea. Care to post a screenshot of the texture and how it looks in your project? $$anonymous$$aybe we can suggest other solutions, when we see the problem.
I can't give any examples, but my background is like a smooth gradient with a scanline pattern over the top, looks great on my monitor, but when I drag it into Unity its like the bit-depth is reduced, a yellow-ish tinge is created and all the scanlines become pixellated.
Another thing that just came to my $$anonymous$$d: gradients and soft contrasts are prone to color compression artifacts. I've had color shifts and the like with some of my textures. Try setting the format (bottom of import dialogue) from "Compressed" or "16 Bit" to "True Color". The drawback with this is however that the texture will need more memory.
Answer by thenegaverse · Jan 15, 2015 at 11:07 PM
Click on the actual imported image file in your project asset viewer, look at the inspector, change the filter mode to Point instead of Bilinear which is typically the default. Any time you import pixel art like that, use the point filter or it'll be filtered with an ugly anti-aliased artifacting.
@thenegaverse your solutions cured my problem with pixel art type graphics
Answer by bearcano · Jan 31, 2011 at 07:08 AM
For one, you should always try using powers of 2 when making images. For instance: 64x64, 128x128, 512x512, 512x1024, etc. You want both your height and width values to be powers of 2.
So first thing I would recommend is to resize your .png so that the height is not 768 but rather something like 512 or 1024.
I have no idea if this is causing it to look "disgusting" (and we would need more info, such as a screenshot, to give you a good answer on it) -- but my first response would be to try resizing the texture first.
the problem is that the image needs to be 1024x768 as it is serving as a background for the application, should i just create some dead space around the edges?
Your answer
Follow this Question
Related Questions
Reduce Draw call for Multiple GUI Textures with same Texture 1 Answer
[CLOSED] Pixel Inset ---> transform scale convert 0 Answers
Door Problem 1 Answer
My GUITexture shrinks on both sides 0 Answers
MultiTouch GUITexture Android 0 Answers