Rogier-5 / minetest-mapper-cpp

Generates maps of minetest and freeminer worlds
Other
9 stars 4 forks source link

--drawalpha does not generate correct results #6

Closed VanessaE closed 8 years ago

VanessaE commented 8 years ago

Here's what upstream minetestmapper does:

image

Whereas your fork results in this:

image

The second image is a screenshot taken from a Leaftest-generated interactive map page, which can be found here: http://digitalaudioconcepts.com/vanessa/hobbies/minetest/worldmaps/FreeForAll_World/map.html . For easier comparison, both images have been cropped to the same world position and image dimensions, down to the pixel.

The colors.txt file used to generate these images is here:

http://digitalaudioconcepts.com/vanessa/hobbies/minetest/colors.txt

Rogier-5 commented 8 years ago

My version of minetestmapper uses a different drawalpha algorithm by default. Your map should look more similar to the one from upstream minetestmapper when using --drawalpha=cumulative.

The difference is that using upstream minetestmapper, water will become opaque after a certain depth (iirc, beyond a depth of 10 there will no longer be much transparency left). In my version, using plain --drawalpha (same as --drawalpha=average), the first opaque node always shines through the stack of transparent nodes above it. Any under-water builds are therefore always visible.

Note: when using --drawalpha, I recommend using darker water colors, in particular when using the 'average' algorithm. See drawalpha. In case you're not aware: a way to achieve this while keeping the existing colors file as is, is to create a new (empty) colors file, add a line @include /path/to/colors.txt, and after it, add lines redefining just the water colors. See colors common syntax. Also note that my version of minetestmapper accepts different (distinct) colors for opaque and non-opaque water in the same colors file, see colors.txt syntax.

VanessaE commented 8 years ago

Ah, cumulative mode is indeed what I was looking for. Thanks!

Note to self: read the documentation more thoroughly. :smile: