minetest-LOTR / Lord-of-the-Test

LOTR-inspired Subgame for Minetest. Rewrite: https://github.com/minetest-LOTR/Third-Age
Other
67 stars 31 forks source link

Add biome blending to grass. #169

Open DonFlymoor opened 3 years ago

DonFlymoor commented 3 years ago

Biome blending should also apply to grass, so the grass plants match the grass on the ground.

lumidify commented 3 years ago

Hi, Could you be a bit more specific what you mean here? Do you have a screenshot of the issue you're having? What branch is this on, master or v2-rewrite?

DonFlymoor commented 3 years ago

Ok, I realize I was being a bit vague. The issue arises in v2-rewrite, where the biome is a completely different color than the tall grass. (for instance, bright yellow-green tall grass growing from a dark blue-green biome). In order to make the tall grass blend in better, it should be the same color of the ground beneath it. I'm not entirely sure how the biome-blending mod works, but I believe it would be possible to include the grass plants when the grassy dirt block are colored.

lumidify commented 3 years ago

Hmm, do you mean something like this? 2020-12-18-134137_495x304_scrot If so, then that wouldn't be a problem with biome-blending - that would be when there are issues at the border between two biomes. I didn't write the code for this, but it seems like this is the expected behavior (see mapgen/biomes/blue_mountains.lua, line 71). You do have a point, though, it may be better to change that setting, but since I don't know the reasoning behind writing it like this in the first place, I can't really judge what's better at the moment.

DonFlymoor commented 3 years ago

That is exactly what I mean. The way biome blending works is by coloring all the grass in the biome according to a color pallet, one pallet for each biome. This is obviously true, because the grass in the texture folder is white, and I don't see any white grass in the game. I was thinking of adding grass-like plants to the blocks which biome-blending colors. (by changing the grass to white in the texture pack and then moddifing boime-blending's code.) in order to get them the same color.

lumidify commented 3 years ago

The biome blending is currently only done for the dirt blocks (see lottitems/mapgen/grasses.lua), but not for the tall grass growing on them. The particular grass in the screenshot is lottplants:grass_5, which is defined in lottplants/grass.lua and uses the texture lottplants/textures/lottplants_grass_5.png, which is already colored green. You're more than welcome to implement biome blending for the grass, I'm just not entirely convinced that it really would look good. Maybe the grass was left that color so there's some variety in the biome instead of everything looking the same, so I'll definitely have to get feedback from the other developers before committing any changes.