The water and river water textures are completely opaque, which is annoying since it makes it so you can't see through water. This simple script fixes it (run in the Hand Painted Pack by Drummyfish directory):
#!/usr/bin/env perl
use strict;
use warnings;
my $convert = 'mogrify';
foreach (@ARGV ? @ARGV : <default_*water*.png>) {
# Transparency of river water is 160, transparency of regular
# water is 191. Values taken from the textures in Minetest Game.
my $transparency = (/river/i ? 160 : 191)/255;
my @cmd = ($convert, qw(-background none -channel A -evaluate multiply),
$transparency, qw(+channel), $_);
print "Processing $_ (transparency $transparency)\n";
if (system $convert @cmd) {
die "Could not execute $convert: $!\n" if $? == -1;
die "@cmd died with signal " . ($? & 127) . ' with' .
($? & 128 ? '' : 'out') . ' coredump\n' if $? & 127;
die "@cmd exited with value " . ($? >> 8) . "\n" if $?;
}
}
I can also provide a patch, but it's a bit large (2.3M).
Yes, it does. It is intended to be run once and the resulting images committed. It edits the images to have the same transparency of the default textures in Minetest Game. Note that you will have to have ImageMagick installed and mogrify in $PATH.
The water and river water textures are completely opaque, which is annoying since it makes it so you can't see through water. This simple script fixes it (run in the
Hand Painted Pack by Drummyfish
directory):I can also provide a patch, but it's a bit large (2.3M).
Does this script acutally convert the PNG images? (edit the alpha channel)
Yes, it does. It is intended to be run once and the resulting images committed. It edits the images to have the same transparency of the default textures in Minetest Game. Note that you will have to have ImageMagick installed and
mogrify
in$PATH
.