Minetestmapper rewritten into C++

User avatar
AsgardBeast
New member
 
Posts: 4
Joined: Tue Jun 09, 2015 22:41
GitHub: AsgardBeast
IRC: AsgardBeast
In-game: AsgardBeast

Re: Minetestmapper rewritten into C++

by AsgardBeast » Wed Jun 10, 2015 01:40

Alright so I thought I would put these here for those that would like them. After searching for compiled executable for Linux I just decided to build my own. I hate having to build compiled code because of all the "dependencies" that must be installed that I will never use again. I figure there may be others who feel the same way. These were built on Debian 8.1 and may not work on all systems. It will just depend on your particular build. I have also written a script that should make compiling the executable a little easier for those who want the steps automated. Again this script was written on and for Debian based systems. I'm not sure how much use these will be to anyone but since I had them available I thought I would make the accessible to those that want to try them out.

The Build Script : http://minetest.elysianhome.net/files/b ... testmapper
This script should put the binaries in your home directory under a MineTestMapper folder. (assuming it works at all)

32Bit Systems : http://minetest.elysianhome.net/files/m ... x32.tar.gz
This package includes the binary, a tarball with the binary and docs, and a deb package.

64Bit Systems : http://minetest.elysianhome.net/files/m ... x64.tar.gz
This package includes the binary, a tarball with the binary and docs, and a deb package.
"If you wish to solve the mysteries of the universe. You must think in terms of energy, frequency, and vibration." - Nikola Tesla
 

Ivà
Member
 
Posts: 115
Joined: Sun Feb 22, 2015 07:11
GitHub: melzua
IRC: melzua
In-game: melzua

Re: Minetestmapper rewritten into C++

by Ivà » Wed Jun 10, 2015 08:08

Thankyou @AsgardBeast
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Minetestmapper rewritten into C++

by paramat » Sun Jun 21, 2015 03:08

When i run the following command or add any colour option the mapper fails and the error message below appears.

$ ./minetestmapper -i ~/minetestf/gitmods/minetest/worlds/m2/ -o ~/m2map.png --bgcolor #000000

./minetestmapper: option '--bgcolor' requires an argument
 

User avatar
AsgardBeast
New member
 
Posts: 4
Joined: Tue Jun 09, 2015 22:41
GitHub: AsgardBeast
IRC: AsgardBeast
In-game: AsgardBeast

Re: Minetestmapper rewritten into C++

by AsgardBeast » Sun Jun 21, 2015 04:05

paramat wrote:When i run the following command or add any colour option the mapper fails and the error message below appears.

$ ./minetestmapper -i ~/minetestf/gitmods/minetest/worlds/m2/ -o ~/m2map.png --bgcolor #000000

./minetestmapper: option '--bgcolor' requires an argument


Try this instead;

./minetestmapper -i ~/minetestf/gitmods/minetest/worlds/m2/ -o ~/m2map.png --bgcolor '#000000'

Hashtags on the command line don't work very well when left out in the open. Quote the #COLORS and you should be fine.
"If you wish to solve the mysteries of the universe. You must think in terms of energy, frequency, and vibration." - Nikola Tesla
 

paramat
Member
 
Posts: 2662
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat

Re: Minetestmapper rewritten into C++

by paramat » Sun Jun 21, 2015 06:28

Thanks it works now.
 

Argos
Member
 
Posts: 40
Joined: Tue Mar 04, 2014 21:47

Re: Minetestmapper rewritten into C++

by Argos » Tue Jun 30, 2015 16:20

A note to those who haven't seen it yet: @addi created a nice GUI for minetestmapper. See this page.
My mods & tools:
My fork of Minetestmapper - much improved - features, manual, Windows downloads
[MOD] Wrench (rotate:wrench) - improved screwdriver alternative - manual, download
 

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Re: Minetestmapper rewritten into C++

by Sergey » Fri Jan 13, 2017 15:26

I can't install minetestmapper from AUR: https://aur.archlinux.org/packages/minetestmapper-git/

I start the process with
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
yaourt -S minetestmapper-git


Then some dependencies are suggested to install from repo first: gperftools, libuv, snappy, cmake, gd, leveldb.

All of this seems to be installed correctly.

Then configuring of minetestmapper starts. And finishes like this:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
-- The CXX compiler identification is GNU 6.2.1
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- libgd library: /usr/lib64/libgd.so
-- libgd headers: /usr/include
-- zlib library: /usr/lib64/libz.so
-- zlib headers: /usr/include
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- sqlite3 library: /usr/lib64/libsqlite3.so
-- sqlite3 headers: /usr/include
-- Could NOT find PostgreSQL (missing:  PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR PostgreSQL_TYPE_INCLUDE_DIR)
-- PostgreSQL not found!
-- LevelDB library: /usr/lib64/libleveldb.so
-- LevelDB headers: /usr/include/leveldb
-- LevelDB backend enabled
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
POSTGRESQL_LIBRARY
    linked by target "minetestmapper" in directory /tmp/yaourt-tmp-sergey/aur-minetestmapper-git/src/minetestmapper

-- Configuring incomplete, errors occurred!
See also "/tmp/yaourt-tmp-sergey/aur-minetestmapper-git/src/minetestmapper/CMakeFiles/CMakeOutput.log".


Any ideas what is wrong?
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Minetestmapper rewritten into C++

by sfan5 » Sat Jan 14, 2017 14:36

Fixed that here: https://github.com/minetest/minetestmap ... ee1dcdf560

Also the PKGBUILD could use some updates, minetestmapper supports proper share paths and colors.txt no longer needs to be in current directory.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Re: Minetestmapper rewritten into C++

by Sergey » Sat Jan 14, 2017 16:24

Thank you very much! I just compiled the program.

But I still have one little question. I tried to test the example from wiki [http://wiki.minetest.net/Minetestmapper].

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetestmapper --geometry -10000:-10000+20000+20000 --drawscale -i ~/.minetest/worlds/my_world/ -o my_world.png


And the output is:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Warning: Falling back to using colors.txt from current directory.
Exception: Specified colors file could not be found

You just said there is no need for colors.txt file.
 

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Re: Minetestmapper rewritten into C++

by Sergey » Sat Jan 14, 2017 16:55

And the second question.

I, however, downloaded colors.txt file from the URL mentioned in wiki [http://wiki.minetest.net/Minetestmapper]. By the way, that URL is wrong. That URL is http://digitalaudioconcepts.com/vanessa/hobbies/minetest/colors.txt but correct is http://daconcepts.com/vanessa/hobbies/minetest/colors.txt

I put that colors.txt in folder, cd to it, launched the command above, and I got image with white gaps like in attached screenshot [http://imageup.ru/s2654441]

Why is that?
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Minetestmapper rewritten into C++

by sfan5 » Sun Jan 15, 2017 10:39

That's perfectly normal, the white gaps happen in places where the world was not generated yet.
Since the world is only generated when a player walks near the area this happens often.

Also there is a colors.txt that comes with minetestmapper, VanessaE's colors file is useful only if you have mods in your world.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Re: Minetestmapper rewritten into C++

by Sergey » Sun Jan 15, 2017 14:22

sfan5 wrote:That's perfectly normal, the white gaps happen in places where the world was not generated yet.
Since the world is only generated when a player walks near the area this happens often.

Also there is a colors.txt that comes with minetestmapper, VanessaE's colors file is useful only if you have mods in your world.

But as I said minetestmapper protests when there is no colors.txt in current directory.
Last edited by Sergey on Sun Jan 15, 2017 22:10, edited 1 time in total.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Minetestmapper rewritten into C++

by sfan5 » Sun Jan 15, 2017 19:53

Sergey wrote:
sfan5 wrote:That's perfectly normal, the white gaps happen in places where the world was not generated yet.
Since the world is only generated when a player walks near the area this happens often.

Also there is a colors.txt that comes with minetestmapper, VanessaE's colors file is useful only if you have mods in your world.

But as I said minetestmapper protests when there is no colors.txt in current dicrectory.

There should be a colors.txt that comes with minetestmapper as you can see here: https://github.com/minetest/minetestmap ... colors.txt
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
AsgardBeast
New member
 
Posts: 4
Joined: Tue Jun 09, 2015 22:41
GitHub: AsgardBeast
IRC: AsgardBeast
In-game: AsgardBeast

Re: Minetestmapper rewritten into C++

by AsgardBeast » Sun Jan 15, 2017 22:10

Sergey wrote:
sfan5 wrote:That's perfectly normal, the white gaps happen in places where the world was not generated yet.
Since the world is only generated when a player walks near the area this happens often.

Also there is a colors.txt that comes with minetestmapper, VanessaE's colors file is useful only if you have mods in your world.

But as I said minetestmapper protests when there is no colors.txt in current dicrectory.


The minetestmapper DOES need a colors.txt, it just doesn't require it to be in the same directory. You can use the
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
--colors /path/to/location/colors.txt

to tell it where the colors.txt is located.

As well the "white" sections of the map you created are "unexplored" territory. The original minetestmapper had these areas "black" in color but that was changed in the C++ build at some point to default to "white". If you want to change the color of the "unexplored" territory you can use the
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
--bgcolor '#000000'

to change it.
"If you wish to solve the mysteries of the universe. You must think in terms of energy, frequency, and vibration." - Nikola Tesla
 

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Re: Minetestmapper rewritten into C++

by Sergey » Sun Jan 15, 2017 22:58

OK. I created new directory, cd to it, launch the command
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
$ minetestmapper --geometry -100:-100+200+200 --drawscale --draworigin --drawalpha -i ~/.minetest/worlds/my_world/ -o my_world.png


Output:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Warning: Falling back to using colors.txt from current directory.
Exception: Specified colors file could not be found


How can you explain this?
 

User avatar
AsgardBeast
New member
 
Posts: 4
Joined: Tue Jun 09, 2015 22:41
GitHub: AsgardBeast
IRC: AsgardBeast
In-game: AsgardBeast

Re: Minetestmapper rewritten into C++

by AsgardBeast » Mon Jan 16, 2017 03:45

Sergey wrote:OK. I created new directory, cd to it, launch the command
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
$ minetestmapper --geometry -100:-100+200+200 --drawscale --draworigin --drawalpha -i ~/.minetest/worlds/my_world/ -o my_world.png


Output:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Warning: Falling back to using colors.txt from current directory.
Exception: Specified colors file could not be found


How can you explain this?


Was the minetestmapper executable AND the colors.txt file in the same directory you created and were in when you ran the minetestmapper executable located within THAT directory?

Just having the colors.txt file in the directory you are executing the minetestmapper command from doesn't tell minetestmapper WHERE the colors.txt file is located. Unless you specifically tell it otherwise, minetestmapper is going to fall back the located colors.txt file.

Here is an example;

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetestmapper --geometry -100:-100+200+200 --drawscale --draworigin --drawalpha -i ~/.minetest/worlds/my_world/ -o my_world.png --colors /location/of/your/colors.txt


If you do not know the location of your colors.txt file then find the one that should have come with the minetestmapper files that you downloaded or complied from.

It would appear from your previous posts that you have successfully created an image with the utility so I have to ask why this is even an issue?
"If you wish to solve the mysteries of the universe. You must think in terms of energy, frequency, and vibration." - Nikola Tesla
 

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Re: Minetestmapper rewritten into C++

by Sergey » Mon Jan 16, 2017 09:04

Of course, minetestmapper IS EXECUTABLE. We are talking about C++ program, not about python script (which may or may not be executable).

As I said, I created new directory. So, it is empty after creation. And therefore there is no colors.txt in it.

My actions (in order for you to understand):
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
$ mkdir dir1
$ cd dir1
$ minetestmapper --geometry -100:-100+200+200 --drawscale --draworigin --drawalpha -i ~/.minetest/worlds/my_world/ -o my_world.png

Warning: Falling back to using colors.txt from current directory.
Exception: Specified colors file could not be found


From what sfan5 said I understand that if there is no colors.txt in current directory and you don't specify path to it explicitly with --colors switch, then minetestmapper should use its own default colors.txt installed with it.

But it doesn't. That's the problem.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Minetestmapper rewritten into C++

by sfan5 » Mon Jan 16, 2017 15:01

How did you install minetestmapper and which version did you install?
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Re: Minetestmapper rewritten into C++

by Sergey » Mon Jan 16, 2017 17:38

sfan5 wrote:How did you install minetestmapper and which version did you install?


I installed minetestmapper from AUR [https://aur.archlinux.org/packages/minetestmapper-git/] this standard way.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
yaourt -S minetestmapper-git


That's it.

P.S. I have Manjaro Linux, it is ArchLinux based distro.
 

User avatar
taikedz
Member
 
Posts: 587
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake

Re: Minetestmapper rewritten into C++

by taikedz » Mon Jan 16, 2017 20:50

Sergey wrote:My actions (in order for you to understand):
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
$ mkdir dir1
$ cd dir1
$ minetestmapper --geometry -100:-100+200+200 --drawscale --draworigin --drawalpha -i ~/.minetest/worlds/my_world/ -o my_world.png

Warning: Falling back to using colors.txt from current directory.
Exception: Specified colors file could not be found



you did "mkdir dir1; cd dir1"

There is no colors.txt in that dir1. An executable "that uses files in the current/local directory" uses the current dir in which you run the command, not the data from the dir in which it resides.

You want to execute
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetestmapper --colors $PATH_TO_COLOURS_TXT <and the rest of your stuff>
 

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Re: Minetestmapper rewritten into C++

by Sergey » Mon Jan 16, 2017 21:10

taikedz wrote:you did "mkdir dir1; cd dir1"

There is no colors.txt in that dir1. An executable "that uses files in the current/local directory" uses the current dir in which you run the command, not the data from the dir in which it resides.

I know what current directory is. And I didn't confuse anything.

taikedz wrote:You want to execute
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetestmapper --colors $PATH_TO_COLOURS_TXT <and the rest of your stuff>

I just want not to deal with colors.txt at all if I don't want to paint my map in some special way.
minetestmapper should use its own default settings.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Minetestmapper rewritten into C++

by sfan5 » Wed Jan 18, 2017 15:40

Sergey wrote:
sfan5 wrote:How did you install minetestmapper and which version did you install?


I installed minetestmapper from AUR [https://aur.archlinux.org/packages/minetestmapper-git/] this standard way.

Unfortunately the AUR package installs minetestmapper incorrectly, please install it manually from source in the meantime.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Re: Minetestmapper rewritten into C++

by Sergey » Tue Jan 31, 2017 19:48

sfan5 wrote:
Sergey wrote:
sfan5 wrote:How did you install minetestmapper and which version did you install?


I installed minetestmapper from AUR [https://aur.archlinux.org/packages/minetestmapper-git/] this standard way.

Unfortunately the AUR package installs minetestmapper incorrectly, please install it manually from source in the meantime.

AUR package was corrected. Now it draws map without necessary colors.txt.

But it wasn't an upgrade. I had to uninstall program, clear package cache, and then install program again.
 

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Re: Minetestmapper rewritten into C++

by Sergey » Tue Jan 31, 2017 19:54

Now there are new problems with generating maps of newly generated worlds.

If I create new world (name: s1, mapgen: valleys), start (play) it, turn around without making any steps, exit it, and then launch in terminal minetestmapper, then I get that situation:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
$ minetestmapper --geometry -5000:-5000+10000+10000 --draworigin  -i ~/.minetest/worlds/s1/ -o s1.1.png
terminate called after throwing an instance of 'std::out_of_range'
  what():  sizecheck y
Аварийный останов (стек памяти сброшен на диск)
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

Re: Minetestmapper rewritten into C++

by sfan5 » Thu Feb 02, 2017 21:56

I can't reproduce this problem, however it should go away if you compile minetestmapper in Release mode.
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Sergey
Member
 
Posts: 362
Joined: Wed Jan 11, 2017 13:28

Re: Minetestmapper rewritten into C++

by Sergey » Fri Mar 17, 2017 21:48

I have reasonable questions about minetestmapper.

Does minetestmapper take into account floatlands?
What kind of maps minetestmapper generates in case of view from above?
Will view from above cover what is on the ground?
How to dintigiush projection of floatlands from what is on the ground?
 

twoelk
Member
 
Posts: 1092
Joined: Fri Apr 19, 2013 16:19

Re: Minetestmapper rewritten into C++

by twoelk » Sat Mar 18, 2017 14:15

Sergey wrote:I have reasonable questions about minetestmapper.

Does minetestmapper take into account floatlands?
What kind of maps minetestmapper generates in case of view from above?
Will view from above cover what is on the ground?
How to dintigiush projection of floatlands from what is on the ground?


quick answer:
1. yes
2. a view from above (as far above as air nodes have been generated)
3. yes
4. you cannot (at least not easily, you may want to try out hightmap options)

sollution:
you can tell the mapper where to begin mapping, left, right, front, back, up and down
README.rst wrote:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
min-y:
    Don't draw nodes below this y value, e.g. ``--min-y -25``

max-y:
    Don't draw nodes above this y value, e.g. ``--max-y 75``
 

Previous

Return to Minetest-Related

Who is online

Users browsing this forum: No registered users and 2 guests

cron