Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Auto Quality causes too much blurriness?

A topic by Scarlet String Studios created Nov 20, 2023 Views: 237 Replies: 7
Viewing posts 1 to 8

Here's something I've wondered about for a while — how does the Auto Quality setting determine the appropriate quality for a mesh? I've often found that the result is blurry compared to setting the quality myself.

Here's an example at 1080p, with a Canvas that's configured for 2160p.

Quality: 80 (manual)



Quality: 40 (auto) (top only)

In the second pic, the top text box is set to Auto Quality while the bottom is manually set to 80. The top gets auto-set to 40 quality, and if you view it at 100% resolution, you can see that it's a little blurry.


Here's TMP for comparison:

Now, TMP might not be a good point of reference, because the whole system seems to be different (there's no quality setting). But I think it looks like the best of the three (it might be similar to 70-ish quality).

Anyway, I could probably work around this by having a script set the quality to "auto * 1.5" or something like that, but I'm wondering if I'm setting this up incorrectly, or if I should be using some other method to determine quality.

Developer

Hmm this is the second report I've gotten about auto-quality in a short time, so I may have to look into this.

AutoQuality's code is just this:


(int)Mathf.Ceil(size * parentCanvas.scaleFactor);

Turns out, parentCanvas.scaleFactor doesn't work when the canvas isn't rendering in screen space. Are you using a screen space canvas?


If that doesn't change anything, what I think is happening is... the canvas is targeting 1080p, but the game is targeting 2160p. AutoQuality only cares about the parent canvas's scale factor, not the game's target resolution.... so maybe the scaleFactor is getting confused somewhere else along the way and I'll have to do a manual comparison somewhere? 

First, just let me know if you're using a world space canvas or not, and if so... I'll either have to write a manual scale check, or just say to set the quality manually.

Interesting — the canvas is set to Screen Space - Camera. And the Canvas Scaler is set to Scale With Screen Size with a reference resolution of 3840x2160.

I never quite figured out how canvas scaling works, so I can see why it's a little confusing. To clarify my original post, those screenshots were taken in the editor with the Game view set to 1080p. I've noticed similar behavior in builds, but I figured I'd point that out, because I think some screen-related properties return different values in the editor (like Screen.width or one of those).

Developer (1 edit)

Yeah, I noticed that when resizing the editor, things like the scale factor didn't actually seem to change... do you get different results in a build?

I may have to revisit how auto-quality is calculated. If the canvas were to be 2160p tall and the text size were to be 80, ideally, the quality should be set to 80 if there's no scaling going on. So if it were rendering at 1080p with the same settings, the text ideally should go down to 40 quality, to match the actual screen resolution. So maybe it should be a comparison between the canvas reference height and Screen.height...? We could give that a shot and see if it produces a result in-editor

Yeah, the results in build seem to be the same as in editor.

Auto quality (40)



Manual quality (60)



Logically, it seems reasonable to decrease the quality to 40 for 1080p, but in practice I find that it looks blurry compared to 80 quality at 2160p. It's a bit hard to compare because one screenshot would be way larger than the other, but I'd say it looks closer to my second screenshot here (60 quality at 1080p).

Developer

Hmm... well all that auto-quality does is try to match the font point size to the size of the text on a canvas... if it's doing that successfully but doesn't look good, it's probably better to set that value manually at this point? I'm not sure what else I should do...

That's probably what I'll end up doing, yeah. It's something that TextMeshPro seems to handle better, but I'm not sure how it works.

Developer

Yeah it's something I'm going to keep thinking about for sure... I'll have to mess around with different methods and resolutions and just see what happens/looks best.