satoshinm / NetCraft

Web-based fork of fogleman/Craft ⛺
https://satoshinm.github.io/NetCraft/
MIT License
57 stars 13 forks source link

[Textures] Greenification of plant textures on loaded packs #149

Open satoshinm opened 7 years ago

satoshinm commented 7 years ago

Especially for https://github.com/satoshinm/NetCraft/issues/113, but even with texture atlases from pre-1.5 MC, such as loading 1.7.3 beta terrain.png here - or many other packs - the leaves and grass appear gray instead of green:

screenshot-netcraft-2017-05-21t04_37_22 948z

A green tint likely needs to be applied. Might as well change the default texture to gray, too, and make it green at runtime (in the shader?).

satoshinm commented 7 years ago

https://www.reddit.com/r/Minecraft/comments/368lzd/my_biome_color_specific_blocks_all_changed_to/ describes a similar problem:

xiweehbr

and suggests it has to do with the "tintindex" of the resources, used to apply a biome-specific color.

satoshinm commented 7 years ago

Something like this may help? From CraftNG: https://github.com/twetzel59/CraftNG/commit/b715b8c319e5650dabc8597ef05af464cf46d3f6 -- well, that's for sky tint per biome

The technical term is colorization. Interesting algorithm: http://tinyclouds.org/colorize/ using TensorFlow to automatically colorize. But this problem is much simpler. There are specific textures which are only grayscale (r=g=b), use to lookup in 256x256 grasscolor or foliagecolor.

satoshinm commented 7 years ago

Requested on https://www.spigotmc.org/threads/websandboxmc.232807/page-3#post-2428619 "when will green grass and green leaves be implemented just wondering:)" https://github.com/hughsk/voxel-colorist

ghost commented 4 years ago

If you not yet want to make biome and the green color change by biome, you and simply choose a color in colormap, and then overlay it on the grayscale picture.