Importing crisp looking images (with alpha) into Roblox

I am wondering what file type would result in the clearest looking image when imported into Roblox, I am also wanting the image to have a transparent background. Exporting as a jpeg results in the best quality from what iv’e seen when imported into Roblox, but normal jpegs can’t have alpha sadly enough.

So my next option is to use a png format, yet when imported into Roblox it appears slightly blurry at the edges and where contrasting colors connect. If you have information pertaining to this matter id’e love to hear, thanks.

Ive found that using the scalar property rather than pixel size causes this in a lot of roblox images. (Even if scalar ends up being equal in pixel size)

lol

JPEG uses compression, meaning lower quality
PNG is exactly what you make, and is lossless by default

There could be various reasons for blurriness –

  • The image is not being scaled at its original resolution (40x40 image being displayed at 100x100), meaning it needs to be scaled up
  • The colored edges you are talking about are at a position that isn’t an integer (e.g. 1.5 pixels) - meaning you screen can’t actually display that actually
  • Images have this weird thing where the alpha (transparency) channel is colored black, meaning improperly scaled images will appear to have a black outline

The first one is relatively easy to fix, and that is to have your images at their original resolution. What complicates things more is that, according to Quenty, 1 UDim pixel (the 2D position stuff Roblox uses) is equal to 2 screen pixels – however this doesn’t seem to be correct from my experiences, but may still be helpful to think about.

The second is an issue with the image itself - often when making Vector shapes, you will find each node (vertex) of the shape is at a really weird decimal position if you don’t have snapping enabled (by vector shapes I mean the non-pixel shapes you can make in Illustrator, Photoshop, Inkscape, etc.).
This means the image when it gets exported, for example, ends up having a blend of two different edges to simulate half a pixel.

The final issue is also to do with the image itself. This article by Quenty should help you solve it (and also gives some of the info I’ve said here): Fixing images in Roblox UI. This article is going to look how you… | by James Onnen (Quenty) | Roblox Development | Medium

Also this

:wink:

2 Likes

Quenty has an AMAZING Medium article about this exact topic. You can read it here.

3 Likes

The 3rd point was said to be fixed multiple times over the last 1-2 years. They still haven’t fixed it?

They sure haven’t.

Nope, not sure what you’re talking about.

It’s to do with their image scaling system.

I understand jpeg uses compression, you sort of quoted me out of context: “Exporting as a jpeg results in the best quality from what iv’e seen when imported into Roblox”. I just meant it looked best when imported into Roblox (no weird blurring around edges and contrasting colors).

That aside, thanks for the tips. I am fairly sure it’s not the first two reasons so I will explore the third.

If the image itself looks blurry as a PNG at the correct size, it’s definitely the second one. Otherwise yeah that’s fine.

Not too sure exactly about this contrasting thing, though, could you show an example?

Sure here is an image displaying the phenomena:

50%20PM

I must of been exporting incorrectly multiple times. I just re-exported a couple of minutes ago and it went away. Maybe I was exporting with improper scale, I don’t remember doing so though.

So that’s a single image? Looks to me like you’ve either scaled the image or have the edges on a decimal position (e.g. edge y is 0.5 instead of a whole pixel)

No, its not the entire image. I just took a screenshot of a part where the blurring could be seen.

But is the screenshot completely of that image? Or is of two different images connecting?

Yes, it is comprised of one image.

@Kampfkarren

They said it was fixed multiple times on this post

Black outline appears when scaling images - #31 by vsnry

They say that, but yet I encountered it just last week.