Dynmap-Forge/Fabric

Dynmap-Forge/Fabric

1M Downloads

Inconsistent perceived quality when using webp-90

VL4DST3R opened this issue ยท 16 comments

commented

Issue Description: I noticed recently after switching to webp-90 image format - what I presumed a good compromise between the crisp lossless png and the noisy and blurry jpeg - that the results at a presumably high quality setting results in very inconsistent and "splochy" images.

image
notice the vaseline-like effect for certain tiles around the buildings, paths and shallow water, vs the crisp deep water and pink tree leaves (all done at the same quality)

  • Dynmap Version: core=3.7-beta-2-923, plugin=3.7-beta-2-923
  • Server Version: Paper version git-Paper-196 (MC: 1.20.1) (Implementing API version 1.20.1-R0.1-SNAPSHOT) (Git: 773dd72)
  • Pastebin of Configuration.txt: entirely default, freshly generated config with the latest build, with only image-format: webp-q90 changed (and the respective cwebp and dwebp paths provided
  • Server Host (if applicable): Selfhosted, can provide dynmap url in private if desired
  • Pastebin of crashlogs or other relevant logs: n/a
  • Other Relevant Data/Screenshots: no texture pack, seems to happen on any map format
  • Steps to Replicate: see above

[x] I have looked at all other issues and this is not a duplicate
[x] I have been able to replicate this

commented

image
Same problem

commented

https://dynmap-setup.jurgenmk.nl/?worldname=world_formats&mapname=surfacejpg90&zoom=4&x=195&y=64&z=-143
that is not the case on our showcase server, are you sure those chunks are rerendered?

commented

Unless I'm missing something or the fullrender/radiusrender skips chunks, indeed they are. I re-rendered them just before posting the issue to make sure nothing iffy is happening there and nothing changed as I watched them in the web view getting refreshed (flashing black briefly).

My educated guess is that it seems to be caused by certain patterns on the map being poorly compressed by webp. Bumping compression to webp-95 reduced somewhat the effect, but it's still bad in places.

Checking your showcase map I can only see isometric perspective renders, this issue happens apparently exclusively in the top-down view - I forgot to stress that.

commented

ah, thanks for spotting that misconfiguration, updated the config, it is still rendering, but I haven't seen any fuzzy images yet:
https://dynmap-setup.jurgenmk.nl/?worldname=world_flat_formats&mapname=flatwebp-q90&zoom=1&x=213&y=64&z=-139

commented

Indeed yours seems much cleaner, basically what i hoped it would look like. Only thing that comes to mind is the version of the libs used to create the webps, namely the two tools that you are required to link to (cwebp, dwebp). Could this be due to an older version I'm using or that works different on windows vs linux? (on windows btw)

On a side note, can I somehow find via image metadata what compression settings was the webp tile saved at?

commented

I am using linux indeed, needed to build from source because of ARM processors, maybe you can try that for linux too, idk if that would work. I am using libwebp-1.2.4 for my server.

idk if you can extract compression data from an image

commented

The version linked for windows inside the config is still up to date? Maybe that's the issue. I couldn't find any version numbers in the file's properties or via cli

commented

what do you mean? I don't really get what you are asking. I just git cloned the webp source, and used their build guide to generate for my system

commented

if you look inside the dynmap configuration.txt file under image-format there is a url to https://developers.google.com/speed/webp/download which i have no idea if it is by now outdated or not (that's what I use for my binaries)

commented

that is using 1.3.2 version of webp, I am using version 1.2.4, maybe something broke?

commented

Will change the version i currently have and test again tomorrow and report back.

commented

Back and its still the same. I was using an older version since I downloaded it the first time some years ago, but now testing the latest and the one you're using and the results are just as shitty. Indeed changing the quality seems to be the only factor here, as lowering it back to 90 makes it even worse. Here are two more examples zoomed-in manually to make them more visible:

WEBP 95 - noticeable artifacts and blurring around the shoreline and in the grass pattern being a simple flat green in a few paces
image

WEBP 90 - even more of the shoreline is now smudged/single color noticeable towards top-right of the image. The hill next to the + - buttons also randomly lost its texture in a small area
image

If i had to guess, maybe the compression settings are not applied correctly from the config numbers some of the time and results in a far more compressed tile than it should be?

commented

idk how webp exactly works, but it should just work, I see it indeed in my windows pc too, but not on linux, maybe try compiling from source?

commented

Given 3 different builds returned pretty much the same result I'm more inclined to think it's most likely either a platform-specific bug, which is very unlikely given it is made by google, or a syntax mismatch somewhere in the code for windows.

commented
image

I also got blurry tiles using webp-90 with latest libwebp-1.4.0 on x86 Linux

commented

@mikeprimm is this issue ever gonna be addressed in any official matter? I would like to know how to mitigate this or at least understand why it is happening.