# Low Image Quality On Widgets

**URL:** <https://forums.unrealengine.com/t/low-image-quality-on-widgets/1279577>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, Widget\
**Created:** [September 1, 2023, 8:52am UTC](https://forums.unrealengine.com/t/low-image-quality-on-widgets/1279577 "2023-09-01T08:52:44Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![blagic23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@blagic23](https://forums.unrealengine.com/u/blagic23)\
**Post date:** [September 1, 2023, 8:52am UTC](https://forums.unrealengine.com/t/low-image-quality-on-widgets/1279577/1 "2023-09-01T08:52:44Z")

</div>

I searched about this problem online but none of the answers seemed to work for me. My friend is using Adobe Illustrator for creating the visuals, but whenever I use his assets, it always end up with this ugly pixelated images.

 ![Adsız](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/6/3/c633650d23a2efe388dace7b1e1e2567eca9ebbe.png)

Normally, black borders are supposed to be smooth lines, but they end up with that jagged line, and overall quality has been downgraded. I thought it was something to do with anti-aliasing, so I set it to FXAA. It didn’t solve. We tried lowering image resolutions to match the button’s, which didn’t solve the problem either.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [September 1, 2023, 9:54am UTC](https://forums.unrealengine.com/t/low-image-quality-on-widgets/1279577/2 "2023-09-01T09:54:26Z")

</div>

Can you show the details panel of an image / border you’re using for this? Let’s say the first bubble text box. And the hierarchy of this widget.

---

<div class="post-metadata">

**Author:** ![blagic23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@blagic23](https://forums.unrealengine.com/u/blagic23)\
**Post date:** [September 1, 2023, 10:13am UTC](https://forums.unrealengine.com/t/low-image-quality-on-widgets/1279577/3 "2023-09-01T10:13:15Z")

</div>

![Hierarchy](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/2/d/12d9e3bc83c7924d69d77ee3bd439112c363f488.png)  
 ![Details1](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/4/4/544dbc91ea12c1e0ac30d445d5f2f338e050d83c.png)  
 ![Details2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/c/0/0c080f5f9e5e8df8e8b9858d2e258d2daa5bd2fa.png)

Here you go.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [September 1, 2023, 10:18am UTC](https://forums.unrealengine.com/t/low-image-quality-on-widgets/1279577/4 "2023-09-01T10:18:34Z")

</div>

So what’s the actual size of the image - the asset? Apart from that, you’re not using 9-slice here which will be a major source of distortion and artefacts.

For example, the same 256x256 asset:

- Draw as Image

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/c/a/9cacbb151b500a267f3e570038744ab4d7f23279.png)

- 9-sliced box:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/e/4/4e4fd931f49180ed98e0777aa0171b07c25ccaa3.png)

This is zoomed in 10x in the designer to dramatically exaggerate the effect. How to set it up depends on the expectations and on how dynamic things need to be. If your image is a square and you stretch it horizontally, it will be a mess. Hard to advice better without more details.

* * *

> so I set it to FXAA. It didn’t solve.

AA method should have no impact here _unless_ we use a widget component in world space but it does not seem to be the case here. If it was a component, the quality would be much worse.

Generally speaking, you should be able to achieve _mostly_ pixel-perfect results but it may need to some tweaking.

---

<div class="post-metadata">

**Author:** ![blagic23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@blagic23](https://forums.unrealengine.com/u/blagic23)\
**Post date:** [September 1, 2023, 10:51am UTC](https://forums.unrealengine.com/t/low-image-quality-on-widgets/1279577/5 "2023-09-01T10:51:37Z")

</div>

Oh. It is 5724x2041. I must admit, that is a bit larger than what is required xD. I took it to full scale and divided it by 5. So the scaling is correct, but whenever I apply a margin of 0.2, it gets like this. Only not messed up margin value was 0, 0.5 and 1. I couldn’t see any major difference between them too.

 ![9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/8/8/8884b2eb84e54590cdd8b65a190d895d2d1d387c.png)

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [September 1, 2023, 10:53am UTC](https://forums.unrealengine.com/t/low-image-quality-on-widgets/1279577/6 "2023-09-01T10:53:12Z")

</div>

Those margins will not work for this image size and **shape** - shape specifically. Try .4 margins, or maybe even .45.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/d/8/7d874b6f21a7cb483da69ef237bd7315d46e329d.png)

What is the max resolution you’re targeting with this? 4k? With 9-slice you want the smallest image size you can get away with.

---

<div class="post-metadata">

**Author:** ![blagic23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@blagic23](https://forums.unrealengine.com/u/blagic23)\
**Post date:** [September 1, 2023, 11:01am UTC](https://forums.unrealengine.com/t/low-image-quality-on-widgets/1279577/7 "2023-09-01T11:01:31Z")

</div>

Sir, frankly I have no idea what I am doing, but the canvas size is 720p. And yes, 0.45 seemed to work fine. Before you mentioned it, I didn’t know about 9-slice. So I’ll now proceed to watching youtube videos about it. Thanks for informing me about it.

![9.2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/d/8/8d8644aa91dbbad58bbd69c13282a1b84b1bfe9a.png)

Oh and, image is still as not crisp as the original texture. There are still some jagged lines.

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [September 1, 2023, 11:13am UTC](https://forums.unrealengine.com/t/low-image-quality-on-widgets/1279577/8 "2023-09-01T11:13:10Z")

</div>

Scroll down to `Setting Image States`:

> **[UMG Styling in Unreal Engine | Unreal Engine 5.7 Documentation | Epic...](https://dev.epicgames.com/documentation/en-us/unreal-engine/styling?application_version=4.27)**
>
> A guide to stylizing Widget Blueprints in UMG in Unreal Engine.

* * *

> [@blagic23](#):
>
> Oh and, image is still as not crisp as the original texture. There are still some jagged lines.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/a/5/ba5a29f04474d880325094aa0e65dd8f2079e257.png)

These, right? This has something to do with export / import settings, most likely. Or compression. Start by setting the image compression to UI after importing:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/1/a/81a644db4ff00fb9e5a3dc4bda69def2fe129900.png)

And then check out this thread:

> [@White border around 2D Texture / Sprite](https://forums.unrealengine.com/t/white-border-around-2d-texture-sprite/1248223):
>
> Hello, I have downloaded free texture from the internet, edited it a bit and imported in my UE5. Now, my sprite has white border around, which is really strange and iritating. And I cannot resolve it. I tried the same texture in UE4, and all works fine. Image below: It happens to almost any PNG image I import. Here is another example [image] Now to give a bit more info. My Workflow: Import the texture Right Click → Apply Papper 2D Settings Change texture group to UI beca…

* * *

Yet another way to handle it all is to use materials:

> [@How can i get nice unstreatched borders in UMG](https://forums.unrealengine.com/t/how-can-i-get-nice-unstreatched-borders-in-umg/1261331/3):
>
> 9-Slice. Scroll down to Setting Image States: [https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/UMG/UserGuide/Styling/](https://docs.unrealengine.com/4.27/en-US/InteractiveExperiences/UMG/UserGuide/Styling/) Example: [https://forums.unrealengine.com/t/creating-a-material-instance-for-each-button-all-good/476815/2?u=everynone](https://forums.unrealengine.com/t/creating-a-material-instance-for-each-button-all-good/476815/2) The material is drawn as a box with margins set to zero. However, no matter how I’m configuring the margin and the draw-as, I can’t get it to look good on smaller buttons: Can you show how it’s set up, and what are the sizes we’re talking a…

You then get to dictate the Image Size.

* * *

> but the canvas size is 720p.

If you mean this:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/9/5/09534cfd17c65c35be43a61da56e6d86bd2563e7.png)

Then this is just a designer _preview_ so you can get a rough idea of how things are going to line up.

---

<div class="post-metadata">

**Author:** ![blagic23](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@blagic23](https://forums.unrealengine.com/u/blagic23)\
**Post date:** [September 3, 2023, 3:49pm UTC](https://forums.unrealengine.com/t/low-image-quality-on-widgets/1279577/9 "2023-09-03T15:49:58Z")

</div>

Thanks for your replies. After getting correct resolutions for images and using 9-slice,  
there aren’t any more problems. It appears the solution wasn’t as complex as I thought.
