Commit Graph

54 Commits (master)

Author SHA1 Message Date
adrido 67485781a1 Recover the documentation 2018-12-28 07:26:14 +01:00
Rogier 7cfc0f9740 Small update to README.rst 2016-06-18 18:25:52 +02:00
adrido 8c911257ac Update documentation for MSVC build support 2016-05-31 21:44:34 +02:00
Rogier 919595c614 Add postgresql support
Supports both ShadowNinja's implementation:
  https://github.com/ShadowNinja/minetest/tree/PostgreSQL
and johnnyjoy's implementation:
  https://forum.minetest.net/viewtopic.php?f=3&t=12851
  4d537fe53a
2015-12-16 15:40:45 +01:00
Rogier 856d886241 Some fixes to the documentation 2015-11-26 17:43:39 +01:00
Rogier 047c2f4ec8 Documentation updates & Changelog updated 2015-03-10 13:30:34 +01:00
est31 d2c9d5e576 Fix README typo 2015-02-24 22:12:00 +01:00
Rogier 6e34a4ace1 Added build instructions to README again. 2015-02-20 19:15:25 +01:00
Rogier 4d1f9fe57b Restructured and improved the documentation.
Most of the content of README.rst was moved to a separate
user manual, and to a build manual.

The README was simplified to provide just the most important
information.

The user manual was extensively reworked, and beautified with images.
2015-02-20 13:10:09 +01:00
Rogier 3812e31fc9 Add options to generate a height map of the world.
--heightmap: generate the height map, in colors
--heightmap-grey: use shades of grey instead of colors
--sealevel <n>: define the sea level (below sea level is drawn in blue)
--heightmap-scale <f>: scale the heights by f (for the purpose of
  color selection)

When generating a heightmap, a special colors file is needed,
that defines just the blocks that should be considered part
of the ground. That means that normally, any plants, special
nodes and water should not be included.
2015-02-20 13:10:09 +01:00
Rogier 22041a8603 Add shorthand options to draw tiles matching map-blocks and map-chunks
The option --tiles has two new possible values: 'block' and 'chunk'
'block' creates tiles corresponding to map blocks
'chunk' creates tiles corresponding to map chunks
(chunks are the unit of map generation).

An option --chunksize was added to manually override the chunk size.
2015-02-20 13:10:08 +01:00
Rogier 743d657bef Improve the colors of water (esp. for --drawalpha) & make lava transparent.
As the best color for water depends on the rendering parameters
(i.e. the --drawalpha mode: none, average or cumulative), two
additional colors files are provided for these alternatives.
2014-06-19 13:31:53 +02:00
Rogier b99111e038 Add a --drawalpha mode that keeps water (etc.) transparent to great depths
This new mode averages the colors of all transparent blocks, instead of
making the colors progressively darker and more opaque.

This 'average' mode is now the default when using --drawalpha. It can be
explicitly selected using --drawalpha=average. The old modes can be selected
using --drawalpha=cumulative[-darken].

It is recommended to change the colors of water as well. These are in a
separate patch.
2014-06-19 13:30:00 +02:00
Rogier a065e68eac Make darkening of thick transparent stacks (e.g. deep water) configurable.
In order to reduce rendering surprises, this darkening is off by default
(it was on previously).
2014-06-18 21:19:14 +02:00
Rogier 3ffb1dfb33 Some small changes to README.rst 2014-06-18 11:44:24 +02:00
Rogier f832530bf8 Allow air nodes to have a color.
As this comes with a significant performance penalty, this
feature must be enabled using the command-line option --drawair

For best results, the color of air should be fully transparent,
so that underlying nodes will override it.
2014-06-18 10:07:55 +02:00
Rogier ced0390611 Add a default color for nodes
This is useful to show invisible ('air' or 'invalid') nodes in blocks
that are in the database using a different color than blocks that are
not in the database (which will have no color at all, causing the
background color to show).
2014-06-18 10:06:46 +02:00
Rogier 5b9d51daa1 Improve installation and package generation; add deb and rpm
Minetestmapper can now be installed into a proper directory hierarchy
(instead of all files being dumped into /usr/local/. for instance.)

Non-hierarchical installation (or creation of a non-hierarchical archive)
is also still supported, and remains the default, for backwards compatibility.

Packaging on windows remains unchanged, due to lack of infrastructure :-)
2014-06-18 10:03:20 +02:00
Rogier e6322f2911 Add an include directive for colors files
A colors file can now specify other colors files, from which
additional node color specifications will be read. This allows, for
instance, using system-installed colors file for most colors,
and only overriding some of its colors in a custom colors file.

As a purpose of using a custom colors file may be to leave the colors
for some nodes undefined, it is now also possible to undefine a
previously defined node color (i.e. after reading another colors file
which defines a color for the node).
2014-06-18 10:02:51 +02:00
Rogier 224c6b1df7 Add a command-line option to report which colors file is being used. 2014-06-18 09:50:41 +02:00
Rogier f6adec1bf9 Configure a better version number (partly or fully auto-computed) 2014-05-26 21:31:29 +02:00
Rogier 8d3117e8d3 Fixes to CMakeLists.txt
- Continue processing if libraries are not found (so that all missing
  libraries are reported)
- Set compiler flags correctly if CMAKE_BUILD_TYPE is not set (fixes bug #0)
- Make CMAKE_BUILD_TYPE=Release the default
- Increase optimisation level for Release
2014-05-26 21:31:29 +02:00
Rogier f3c25ac729 Fix and improve configuration of tiles location 2014-05-23 13:47:41 +02:00
Rogier 6071a76bf2 Document --verbose=2 in README.rst 2014-05-23 13:47:41 +02:00
Rogier 736e2a8d27 Add command-line options to draw geometrical figures on the map
Supported figures are points, lines, ellipses, rectangles
and text.

The figures' locations can be specified using either world
coordinates, or map coordinates.
2014-05-23 13:47:41 +02:00
Rogier c00cc13e6a Generalize the parsing of coordinates and geometry strings.
In preparation for future changes.

New geometry and new coordinate syntax has been added as well:

Additional node coordinate formats:
    <block>#[<node>]
    <block>.[<node>]

Additional geometry formats:
    <x1>,<y1>:<x2>,<y2>
    <x>,<y>:<w>x<h>

Also: the old geometry behavior (block granularity and map shrinking)
is now enabled only if the old geometry format is used (for compatibility)
2014-05-23 13:47:40 +02:00
Rogier 721fbfac52 Obtain database backend type from the world's world.mt file by default 2014-05-23 13:47:40 +02:00
Rogier 2fabf991ab Make sqlite backend optional (enabled by default) 2014-05-22 10:41:48 +02:00
Rogier d707b882e8 Add redis database backend (port of sfan5's patches)
Patches included/ported:
	2553e44e8dec75d99408b56f469ff4be61c84336
	79d338a90c1a99fce9334bea5d4c296f190373fc
2014-05-22 10:41:48 +02:00
Rogier 98fa76bb6b Minor statistics fix to leveldb backend
(And a minor edit to README.rst)
2014-05-22 10:41:48 +02:00
Rogier f36a8b61fb Allow colors with alpha to differ from colors without alpha
(using the same colors.txt file)
2014-05-22 10:41:47 +02:00
Rogier f60fd0a9aa Search world's minetest directory for colors file as well.
(which is assumed to be the directory two levels up from the
 world's directory, if it contains 'minetest.conf')
2014-05-22 10:41:12 +02:00
Rogier 65b37bec25 Allow player and origin colors to have an alpha component.
Values: 0: fully transparent, 255: fully opaque.

Note that this doesn't yield the expected color blending just
yet, due to libgd messing it up. (Seemingly, the libgd arc
drawing function draws some pixels repeatedly, resulting in a
more opaque circle than desired)
2014-05-22 10:41:12 +02:00
Rogier-5 efa067ab79 Fix README.rst to display correctly on github 2014-04-16 15:27:56 +02:00
Rogier e97e19921c Search more locations for the colors.txt file
The colors.txt file can now be located:
- in the directory of the world being mapped
- in the user's private minetest directory ($HOME/.minetest)
- in the current directory as a last resort

The location can also be specified using a command-line option
2014-04-16 15:13:09 +02:00
Rogier 6a26a8ef4b Make the geometry pixel-accurate instead of map-block accurate
When requesting, for instance, a 75x85 map, the mapper will
now create a 75x85 map, instead of an 80x96 (or even 96x108)
map as it did before.

This new behavior is the default when using one of the options
--centergeometry or --cornergeometry.

In addition, both of these options will no longer shrink the
map, to remove rows or columns of empty blocks at the edges.
Previously, this behavior was enabled with --forcegeometry.

An option --geometrymode has been added as well, to tune
the interpretation of the geometry. It supports 4 flags:

- pixel:  the requested geometry is interpreted with pixel
	  granularity. The map is not enlarged to include
	  entire map blocks.

- block:  the requested geometry is interpreted with block
	  granularity. The map is enlarged with at most 15
	  nodes at each of the four edges, so that it
	  includes entire map blocks only.

- fixed:  a map of the requested geometry is created (after
	  adjustmens for 'block' mode). Empty rows or
	  columns at the edges are not removed.

- shrink: Empty rows and columns at the map edges are
	  removed to generate the smallest picture possible.

Lastly, a new geometry syntax has been added, which is more
compatible with known syntax (i.e. X-Windows), and which
allows the offset to be optional. If the offset is omitted,
the picture defaults to be centered around 0,0.

`<width>x<height>[+|-<xoffset>+|-<yoffset>]`

For compatibility, the behavior of the option --geometry
was not changed. If (and only if) used before --geometrymode,
it enables block granularity and shrink.

The old option --forcegeometry is no longer documented,
but still recognised for compatibility.
2014-04-16 15:12:37 +02:00
Rogier ec7178dde3 Change --tileorigin to accept ',' as separator
The previous separator (':') still works, but is not advertised.
2014-04-16 10:57:21 +02:00
Rogier b7dc38d7fa Make README.rst look better on github 2014-04-14 16:39:13 +02:00
Rogier 683d9fe368 Remove superfluous '--' in README.rst 2014-04-10 12:30:03 +02:00
Sfan5 e96c23a8f7 Add alpha transparency ability for blocks 2014-04-09 11:03:54 +02:00
ShadowNinja dc10bd20b1 Remove embedding of colors.txt in executable 2014-04-09 10:49:46 +02:00
Rogier f18d5de26a Add the option to divide the map into tiles, rendered with a border in-between.
The net effect of making an image tiled, is that a grid is added
to the image, *without* obscuring part of the image with
grid lines: all pixel information is preserved. The lines
(aka borders) are added in-between the pixels of the image.
As a result, the image dimensions increase, and the image
may look slightly distorted. (a straight slanted line crossing
a tile border, will not look straight at the crossing).

Example:
Picture:
	[                                                  ]
	[ H   H  III     TTTTT  H   H  EEEEE  RRRR   EEEEE ]
	[ H   H   I        T    H   H  E      R   R  E     ]
	[ HHHHH   I        T    HHHHH  EEE    RRRR   EEE   ]
	[ H   H   I        T    H   H  E      R   R  E     ]
	[ H   H  III       T    H   H  EEEEE  R   R  EEEEE ]
	[                                                  ]
Same picture with 10x5 tiles:
	[          |          |          |          |          ]
	[ H   H  II|I     TTTT|T  H   H  |EEEEE  RRR|R   EEEEE ]
	[ H   H   I|        T |   H   H  |E      R  | R  E     ]
	[ HHHHH   I|        T |   HHHHH  |EEE    RRR|R   EEE   ]
	[ H   H   I|        T |   H   H  |E      R  | R  E     ]
	[----------|----------|----------|----------|----------]
	[ H   H  II|I       T |   H   H  |EEEEE  R  | R  EEEEE ]
	[          |          |          |          |          ]
2014-04-08 04:40:09 +02:00
Rogier 1f997e788f Fix itemized list in README file (should display correctly on github now) 2014-03-26 08:56:33 +01:00
Rogier 10e6a746cd Database performance tweaks
Added the option to bulk load and cache entire world rows at
a time when using sqlite. Caching is implemented in the
database class this time around.
Enabled using --sqlite-cacheworldrow on the command line.

This is essentially re-introduces the database access strategy
that was used originally, but as an option.

Currently, one block is read at a time from the database.
The original behavior was to read and cache one entire world
row at a time, irrespective of whether or not only a (small)
subsection of the world was being mapped.
Under some circumstances, in particular if the entire world is
mapped or a relatively large percentage of it (blocks-wise), the
bulk loading and caching may outperform the one-by-one strategy,
even though it usually loads many more blocks than are actually
needed.

It seems that leveldb won't benefit from any kind of caching or
bulk loading of blocks, so none was implemented.

Leveldb does compile now. Still not tested on a database :-(

Improved the database statistics (printed with --verbose).
2014-03-26 00:23:33 +01:00
Rogier 4ca967d40d Add new options to README, and include some extra example cmake commands 2014-03-26 00:21:31 +01:00
Sfan5 2e848b9d8e Clarify where you can get xxd 2014-03-14 22:49:00 +01:00
Sfan5 393d7e2ac0 LevelDB support 2014-03-05 21:42:21 +01:00
Sfan5 15444ff8f6 Add --min-y and --max-y options 2014-03-05 18:06:05 +01:00
ShadowNinja 7d81fc3b11 Update README 2013-08-14 15:44:03 -04:00
Miroslav Bendík 7d15dbf4ed Added --geometry support. 2012-11-24 19:25:13 +01:00