[MC-2075] Biome color change is abrupt Created: 03/Nov/12 Updated: 17/Feb/16 Resolved: 15/Feb/16 |
|
| Status: | Resolved |
| Project: | Minecraft: Java Edition |
| Component/s: | None |
| Affects Version/s: | Minecraft 1.4.2, Minecraft 1.4.3, Minecraft 1.4.6, Minecraft 1.4.7, Snapshot 13w09a, Snapshot 13w09b, Minecraft 1.5.1, Minecraft 1.5.2, Snapshot 13w23b, Snapshot 13w24a, Snapshot 13w24b, Minecraft 1.6.1, Minecraft 1.6.2, Minecraft 13w36b, Minecraft 14w08a, Minecraft 1.7.5, Minecraft 14w10b, Minecraft 14w10c, Minecraft 1.8, Minecraft 1.8.1-pre3, Minecraft 1.8.8, Minecraft 15w49b |
| Fix Version/s: | Minecraft 16w07b |
| Type: | Bug | ||
| Reporter: | William Feely | Assignee: | [Mojang] Grum (Erik Broes) |
| Resolution: | Fixed | Votes: | 10 |
| Labels: | biome, color, colour, fading, smooth | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| CHK: | |||||||||
| Confirmation Status: | Confirmed | ||||||||
| Description |
|
Biomes change color too brusquely: they change color within 4 or 5 blocks and tall grass/fern/vines and sky color don't fade at all. This issue is present since Anvil file format was added and it's very noticeable when there is a river in the jungle biome. I downloaded 12w03a, when jungles where added, but world used the old format, so i have a bunch of screenshots for comparison (the first and the last screenshots are from 1.4.3pre, the others are from 12w03a). |
| Comments |
| Comment by Markku [ 17/Feb/16 ] |
|
It is actually still possible to make the transitions smoother, but it requires either more calculations or more memory usage (or both), and the results might still not be as good as pre-anvil. |
| Comment by William Feely [ 16/Feb/16 ] |
|
The underlying issue is that pre-Anvil the foliage color was calculated by values of temperature and rainfall per block, and the biome was calculated based on those values. Since Anvil, those values have been thrown out, and thus the data necessary for a long, smooth transition between biomes no longer exists. Edit: Just tested with 16w07b |
| Comment by Wedhro [ 16/Feb/16 ] |
|
You're probably right; it's just disappointing, as usual. |
| Comment by Markku [ 16/Feb/16 ] |
|
Ok. I think the shorter fading is probably in order to reduce CPU loading (assuming they haven't implement any of the optimizations discussed in comments earlier), thus not considered a bug, but more or less intended. (Since Mojang doesn't bother to communicate about the choices/changes/solutions, we can only guess.) Since they did fix the ferns and stuff, I'd assume they did read about the shorter fading range, too, but decided not to improve it (and my fixes didn't touch the ranges, either). |
| Comment by Wedhro [ 16/Feb/16 ] |
|
Ferns and vines not fading is only half the problem (which I didn't ever notice BTW), the "bug" reported here was about all biome transitions, including grass, leaves etc. Of course I'm using snapshot 16w07b, as you can see in the pic I uplodad, the one with the plains/savanna transition: the fade is still really short, I can just see 2 intermediate colors between the plains' green and the savanna's brown. It's not really a bug so there's no expected result. Colors just change too abruptly since Anvil was introduced, and if it's marked as fixed I expect it to be fixed. |
| Comment by Markku [ 16/Feb/16 ] |
|
Are you on the version (or later) mentioned where it should be fixed? (Probably are, as....) Edit: would be good to specify more clearly what is expected / what exactly is wrong... Edit2: judging from ancient fix comment, the range over which the fading is calculated is (or was) quite short, which in turn limits the number of possible visible steps in the resulting fading. |
| Comment by user-f2760 (Inactive) [ 16/Feb/16 ] |
|
the problem here is that it looked to intense in some cases, brown one block, green next to it, see the 2012-11-03_13.03.36.png Edit: nvm, that's only half the issue |
| Comment by Wedhro [ 16/Feb/16 ] |
|
I don't see why this is been marked as 'fixed' because I still see only 2-3 intermediate colors between different biomes, as you can see in this plains-savanna transition. |
| Comment by Kumasasa [ 06/Dec/15 ] |
|
bfeely, only the reporter of a ticket can modify the affected versions list, but since the reporter is quite inactive, I've made you the reporter of this tickets, you can update the version list as of now. |
| Comment by William Feely [ 06/Dec/15 ] |
|
Hi. I can't seem to edit the affected versions list. However, it is still present in 15w49b. |
| Comment by Markku [ 08/Mar/14 ] |
|
Affects 14w10c. Used creative mode and seed -4542366974610774625, fly, /tp ... 1200 120 800, let the area generate, fly to ground level 1161,747 and look north (or at immediate area in general). |
| Comment by William Feely [ 05/Feb/14 ] |
|
14w05b still has the "flat" biome coloration and the transition over only a few blocks. To fix this bug would require adding temperature and rainfall values to the world file format to emulate the pre-Anvil behavior. |
| Comment by [Mod] Ezekiel (ezfe) [ 22/Jan/14 ] |
|
Is this still a concern in the latest Minecraft version 14w03b? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. |
| Comment by Capopanzone [ 12/Sep/13 ] |
|
Still in 13w36b. I'd to see this fixed in the biome update... |
| Comment by Capopanzone [ 17/Jun/13 ] |
|
Still in 13w24b |
| Comment by William Feely [ 04/May/13 ] |
|
Pre-Anvil the world generator would use the calculated Temperature and Rainfall values to color the foliage, and select the biome based on where those values fell (with additional coloring for Swamp and Jungle). However, with the Anvil format the calculated biome is saved into the world file, then the Temperature and Rainfall values discarded. Then the stored biome is colored with a "flat" color based on the average temperature and rainfall for that biome, with some blending at the edges. Storing the Temperature and Rainfall values instead of discarding them would allow the renderer to properly color the biomes, and allow world editors to specify custom values (like they can for biomes with Anvil) to better customize the foliage color in the world. |
| Comment by Markku [ 04/May/13 ] |
|
No need to save the averages. But what would be an improvement giving the same end result but less CPU load, is to calculate the average at chunk load time and keep the results in memory. It would slow the loading a tiny bit, but on the other hand it would speed up the rendering part. That idea has a minor hiccup in it, though. It would need to delay the average calculations from the chunk load time to a point where all the neighbor chunks are also loaded (as it needs the data from neighbor chunks for some blocks). Nothing difficult really, but I don't recall to have seen such existing mechanism in Minecraft yet, so it is an extra step to design first. |
| Comment by William Feely [ 10/Mar/13 ] |
|
I think this is because the Anvil format does not store the calculated Temperature and Rainfall values when the world is generated, thus the game has to go with the "average" values for the biome stored in the world file. |
| Comment by Markku [ 28/Feb/13 ] |
|
Affects 13w09b. |
| Comment by Markku [ 19/Feb/13 ] |
|
The narrow distance over which they change color is to reduce CPU loading (it calculates the average over few blocks range, and that for every block needing it). However, for vines, tall grass and ferns, there seems to be no averaging at all. Lets add it. Fix ColorizerFoliage // Added method, code copied from BlockLeaves public static int calculateAverageColorMultiplier(IBlockAccess blockAccess, int x, int z) { int color1 = 0; int color2 = 0; int color3 = 0; for (int zi = -1; zi <= 1; ++zi) { for (int xi = -1; xi <= 1; ++xi) { int baseColor = blockAccess.getBiomeGenForCoords(x + xi, z + zi).getBiomeFoliageColor(); color1 += (baseColor & 16711680) >> 16; color2 += (baseColor & 65280) >> 8; color3 += baseColor & 255; } } return (color1 / 9 & 255) << 16 | (color2 / 9 & 255) << 8 | color3 / 9 & 255; } ColorizerGrass // Added method, code copied from BlockGrass. Yuck 99% duplicate, but Mojang seems to like it so anyway: public static int calculateAverageColorMultiplier(IBlockAccess blockAccess, int x, int z) { int color1 = 0; int color2 = 0; int color3 = 0; for (int zi = -1; zi <= 1; ++zi) { for (int xi = -1; xi <= 1; ++xi) { int baseColor = blockAccess.getBiomeGenForCoords(x + xi, z + zi).getBiomeGrassColor(); color1 += (baseColor & 16711680) >> 16; color2 += (baseColor & 65280) >> 8; color3 += baseColor & 255; } } return (color1 / 9 & 255) << 16 | (color2 / 9 & 255) << 8 | color3 / 9 & 255; } BlockLeaves public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { ... } else { // Using that added and shared method: return ColorizerFoliage.calculateAverageColorMultiplier(par1IBlockAccess, par2, par4); } } BlockGrass public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { // Using that added and shared method: return ColorizerGrass.calculateAverageColorMultiplier(par1IBlockAccess, par2, par4); } BlockVine public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { return ColorizerFoliage.calculateAverageColorMultiplier(par1IBlockAccess, par2, par4); } BlockTallGrass public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4) { int var5 = par1IBlockAccess.getBlockMetadata(par2, par3, par4); return var5 == 0 ? 16777215 : ColorizerGrass.calculateAverageColorMultiplier(par1IBlockAccess, par2, par4); } Tested on 1.4.7 and seems to work. I'll attach a screenshot of the results 'fixed-coloring.png': note the rows of grass/ferns, and the vines on the tree at right side. |
| Comment by stephen locke [ 15/Nov/12 ] |
|
setting your graphics to "fast" will fix this problem. Although you wont have the gradation. |