Captain-Chaos / WorldPainter

WorldPainter is an interactive graphical map generator for the indie game Minecraft.
http://www.worldpainter.net/
GNU General Public License v3.0
341 stars 58 forks source link

[Feature Request] Support for 16-bit Custom Brushes #384

Open ALingll opened 2 months ago

ALingll commented 2 months ago

I noticed that WP currently seems to not support 16-bit brushes, only 8-bit ones.

This might not have been a significant issue for maps before Minecraft 1.16, as it only supported a maximum height of 256 blocks. However, with the height limit raised to 380 blocks, using 8-bit brushes causes some problems. For instance, when creating mountains that exceed 256 blocks, horizontal stripes occur due to insufficient bit depth of the brushes, as shown in the attached images.

Image_1708927004748.png

Image_1708927567945.jpg

In extreme cases, such as with a height limit of 1024 blocks, this issue becomes significantly magnified, resulting in noticeable stepped discontinuities, as depicted in the following images:

Image_1708927048211.png

Image_1708927030279.jpg

Image_1708927027798.jpg

Image_1708927020419.png

I believe it's imperative to provide WP with support for 16-bit grayscale image brushes, as this issue has practically caused troubles for map creators.

ALingll commented 2 months ago

I have noticed that many times WP uses dataBufferByte(which is 8-bit) as a buffer for brush image, and I am not sure if this is causing a loss of accuracy.Screenshot_2024-02-27-05-15-38-829_com.github.android-edit.jpg