I've started using the LessDirt texture pack when I use default_grid, which is easy to do by placing a link (or copy) of LessDirt in the default_grid directory.
However, this got me thinking. By doing this I'm using modified texture images, while default_grid is based on doing as much as possible using the override.txt file.
I discovered that I could implement all the dirt/grass and dirt/litter textures using a single image file, without the need for *_side textures. It also gives the added ability of being able to individually set the percentage of dirt shown, just by editing the override.txt file.
(Dirt/snow could use this, but technically has a different side pattern, while permafrost with moss or stones can't—they have completely different side patterns.)
Using a single sidemask.png (16px × 36px) file and three lines in override.txt (for each of the nodes shown below):
Code: Select all
default:dirt_with_grass top default_grass.png^grid.png
default:dirt_with_grass bottom default_dirt.png^grid.png
default:dirt_with_grass sides default_grass.png^(default_dirt.png^[combine:16x16:0,Y=sidemask.png^[makealpha:255,255,255)^grid.png
Where the Y in "[combine:16x16:0,Y" can range from 0 down to -20.
I can generate all of the following and more (picture only shows even values of Y):
- Y = 0 gives 100% grass on side
- Y = -4 matches LessDirt
- Y = -6 matches new minetest game green grass
- Y = -10 matches old green grass and current dry grass
- Y = -20 gives 100% dirt on side
I'm currently not planning on adding this to default_grid, but I thought it was interesting.