JannisX11 / blockbench

Blockbench - A low poly 3D model editor
https://www.blockbench.net
GNU General Public License v3.0
3.25k stars 282 forks source link

Colour-adjustement tools behave incorrectly with Layers. #2451

Open Estecka opened 3 weeks ago

Estecka commented 3 weeks ago

What are you trying to do, and what do you expect to happen?

I'm using Blockbench for the first time, for the puropose of creating a player skin. My project has multiple layers, and I wanted to do some colour corrections on one of them.

This issue affects most of the tools nested inside the "image" menu: Brightness & Contrast, Saturation & Hue, Adjust Opacity, Invert Colors, and Adjust curves. When using any of these tools, I expect that only the colours on the current layer will be modified.

What happens instead?

Only the selected layer is modified, but the tool uses colours from all the visible layers, as if everything had been merged together. (The other layers are not actually modified.)

Example:

Using the "Invert" tool on the Eyes layer. All layers are visible at the time the tool is used; the "Eye layer only" screenshots had the other layers hidden after using the tool.

Layers

Invert

Model format in which the issue occurs

Minecraft skin

Blockbench variant

Program

Blockbench version

4.10.4 Portable

Operating System

Windows 10

Installed Blockbench plugins

None

Estecka commented 3 weeks ago

Just noticed that those same tools behave very strangely on layers that have been moved or cropped. I believe this is related, because this can once again be explained by the whole texture being copied onto the active layer, with the addition of the result being then transformed the exact same way as the active layer. What's really funky here is that how you got the layer to this position or size is as important, if not more, than the actual size and position of the layer.

More examples, using the Invert tool on an empty top layer. Attached project so you can look at those layers:
model.bbmodel.zip

If the layer has been offset with the Move tool, then adjustment tools will cause the result to be offset even further in the same direction. (Here, 1 pixel up and left.)
Offset
If I made a selection, the modified pixels might even end up outside the selection:
Selection

If the layer has been cropped using the Selection tool, then adjustements will behave similarly to a moved layer... Crop ... but if the layer has been scaled to the exact same dimensions, then adjustments will result is the entire texture being scaled to fit the layer Scale