Minetestmapper rewritten into C++

wziard
Member
Posts: 127
Joined: Mon Oct 29, 2018 19:12

Re: Minetestmapper rewritten into C++

by wziard » Post

Sorry, it should be --zoom 4. And it does look a lot nicer with --zoom 4 than scaled with gimp afterwards, because the cubes get a bit bigger.

Oh and 99% of the praise should go to the original writers of minetestmapper for the clear code. I just bolted on some brute force isometric overdrawing :-)

papou30
Member
Posts: 11
Joined: Thu Oct 18, 2018 10:31
GitHub: papou30
In-game: papou30

Re: Minetestmapper rewritten into C++

by papou30 » Post

Hello, having tried all the geometries and always having the same result I come to ask for some help because this line always appears: "Exception: Image format not supported by gd" So what is this "gd"??

wziard
Member
Posts: 127
Joined: Mon Oct 29, 2018 19:12

Re: Minetestmapper rewritten into C++

by wziard » Post

papou30 wrote: "Exception: Image format not supported by gd" So what is this "gd"??

gd is the library minetestmapper uses to save images. You need to give a valid extension to the output filename.
For example -o out.png or -o out.jpg I think gd supports jpg, gif and png

papou30
Member
Posts: 11
Joined: Thu Oct 18, 2018 10:31
GitHub: papou30
In-game: papou30

Re: Minetestmapper rewritten into C++

by papou30 » Post

A thousand thanks so I can have some "isometric maps". You have done an incredible job. Congratulations and thank you again.

wziard
Member
Posts: 127
Joined: Mon Oct 29, 2018 19:12

Re: Minetestmapper rewritten into C++

by wziard » Post

papou30 wrote:A thousand thanks so I can have some "isometric maps". You have done an incredible job. Congratulations and thank you again.
Thanks for the praise :-). But as I said before, 99% of the work is done by sfan5, mireq, Shadowninja... So the largest part of the praise should go to them :-)

papou30
Member
Posts: 11
Joined: Thu Oct 18, 2018 10:31
GitHub: papou30
In-game: papou30

Re: Minetestmapper rewritten into C++

by papou30 » Post

Of course I associate sfan5, mireq, Shadowninja to these thanks.

User avatar
Gael de Sailly
Member
Posts: 845
Joined: Sun Jan 26, 2014 17:01
GitHub: gaelysam
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly gaelysam
Location: Voiron, France

Re: Minetestmapper rewritten into C++

by Gael de Sailly » Post

wziard: I don't manage to compile your iso branch, I get this huge ugly error (sorry if parts of it are in french).

Code: Select all

$ make -j2
[  9%] Building CXX object CMakeFiles/minetestmapper.dir/BlockDecoder.cpp.o
[ 18%] Building CXX object CMakeFiles/minetestmapper.dir/TileGenerator.cpp.o
In file included from /home/gael/Github/minetestmapper/BlockDecoder.cpp:7:0:
/home/gael/Github/minetestmapper/include/BlockDecoder.h:17:56: error: ‘>>’ should be ‘> >’ within a nested template argument list
  typedef std::vector<std::pair<std::string, std::string>> NodeMetaData;
                                                        ^
/home/gael/Github/minetestmapper/BlockDecoder.cpp: In member function ‘void BlockDecoder::decode(const ustring&)’:
/home/gael/Github/minetestmapper/BlockDecoder.cpp:208:30: error: ‘move’ is not a member of ‘std’
       m_metaData[position] = std::move(nmd);
                              ^
In file included from /home/gael/Github/minetestmapper/include/TileGenerator.h:18:0,
                 from /home/gael/Github/minetestmapper/TileGenerator.cpp:14:
/home/gael/Github/minetestmapper/include/BlockDecoder.h:17:56: error: ‘>>’ should be ‘> >’ within a nested template argument list
  typedef std::vector<std::pair<std::string, std::string>> NodeMetaData;
                                                        ^
CMakeFiles/minetestmapper.dir/build.make:62 : la recette pour la cible « CMakeFiles/minetestmapper.dir/BlockDecoder.cpp.o » a échouée
make[2]: *** [CMakeFiles/minetestmapper.dir/BlockDecoder.cpp.o] Erreur 1
make[2]: *** Attente des tâches non terminées....
In file included from /home/gael/Github/minetestmapper/TileGenerator.cpp:14:0:
/home/gael/Github/minetestmapper/include/TileGenerator.h: In member function ‘std::size_t Coords_hash::operator()(const Coords&) const’:
/home/gael/Github/minetestmapper/include/TileGenerator.h:64:16: error: ‘hash’ is not a member of ‘std’
         return std::hash<int>()((static_cast<int>(v.first) << 16) + static_cast<int>(v.second));
                ^
/home/gael/Github/minetestmapper/include/TileGenerator.h:64:26: error: expected primary-expression before ‘int’
         return std::hash<int>()((static_cast<int>(v.first) << 16) + static_cast<int>(v.second));
                          ^
/home/gael/Github/minetestmapper/include/TileGenerator.h:64:26: error: expected ‘;’ before ‘int’
/home/gael/Github/minetestmapper/include/TileGenerator.h:64:29: error: expected unqualified-id before ‘>’ token
         return std::hash<int>()((static_cast<int>(v.first) << 16) + static_cast<int>(v.second));
                             ^
/home/gael/Github/minetestmapper/TileGenerator.cpp: In member function ‘void TileGenerator::generate(const string&, const string&)’:
/home/gael/Github/minetestmapper/TileGenerator.cpp:404:35: error: no matching function for call to ‘std::basic_ofstream<char>::open(std::__cxx11::basic_ostringstream<char>::__string_type, const openmode&)’
    os.open(fn.str(), std::ios::out);
                                   ^
In file included from /home/gael/Github/minetestmapper/TileGenerator.cpp:4:0:
/usr/include/c++/5/fstream:799:7: note: candidate: void std::basic_ofstream<_CharT, _Traits>::open(const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std::ios_base::openmode = std::_Ios_Openmode]
       open(const char* __s,
       ^
/usr/include/c++/5/fstream:799:7: note:   no known conversion for argument 1 from ‘std::__cxx11::basic_ostringstream<char>::__string_type {aka std::__cxx11::basic_string<char>}’ to ‘const char*’
/home/gael/Github/minetestmapper/TileGenerator.cpp: In function ‘int IsoColoredCube(Image*, int, int, int, int, const Color&, int)’:
/home/gael/Github/minetestmapper/TileGenerator.cpp:1116:36: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11
   static double const brightness[] { 0.8, 0.6, 1.0 };
                                    ^
In file included from /usr/include/c++/5/set:60:0,
                 from /home/gael/Github/minetestmapper/TileGenerator.cpp:12:
/usr/include/c++/5/bits/stl_tree.h: In instantiation of ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::find(const _Key&) [with _Key = std::pair<short int, short int>; _Val = std::pair<short int, short int>; _KeyOfValue = std::_Identity<std::pair<short int, short int> >; _Compare = Coords_hash; _Alloc = std::allocator<std::pair<short int, short int> >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<std::pair<short int, short int> >]’:
/usr/include/c++/5/bits/stl_set.h:695:29:   required from ‘std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::find(const key_type&) [with _Key = std::pair<short int, short int>; _Compare = Coords_hash; _Alloc = std::allocator<std::pair<short int, short int> >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<std::pair<short int, short int> >; std::set<_Key, _Compare, _Alloc>::key_type = std::pair<short int, short int>]’
/home/gael/Github/minetestmapper/TileGenerator.cpp:1037:52:   required from here
/usr/include/c++/5/bits/stl_tree.h:2297:8: error: no match for call to ‘(Coords_hash) (const std::pair<short int, short int>&, const std::pair<short int, short int>&)’
        || _M_impl._M_key_compare(__k,
        ^
In file included from /home/gael/Github/minetestmapper/TileGenerator.cpp:14:0:
/home/gael/Github/minetestmapper/include/TileGenerator.h:63:24: note: candidate: std::size_t Coords_hash::operator()(const Coords&) const
     inline std::size_t operator()(const Coords &v) const {
                        ^
/home/gael/Github/minetestmapper/include/TileGenerator.h:63:24: note:   candidate expects 1 argument, 2 provided
In file included from /usr/include/c++/5/set:60:0,
                 from /home/gael/Github/minetestmapper/TileGenerator.cpp:12:
/usr/include/c++/5/bits/stl_tree.h: In instantiation of ‘std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_unique_pos(const key_type&) [with _Key = std::pair<short int, short int>; _Val = std::pair<short int, short int>; _KeyOfValue = std::_Identity<std::pair<short int, short int> >; _Compare = Coords_hash; _Alloc = std::allocator<std::pair<short int, short int> >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::key_type = std::pair<short int, short int>]’:
/usr/include/c++/5/bits/stl_tree.h:1863:28:   required from ‘std::pair<std::_Rb_tree_iterator<_Val>, bool> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_unique(const _Val&) [with _Key = std::pair<short int, short int>; _Val = std::pair<short int, short int>; _KeyOfValue = std::_Identity<std::pair<short int, short int> >; _Compare = Coords_hash; _Alloc = std::allocator<std::pair<short int, short int> >]’
/usr/include/c++/5/bits/stl_set.h:485:29:   required from ‘std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = std::pair<short int, short int>; _Compare = Coords_hash; _Alloc = std::allocator<std::pair<short int, short int> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree_const_iterator<std::pair<short int, short int> >; std::set<_Key, _Compare, _Alloc>::value_type = std::pair<short int, short int>]’
/home/gael/Github/minetestmapper/TileGenerator.cpp:371:76:   required from here
/usr/include/c++/5/bits/stl_tree.h:1810:11: error: no match for call to ‘(Coords_hash) (const key_type&, const std::pair<short int, short int>&)’
    __comp = _M_impl._M_key_compare(__k, _S_key(__x));
           ^
In file included from /home/gael/Github/minetestmapper/TileGenerator.cpp:14:0:
/home/gael/Github/minetestmapper/include/TileGenerator.h:63:24: note: candidate: std::size_t Coords_hash::operator()(const Coords&) const
     inline std::size_t operator()(const Coords &v) const {
                        ^
/home/gael/Github/minetestmapper/include/TileGenerator.h:63:24: note:   candidate expects 1 argument, 2 provided
In file included from /usr/include/c++/5/set:60:0,
                 from /home/gael/Github/minetestmapper/TileGenerator.cpp:12:
/usr/include/c++/5/bits/stl_tree.h:1821:7: error: no match for call to ‘(Coords_hash) (const std::pair<short int, short int>&, const key_type&)’
       if (_M_impl._M_key_compare(_S_key(__j._M_node), __k))
       ^
In file included from /home/gael/Github/minetestmapper/TileGenerator.cpp:14:0:
/home/gael/Github/minetestmapper/include/TileGenerator.h:63:24: note: candidate: std::size_t Coords_hash::operator()(const Coords&) const
     inline std::size_t operator()(const Coords &v) const {
                        ^
/home/gael/Github/minetestmapper/include/TileGenerator.h:63:24: note:   candidate expects 1 argument, 2 provided
In file included from /usr/include/c++/5/set:60:0,
                 from /home/gael/Github/minetestmapper/TileGenerator.cpp:12:
/usr/include/c++/5/bits/stl_tree.h: In instantiation of ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Base_ptr, std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Base_ptr, const _Val&, _NodeGen&) [with _NodeGen = std::_Rb_tree<std::pair<short int, short int>, std::pair<short int, short int>, std::_Identity<std::pair<short int, short int> >, Coords_hash, std::allocator<std::pair<short int, short int> > >::_Alloc_node; _Key = std::pair<short int, short int>; _Val = std::pair<short int, short int>; _KeyOfValue = std::_Identity<std::pair<short int, short int> >; _Compare = Coords_hash; _Alloc = std::allocator<std::pair<short int, short int> >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<std::pair<short int, short int> >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Base_ptr = std::_Rb_tree_node_base*]’:
/usr/include/c++/5/bits/stl_tree.h:1868:26:   required from ‘std::pair<std::_Rb_tree_iterator<_Val>, bool> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_unique(const _Val&) [with _Key = std::pair<short int, short int>; _Val = std::pair<short int, short int>; _KeyOfValue = std::_Identity<std::pair<short int, short int> >; _Compare = Coords_hash; _Alloc = std::allocator<std::pair<short int, short int> >]’
/usr/include/c++/5/bits/stl_set.h:485:29:   required from ‘std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(const value_type&) [with _Key = std::pair<short int, short int>; _Compare = Coords_hash; _Alloc = std::allocator<std::pair<short int, short int> >; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree_const_iterator<std::pair<short int, short int> >; std::set<_Key, _Compare, _Alloc>::value_type = std::pair<short int, short int>]’
/home/gael/Github/minetestmapper/TileGenerator.cpp:371:76:   required from here
/usr/include/c++/5/bits/stl_tree.h:1506:10: error: no match for call to ‘(Coords_hash) (const std::pair<short int, short int>&, const std::pair<short int, short int>&)’
          || _M_impl._M_key_compare(_KeyOfValue()(__v),
          ^
In file included from /home/gael/Github/minetestmapper/TileGenerator.cpp:14:0:
/home/gael/Github/minetestmapper/include/TileGenerator.h:63:24: note: candidate: std::size_t Coords_hash::operator()(const Coords&) const
     inline std::size_t operator()(const Coords &v) const {
                        ^
/home/gael/Github/minetestmapper/include/TileGenerator.h:63:24: note:   candidate expects 1 argument, 2 provided
In file included from /usr/include/c++/5/set:60:0,
                 from /home/gael/Github/minetestmapper/TileGenerator.cpp:12:
/usr/include/c++/5/bits/stl_tree.h: In instantiation of ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_lower_bound(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type, std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type, const _Key&) [with _Key = std::pair<short int, short int>; _Val = std::pair<short int, short int>; _KeyOfValue = std::_Identity<std::pair<short int, short int> >; _Compare = Coords_hash; _Alloc = std::allocator<std::pair<short int, short int> >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<std::pair<short int, short int> >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Link_type = std::_Rb_tree_node<std::pair<short int, short int> >*]’:
/usr/include/c++/5/bits/stl_tree.h:2295:36:   required from ‘std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::find(const _Key&) [with _Key = std::pair<short int, short int>; _Val = std::pair<short int, short int>; _KeyOfValue = std::_Identity<std::pair<short int, short int> >; _Compare = Coords_hash; _Alloc = std::allocator<std::pair<short int, short int> >; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<std::pair<short int, short int> >]’
/usr/include/c++/5/bits/stl_set.h:695:29:   required from ‘std::set<_Key, _Compare, _Alloc>::iterator std::set<_Key, _Compare, _Alloc>::find(const key_type&) [with _Key = std::pair<short int, short int>; _Compare = Coords_hash; _Alloc = std::allocator<std::pair<short int, short int> >; std::set<_Key, _Compare, _Alloc>::iterator = std::_Rb_tree_const_iterator<std::pair<short int, short int> >; std::set<_Key, _Compare, _Alloc>::key_type = std::pair<short int, short int>]’
/home/gael/Github/minetestmapper/TileGenerator.cpp:1037:52:   required from here
/usr/include/c++/5/bits/stl_tree.h:1628:6: error: no match for call to ‘(Coords_hash) (const std::pair<short int, short int>&, const std::pair<short int, short int>&)’
  if (!_M_impl._M_key_compare(_S_key(__x), __k))
      ^
In file included from /home/gael/Github/minetestmapper/TileGenerator.cpp:14:0:
/home/gael/Github/minetestmapper/include/TileGenerator.h:63:24: note: candidate: std::size_t Coords_hash::operator()(const Coords&) const
     inline std::size_t operator()(const Coords &v) const {
                        ^
/home/gael/Github/minetestmapper/include/TileGenerator.h:63:24: note:   candidate expects 1 argument, 2 provided
CMakeFiles/minetestmapper.dir/build.make:134 : la recette pour la cible « CMakeFiles/minetestmapper.dir/TileGenerator.cpp.o » a échouée
make[2]: *** [CMakeFiles/minetestmapper.dir/TileGenerator.cpp.o] Erreur 1
CMakeFiles/Makefile2:67 : la recette pour la cible « CMakeFiles/minetestmapper.dir/all » a échouée
make[1]: *** [CMakeFiles/minetestmapper.dir/all] Erreur 2
Makefile:149 : la recette pour la cible « all » a échouée
make: *** [all] Erreur 2
I would really like to use it, based on the screenshots it looks awesome!
Just realize how bored we would be if the world was perfect.

wziard
Member
Posts: 127
Joined: Mon Oct 29, 2018 19:12

Re: Minetestmapper rewritten into C++

by wziard » Post

Gael de Sailly wrote: /home/gael/Github/minetestmapper/include/BlockDecoder.h:17:56: error: ‘>>’ should be ‘> >’ within a nested template argument list
I'll look into it. What system do you try to compile on? My first guess would be an incompatible gcc version.

[edit] That was it. It should now compile with gcc v5 or higher (or lower, but I didn't test that).

wziard
Member
Posts: 127
Joined: Mon Oct 29, 2018 19:12

Re: Minetestmapper rewritten into C++

by wziard » Post

I added a flag to tune the height shading in isometric mode.

papou30
Member
Posts: 11
Joined: Thu Oct 18, 2018 10:31
GitHub: papou30
In-game: papou30

Re: Minetestmapper rewritten into C++

by papou30 » Post

Hello, Gaël I managed to compile from the folder extracted from the "zip" with the latest version of C++ on Ubuntu 18.04.1 LTS. Sorry for the screens but I can't insert the images in the forum, still a beginner despite my age.

User avatar
Gael de Sailly
Member
Posts: 845
Joined: Sun Jan 26, 2014 17:01
GitHub: gaelysam
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly gaelysam
Location: Voiron, France

Re: Minetestmapper rewritten into C++

by Gael de Sailly » Post

papou30 wrote:Hello, Gaël I managed to compile from the folder extracted from the "zip" with the latest version of C++ on Ubuntu 18.04.1 LTS.
Thank you, actually I had already solved my problem but forgotten to reply here :)
Just realize how bored we would be if the world was perfect.

User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

Re: Minetestmapper rewritten into C++

by Fixer » Post

Nice, isometric is very needed

lilo
Member
Posts: 54
Joined: Sat May 27, 2017 14:45

Re: Minetestmapper rewritten into C++

by lilo » Post

Hi,

i want to use this https://github.com/est31/leaftest to get an zoomable worldmap. This will need this minetestmapper. My question is, what git-repo is the best to do this? I found some forks an i am now a little bit confused what is the right version :)

I will use this on an Ubuntu 18.04 LTS Server, if that's important.

greets

User avatar
addi
Member
Posts: 666
Joined: Thu Sep 20, 2012 03:16
GitHub: adrido
Location: Black-Forest, Germany

Re: Minetestmapper rewritten into C++

by addi » Post

https://github.com/adrido/minetest-mapper-cpp is the continueed fork of the Rogier5 version

wziard
Member
Posts: 127
Joined: Mon Oct 29, 2018 19:12

Re: Minetestmapper rewritten into C++

by wziard » Post

My fork includes code to set up a leaflet map. This was my main reason to add the --tiled flag.

Use the iso branch from here:
https://github.com/wziard/minetestmapper/tree/iso

edit:<snip example script, I added it to the repository>

I put an example script to generate a leaflet map into the 'leafletmap' subdir.

p.s. it you want an *isometric* leaflet map you'll also need the mergeiso utility to merge the isometric diamond shaped tiles into square tiles as input for the buildpyramid utility.

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: Minetestmapper rewritten into C++

by ShadMOrdre » Post

wziard,

I downloaded your iso branch, mainly because I saw a script for generating colors.txt values. I'm using Python 2.7, and I keep getting an error about UTF-8 encoding? I don't know python, or bash, and am at a loss.

Shad

wziard
Member
Posts: 127
Joined: Mon Oct 29, 2018 19:12

Re: Minetestmapper rewritten into C++

by wziard » Post

The colors.txt script is not by me, it's from (original) minetestmapper. However, it worked fine on my system I think.

However I can try to help. What system are you using to run it on? And what are the exact errors? Maybe better to send me a PM because it's not really on topic here.

User avatar
rubenwardy
Moderator
Posts: 6969
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Minetestmapper rewritten into C++

by rubenwardy » Post

wziard wrote:p.s. it you want an *isometric* leaflet map you'll also need the mergeiso utility to merge the isometric diamond shaped tiles into square tiles as input for the buildpyramid utility.
Please may you give an example of this?

Edit: Also, the map that is produced by the generate leaflet script is blured when you zoom in, possibly due to JPEG. The nearest zoom should definitely use PNG
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

lilo
Member
Posts: 54
Joined: Sat May 27, 2017 14:45

Re: Minetestmapper rewritten into C++

by lilo » Post

Hi,

i test my minetestmapper compilation an i get some unkown node messages. What is to do?

Greets

EDIT: I found this this to auto create an Color.txt :)

wziard
Member
Posts: 127
Joined: Mon Oct 29, 2018 19:12

Re: Minetestmapper rewritten into C++

by wziard » Post

rubenwardy wrote: Please may you give an example of this?
I was trying to update my isometric map after my summer holiday, and I noticed I had forgotten how everything works myself. :-D

So clearly better documentation and helper scripts are needed.

I'll try to write up how it works after I've figured it out myself again :-)
Edit: Also, the map that is produced by the generate leaflet script is blurred when you zoom in, possibly due to JPEG. The nearest zoom should definitely use PNG
This probably has nothing to do with jpg vs png, but with zooming in further than level 0. At the default zoom level minetestmapper uses 1 pixel/block. If you zoom in so far that 1 block is more than 1 pixel on your screen your browser will start to interpolate between the pixels.

The solution is to use the --zoom option from minetestmapper to make the blocks somewhat larger. I tend to use '--zoom 4 '. This also leads to nicer isometric maps.

LordVlad
Member
Posts: 18
Joined: Wed Apr 26, 2017 02:22
In-game: LordVlad
Contact:

Re: Minetestmapper rewritten into C++

by LordVlad » Post

hello, i was trying to compile wziard fork and says:
/home/asdf/Desktop/minetest0.4.1.7.1/bin/BlockDecoder.cpp:34:13: error: no
member named 'runtime_error' in namespace 'std'
throw std::runtime_error(oss.str());
~~~~~^
/home/asdf/Desktop/minetest0.4.1.7.1/bin/BlockDecoder.cpp:47:13: error: no
member named 'runtime_error' in namespace 'std'
throw std::runtime_error(oss.str());
~~~~~^
2 errors generated.
make[2]: *** [CMakeFiles/minetestmapper.dir/BlockDecoder.cpp.o] Error 1
make[1]: *** [CMakeFiles/minetestmapper.dir/all] Error 2
make: *** [all] Error 2
i have gcc 4.4.8... can be that the error? i don't found anything.. please help :(

User avatar
T6C
Member
Posts: 119
Joined: Thu May 07, 2020 17:11
In-game: T6C

Re: Minetestmapper rewritten into C++

by T6C » Post

I clearly don't know what I'm doing. *facepalm* Can someone please help me understand what I've done wrong?

I tried to install and run cmake based on the instructions in the readme.
sudo apt install cmake libgd-dev libhiredis-dev libleveldb-dev libpq-dev libsqlite3-dev zlib1g-dev libzstd-dev

Then, I tried to compile the minetestmapper git directory I cloned using cmake . -DENABLE_LEVELDB=1. But, I get this error...

Code: Select all

-- The CXX compiler identification is unknown
-- Check for working CXX compiler: /usr/bin/cmake
-- Check for working CXX compiler: /usr/bin/cmake -- broken
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCXXCompiler.cmake:53 (message):
  The C++ compiler

    "/usr/bin/cmake"

  is not able to compile a simple test program.
  It fails with the following output:

    Change Dir: /home/ubuntu/minetestmapper/minetestmapper/CMakeFiles/CMakeTmp
    Run Build Command(s):/usr/bin/make cmTC_1b31b/fast && /usr/bin/make -f CMakeFiles/cmTC_1b31b.dir/build.make CMakeFiles/cmTC_1b31b.dir/build
    make[1]: Entering directory '/home/ubuntu/minetestmapper/minetestmapper/CMakeFiles/CMakeTmp'
    Building CXX object CMakeFiles/cmTC_1b31b.dir/testCXXCompiler.cxx.o
    /usr/bin/cmake     -o CMakeFiles/cmTC_1b31b.dir/testCXXCompiler.cxx.o -c /home/ubuntu/minetestmapper/minetestmapper/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
    CMake Error: The source directory "/home/ubuntu/minetestmapper/minetestmapper/CMakeFiles/CMakeTmp/-c" does not exist.
    Specify --help for usage, or press the help button on the CMake GUI.
    make[1]: *** [CMakeFiles/cmTC_1b31b.dir/build.make:66: CMakeFiles/cmTC_1b31b.dir/testCXXCompiler.cxx.o] Error 1
    make[1]: Leaving directory '/home/ubuntu/minetestmapper/minetestmapper/CMakeFiles/CMakeTmp'
    make: *** [Makefile:121: cmTC_1b31b/fast] Error 2

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)

-- Configuring incomplete, errors occurred!
See also "/home/ubuntu/minetestmapper/minetestmapper/CMakeFiles/CMakeOutput.log".
See also "/home/ubuntu/minetestmapper/minetestmapper/CMakeFiles/CMakeError.log".

Oblomov
Member
Posts: 17
Joined: Fri Oct 30, 2020 23:06
GitHub: Oblomov
IRC: Oblomov
In-game: Oblomov

Re: Minetestmapper rewritten into C++

by Oblomov » Post

Code: Select all

sudo apt install build-essentials g++

Pablo.R
Member
Posts: 42
Joined: Thu Mar 24, 2016 12:02
Location: Chile

Re: Minetestmapper rewritten into C++

by Pablo.R » Post

Hi, is there a way to only generate a portion of the map?

I see a pair of min-y / max-y parameter for the y coordinate, but can't find similar parameters for x and z coordinates.

I have a map with a few random emerged areas of near 500 by 500 nodes each and minetestmapper abort with an error because the total map size it want to generate is too big. After checking, the problem is not the map size (the DB file is less than 50MB) but that some of the emerged areas are too far away so there is a lot of not generated areas that minetestmapper needs to include in the PNG file.

User avatar
Blockhead
Member
Posts: 1602
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: Minetestmapper rewritten into C++

by Blockhead » Post

Pablo.R wrote:
Wed Nov 01, 2023 19:16
Hi, is there a way to only generate a portion of the map?

I see a pair of min-y / max-y parameter for the y coordinate, but can't find similar parameters for x and z coordinates.
From the --help output:

Code: Select all

  --geometry        x:y+w+h
You specify a minimum x and y (y in the output image matches z in the Minetest coordinate system) then a width and height. For instance I have this command line (bash) for rendering a specific city area from a world download:

Code: Select all

minetestmapper -i ~/.minetest/worlds/linuxforks -o banana_place_$(date --iso=d).png --colors mycolors.txt --geometry 512:8400+512+384 --min-y -100 --drawalpha
The bottom left corner is at x=512,z=8400 in the Minetest world and the width x height is 512x384. With some arithmetic, you can convert top right corner coordinates into width and height.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests