gaelysam / geo-mapgen

Minetest mod and Python script to generate a Minetest world from a GeoTIFF image
GNU Lesser General Public License v2.1
23 stars 4 forks source link

more getting started steps #6

Open donpdonp opened 6 years ago

donpdonp commented 6 years ago

I've got the app and the DEM tiff file and it runs to completion but the map inside minetest does not change. Could you give more step by step procedures? Here's what I'm doing

  1. start minetest and make a new world (called ozark) and exit minetest.
  2. run image_convert.py and select the world/ozark folder
  3. fill out the settings and hit process

"Generating database Adding heightmap Writing file Done." all looks good but when I go back in minetest and load the ozark world, the world is exactly the same as when it was generated in step 1. I'm not sure if image_convert is suppost to be run earlier in the process, or how to do that. thanks.

gaelysam commented 6 years ago

You should start Minetest but not play the world, only create it (the world directory must be present but the map shouldn't be initialized).

donpdonp commented 6 years ago

okay i tried that, used Create map button which goes back to the main menu and exited minetest.

I can use the tool to generate heightmap.dat and .conf, but getting back in the game still shows the identical map, which i believe is coming from the 'key' field and a v7 map and ignoring the geotiff data all together. (using minetest 5.0.0dev)

gaelysam commented 6 years ago

Yes is uses the 'singlenode' mapgen, but I thought my mod was automatically setting the mapgen to singlenode… will check it out.

donpdonp commented 6 years ago

So this is the source tif, which looks good.

$ gdalinfo -mm GRID1.tif
Driver: GTiff/GeoTIFF
Files: GRID1.tif
Size is 10812, 10812
Coordinate System is:
GEOGCS["NAD83",
    DATUM["North_American_Datum_1983",
        SPHEROID["GRS 1980",6378137,298.2572221010042,
            AUTHORITY["EPSG","7019"]],
        TOWGS84[0,0,0,0,0,0,0],
        AUTHORITY["EPSG","6269"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4269"]]
Origin = (-123.000555554894390,46.000555555195604)
Pixel Size = (0.000092592592526,-0.000092592592526)
Metadata:
  AREA_OR_POINT=Area
  DataType=Elevation
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (-123.0005556,  46.0005556) (123d 0' 2.00"W, 46d 0' 2.00"N)
Lower Left  (-123.0005556,  44.9994444) (123d 0' 2.00"W, 44d59'58.00"N)
Upper Right (-121.9994444,  46.0005556) (121d59'58.00"W, 46d 0' 2.00"N)
Lower Right (-121.9994444,  44.9994444) (121d59'58.00"W, 44d59'58.00"N)
Center      (-122.5000000,  45.5000000) (122d30' 0.00"W, 45d30' 0.00"N)
Band 1 Block=10812x1 Type=Float32, ColorInterp=Gray
    Computed Min/Max=0.000,1614.499
  NoData Value=-3.4028234663852886e+38

in the tool I can set Crop Image to N 45.6 S 45.5 W -122.6 E -122.5. Calculate Size reports 1081x1081

I make a new world folder in minetest using map type singlenode, then exit minetest

$ ls -l nw13
total 8
-rw-r--r-- 1 donp donp 783 Sep 15 19:39 map_meta.txt
-rw-r--r-- 1 donp donp 104 Sep 15 19:39 world.mt

I push Proceed (no land cover or rivers, default tilesize 80, verical scale 40)

the heightmap shows up.

$ ls -l nw13
total 28
-rw-r--r-- 1 donp donp 13686 Sep 15 19:40 heightmap.dat
-rw-r--r-- 1 donp donp    11 Sep 15 19:40 heightmap.dat.conf
-rw-r--r-- 1 donp donp   783 Sep 15 19:39 map_meta.txt
-rw-r--r-- 1 donp donp   104 Sep 15 19:39 world.mt

I load minetest and start that world. I end up in an empty map and go into free-fall. Any ideas?

gaelysam commented 6 years ago

Did you enable geo-mapgen in the Minetest world? This sounds a bit stupid but it's something I easily forget when I'm using this mod, it's the only reason I see now to end up with an empty world.

I will be offline for the 5 next days.

donpdonp commented 6 years ago

I do not have that enabled - I dont even know how to make that option available! Are there steps for enabling this option?

donpdonp commented 6 years ago

I figured a mod was not necessary if the tool created a map already. Now I see the whole repo is supposed to be checked out in the mods/ folder. I redid the steps and I am seeing some kind of land though its a small patch of completely flat land. It lets me experiment some more, though. thanks!

donpdonp commented 5 years ago

I wrote a getting-start blog post that I hope is helpful to new comers. It still needs work, and pictures. Its available at https://donp.org/blog/2018/11/02/lidar-data-to-voxel-maps

gaelysam commented 5 years ago

That's awesome! Thank you! Could I reuse parts of your text in my readme?

donpdonp commented 5 years ago

absolutely. and thanks for making this mod.