Better Foliage

Better Foliage

35M Downloads

Better grass is oddly colored

UnixRonin opened this issue · 8 comments

commented

In 1.0.12 with Forge 1388, "better grass" is wrongly colored. If using the generated texture, it's a kind of yellow-straw color. If using the static texture, it's a sort of off-white. Needless to say, this looks very odd, to the point that I had to turn it off. I tested both with and without the Dokucraft resource pack, and it made no difference except in the detail level/resolution of the added grass when using the static texture.

commented

Hi! I am having the same issue... and am using the latest version of Forge and betterfoliage, strangely enough version 1.0.4 is working, all versions after that one do not.

commented

For me, 1.0.6 was the last one working, 1.0.7 broke it.

A little background about foliage rendering in Minecraft. There are 2 major ways this is done by blocks.
First, the block uses a colorless (gray) texture, and the color of the biome at that specific loaction is applied to it, giving it color. This is how the vanilla grass block works.
Second, some blocks ignore biome color, and have a colored texture. A good example of this would be Origin Grass in Biomes O' Plenty, or the Slimegrass in Tinkers' Construct.

Naturally, Better Foliage has to support both of these methods, since Short Grass / Round Leaves can appear on a wide variety of modded blocks. The problem is that there is no magic bullet, no good way to determine how a block renders itself.
In the end I decided to use the following method: simply look at the overall color of the texture (by averaging all non-transparent pixels), and check the color saturation. If it's below 0.1 I call it gray and use the first method, otherwise the second.

The problem with LB Photo Realism is that its grass texture is ever so slightly colored (kind of brownish), putting its saturation at about 0.2. This is, strictly speaking, a fault with the resource pack. Instead of coloring the grass texture slightly brown, it should have a gray texture and make the biome color map slightly browner.

I resolved the issue in 1.0.13 by making the saturation threshold configurable. If you set it to 0.25, Short Grass should work normally. There is still a very slight miscoloration because the biome color does not match the grass block color exactly.
However keep in mind that setting this parameter too high will break grass color with the second type of blocks.

commented

I could not reproduce this with the given Forge and BF versions, with or without resource packs.

Can you post a screenshot, and your list of mods?

commented

Certainly.
Scene with extra grass off:
2015-05-05_17 23 54
Same scene with static grass:
2015-05-05_17 25 16
Same scene with rendered grass:
2015-05-05_17 27 01
Mod list with versions: https://bpaste.net/show/208157df8070
You can find all information about the server and download the actual modpack from http://www.caerllewys.net/caercraft/caercraft-1.7.10.html . My live server is cauldron-1.7.10-1.1388.1.0-server, but I've just tested and verified that I can also reproduce the problem on my forge-1.7.10-10.13.3.1388-1.7.10-universal non-Cauldron test server. I can give you access to either or both for testing if you need it (it's a private server and both are whitelist only, but I'm always happy to do anything I can to help out a modder).

commented

By the way, the rendered grass looks GREAT. Much better than the static texture.

commented

The problem is somehow related to the LB Photo Realism resource pack: taking it out resolves the color issue. I initially suspected the the files in the assets/minecraft/textures/colormap/ folder to be the culprit (happened before), but using those colormaps with otherwise vanilla textures produces no issues.

I'll investigate further.

commented

Interesting — I wouldn't have thought LB would have affected it. I imagine Scuttles will be interested; he's currently working on updating LB Photorealism.

commented

With further experimentation, I've found that Enhanced Photorealism (http://www.minecraftforum.net/forums/mapping-and-modding/resource-packs/2290854-1-8-x-1-7-x-enhanced-photo-realism-512x-256x-128x) does not exhibit the problem. I'm trying to see whether I can narrow it down any further based on that information.