[Mod] Real Terrain [0.1.0] [realterrain]

bobomb
Member
 
Posts: 101
Joined: Sat May 23, 2015 20:28
GitHub: bobombolo
IRC: bobomb

[Mod] Real Terrain [0.1.0] [realterrain]

by bobomb » Mon Jun 22, 2015 07:40

Use an image as a heightmap, use another image as a biome map, edit map settings and even biomes in-game, overlay river and road layers, do raster analysis. Effectively this is a WorldPainter mod. You can use spatial files for elevation and landcover or you can paint your own using any paint program. You can also persist structures using in-game tools.

use a grayscale image as a heightmap:
Image

use in-game settings tool (r,g,b color band overlay shown in background)

Image

configure biome interpretation in-game:
Image

results:
Image

perform on-the-fly raster analysis such as slope and aspect:
Image

overlay an image onto the map (here a grayscale version of the same image is used as the heightmap) in 216 colors:
Image

dependencies: requires mod security disabled, for more specific and advanced features an image library will be required, see below...

download latest zip: https://github.com/bobombolo/realterrain/archive/master.zip
github: https://github.com/bobombolo/realterrain
youtube tutorial: https://www.youtube.com/watch?v=66pehrH6Bh0

license: original content is WTFPL

includes several lua libraries including: magick, imagesize, imlib2, graphicsmagick, lua-socket, lunatic-python (not all are used). ImageMagick is the most tested library for this mod, and until recently was a requirement. GraphicksMagick is recommended for speed and automatic bit-depth detection and handling of strange GIS rasters.

thanks to paramat for the skeletal mapgen mod code: https://gist.github.com/paramat/389ee65ce9378d9dad25
Last edited by bobomb on Wed Mar 16, 2016 00:48, edited 20 times in total.
 

User avatar
TG-MyinaWD
Member
 
Posts: 355
Joined: Thu May 08, 2014 21:22
GitHub: Maddie-Myina
IRC: Maddie-Myina
In-game: .

Re: [Mod] Real Terrain [0.0.1] [realterrain]

by TG-MyinaWD » Mon Jun 22, 2015 16:22

Oh my that is crazy.
Very nicely done to.
Might be interesting to see on an server.
I'm a Transgender no shame about it.
I prefer to be considered as a "Girl/Lady/Miss/Madam/Female" for now on.
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: [Mod] Real Terrain [0.0.1] [realterrain]

by Krock » Mon Jun 22, 2015 16:29

Whoa, that's a great mod!
It would be interesting to generate ores and trees automatically to make it look even better.

I looked at the source code and just want to point out, the chunk/mapblock size is not fixed to 80x80x80 nodes, use "local sidelen" instead.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

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

Re: [Mod] Real Terrain [0.0.1] [realterrain]

by paramat » Mon Jun 22, 2015 21:09

Krock, I wrote the basic code assuming a large image or heightmap would be pre-prepared by splitting into 80x80 arrays, although that's not how it currently works.
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun

Re: [Mod] Real Terrain [0.0.1] [realterrain]

by Minetestforfun » Wed Jun 24, 2015 12:22

Awesome 0_o !
 

User avatar
cd2
Member
 
Posts: 552
Joined: Mon Jun 01, 2015 06:30
GitHub: cdqwertz
IRC: freenode - cd2 InchraNet - cd
In-game: cd cd2

Re: [Mod] Real Terrain [0.0.1] [realterrain]

by cd2 » Wed Jun 24, 2015 16:13

looks great :D
 

User avatar
Gael de Sailly
Member
 
Posts: 475
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

Re: [Mod] Real Terrain [0.0.1] [realterrain]

by Gael de Sailly » Sat Jun 27, 2015 09:40

How can I get this kind of tiff images for a given region ?
I would like to have a Minetest world that represents the Vosges region (in France, between Nancy and Mulhouse).
Very busy this year too, so do not expect me to be very active on the forum or in game. But I'm not about to drop Minetest forever :)
 

Diamond knight
Member
 
Posts: 262
Joined: Sun Apr 19, 2015 19:50
In-game: Diamondknight or diamond_knight

Re: [Mod] Real Terrain [0.0.1] [realterrain]

by Diamond knight » Sat Jun 27, 2015 14:44

this will tottaly be in ultimatetest (viewtopic.php?f=50&t=11901) when it is done
I can never get enough MESE!!!!!!!!!

my subgame: https://forum.minetest.net/viewtopic.php?f=50&t=11901
 

bobomb
Member
 
Posts: 101
Joined: Sat May 23, 2015 20:28
GitHub: bobombolo
IRC: bobomb

Re: [Mod] Real Terrain [0.0.1] [realterrain]

by bobomb » Sun Jun 28, 2015 16:39

Gael de Sailly wrote:How can I get this kind of tiff images for a given region ?
I would like to have a Minetest world that represents the Vosges region (in France, between Nancy and Mulhouse).

look for a Digital Elevation Model of your region in GeoTIFF format, then just take it into photoshop and reduce the color mode to 8 bit, save as TIFF with no compression.

here is a low resolution dem of most of europe, however it has been colorised and the pallete would need to be restored to a grey scale http://www.eea.europa.eu/data-and-maps/data/digital-elevation-model-of-europe

anyway most countries have websites for obtaining this data, here is a site that might help, i can't get the map interface to work but maybe it will for you: https://www.ngdc.noaa.gov/dem/squareCellGrid/map?theme=DDP

finally try this software (there is a tutorial) http://www.usna.edu/Users/oceano/pguth/website/microdem/microdem.htm
 

User avatar
Gael de Sailly
Member
 
Posts: 475
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

Re: [Mod] Real Terrain [0.0.1] [realterrain]

by Gael de Sailly » Mon Aug 03, 2015 21:56

I've found how to proceed, with free softwares (I have not Photoshop) :
  1. Download the maps from SRTM Data Search
  2. Open the map with ImageMagick
  3. Go to "Enhance ~> Brightness" and set it to 200. You will need to do it several times (at least 3 times) until the map is light enough (or else it will be too flat).
  4. Save the image
  5. Open it with GIMP. It will convert it into 8-bits image. You can "stick" several images and select the desired zone.
  6. The map is distorted by the projection. You can correct this problem by changing the length of the image. Resize the length to old_length × cos average_latitude (take your calculator). Not needed if you're close to the equator or if you don't expect a good precision.
  7. Save it into .tif image without compression, even lossless !

So after this adventure I've finally got my map of the Vosges. But I haven't found how to use it :/
Very busy this year too, so do not expect me to be very active on the forum or in game. But I'm not about to drop Minetest forever :)
 

User avatar
ExeterDad
Member
 
Posts: 1121
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad

Re: [Mod] Real Terrain [0.0.1] [realterrain]

by ExeterDad » Tue Aug 04, 2015 01:23

Gael de Sailly would you please post both images (before and after) so we can get a idea what we need to achieve if we were to make one of our own?
٩(̾●̮̮̃̾•̃̾)۶

Kibbie and I have a beautiful public server now! HOMETOWN
 

User avatar
Gael de Sailly
Member
 
Posts: 475
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

Re: [Mod] Real Terrain [0.0.1] [realterrain]

by Gael de Sailly » Tue Aug 04, 2015 12:20

I've tried to upload it, but they're too large (36 MB).
Very busy this year too, so do not expect me to be very active on the forum or in game. But I'm not about to drop Minetest forever :)
 

User avatar
ExeterDad
Member
 
Posts: 1121
Joined: Sun Jun 01, 2014 20:00
In-game: ExeterDad

Re: [Mod] Real Terrain [0.0.1] [realterrain]

by ExeterDad » Wed Aug 05, 2015 00:39

Gael de Sailly wrote:I've tried to upload it, but they're too large (36 MB).

Wow! Okay! Disregard that request.
Thanks anyway :)
٩(̾●̮̮̃̾•̃̾)۶

Kibbie and I have a beautiful public server now! HOMETOWN
 

bobomb
Member
 
Posts: 101
Joined: Sat May 23, 2015 20:28
GitHub: bobombolo
IRC: bobomb

Re: [Mod] Real Terrain [0.0.1] [realterrain]

by bobomb » Mon Aug 24, 2015 16:36

imageloader mod now has a pure lua png library that I am working on integrating, this should allow for 16 bit images... as well as png and bmp support also lifted from imageloader.
 

Ryster
New member
 
Posts: 4
Joined: Thu Sep 10, 2015 18:08

Re: [Mod] Real Terrain [0.0.1] [realterrain]

by Ryster » Thu Sep 10, 2015 19:05

bobomb wrote:imageloader mod now has a pure lua png library that I am working on integrating, this should allow for 16 bit images... as well as png and bmp support also lifted from imageloader.


very nice!

please let us know when you have 16bit support, so I can gen maps higher than 256 :)
 

bobomb
Member
 
Posts: 101
Joined: Sat May 23, 2015 20:28
GitHub: bobombolo
IRC: bobomb

Re: [Mod] Real Terrain [0.0.1] [realterrain]

by bobomb » Wed Oct 14, 2015 20:45

https://trac.osgeo.org/gdal/wiki/GdalOgrInLua

using gdal we can stop worrying about image formats and use proper GIS raster formats complete with spatial metadata such as projection, real world extent, pixel scale, elevation scale, etc.
 

User avatar
Splizard
Member
 
Posts: 220
Joined: Wed Jan 25, 2012 07:20
GitHub: Splizard
IRC: Splizard
In-game: Splizard

Re: [Mod] Real Terrain [0.0.1] [realterrain]

by Splizard » Sat Oct 17, 2015 03:09

Trying to get this to work, really nice mod here, but I get an error.. (latest git minetest)
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
minetest/mods/realterrain/init.lua:125: attempt to index a nil value
--This line is not working.
return demtiff:read(1):byte() - 32, covertiff:read(1):byte()
Games: The Hungry Games.
Mods: Lifters (Simple Lifts), Snow Biomes and Gates.
Also checkout my texture pack Gridtoon!
View all of them plus more at http://minetest.splizard.com! (may not always be online).
 

bobomb
Member
 
Posts: 101
Joined: Sat May 23, 2015 20:28
GitHub: bobombolo
IRC: bobomb

Re: [Mod] Real Terrain [0.0.1] [realterrain]

by bobomb » Sat Oct 17, 2015 15:55

maybe your cover.tif is not present? there should be one in the dem folder, if you don't want to use cover replace that line with

return demtiff:read(1):byte() - 32, 0

this mod is under heavy development right now so there will be improvements to the "cover" system
 

bobomb
Member
 
Posts: 101
Joined: Sat May 23, 2015 20:28
GitHub: bobombolo
IRC: bobomb

Re: [Mod] Real Terrain [0.0.1] [realterrain]

by bobomb » Mon Oct 19, 2015 22:46

this mod is now moving towards using external libraries to enable the use of any image file format including 16-bit color depths. that means that mod security has to be disabled for this mod in minetest.conf and you must have luarocks installed as well as the lua-imlib2 library.

next steps in development will include better land cover, and an in-mod menu system for tweaking scale settings and reloading the map (which will destructively reset the map.sqlite file). Now that the mod has access to external lua libraries, I will also begin experimenting with downloading DEM tiles and/or other data directly from the internet using luasocket.

Image

16 bit tiff used
Last edited by bobomb on Tue Oct 20, 2015 03:43, edited 1 time in total.
 

User avatar
Don
Member
 
Posts: 1641
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: [Mod] Real Terrain [0.0.1] [realterrain]

by Don » Mon Oct 19, 2015 23:39

That is awesome. I can't imagine the maps this could make.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

User avatar
MineYoshi
Member
 
Posts: 4267
Joined: Wed Jul 08, 2015 13:20
GitHub: MineYosh
IRC: MineYoshi
In-game: Kirby_Retro

Re: [Mod] Real Terrain [0.0.1] [realterrain]

by MineYoshi » Tue Oct 20, 2015 00:40

Looks good and is good is awesome than can make maps
People talk about freedom of speech, so i'll say that God exists.
Open your eyes!! See The big unicorn conspiracy.!! :D The government has been lying to us about unicorns!!
"I've learned there are three things you don't discuss with people: religion, politics and the Great Pumpkin" - Linus Van Pelt
I'm the Officially 1st ABJist in the world ( ͡° ͜ʖ ͡°)
 

bobomb
Member
 
Posts: 101
Joined: Sat May 23, 2015 20:28
GitHub: bobombolo
IRC: bobomb

Re: [Mod] Real Terrain [0.0.2] [realterrain]

by bobomb » Tue Oct 20, 2015 19:16

Image

working on strata as discussed in the original thread:
 

bobomb
Member
 
Posts: 101
Joined: Sat May 23, 2015 20:28
GitHub: bobombolo
IRC: bobomb

Re: [Mod] Real Terrain [0.0.2] [realterrain]

by bobomb » Tue Oct 20, 2015 22:29

biome, water and road "painting"

Image

Image
this branch has switched to using luarocks magick library (from imlib2) for true 16-bit support

https://github.com/bobombolo/realterrain/tree/sixteen
 

User avatar
Gael de Sailly
Member
 
Posts: 475
Joined: Sun Jan 26, 2014 17:01
GitHub: Gael-de-Sailly
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly

Re: [Mod] Real Terrain [0.0.2] [realterrain]

by Gael de Sailly » Thu Oct 22, 2015 12:39

How could I install luarocks imlib2 ?
Very busy this year too, so do not expect me to be very active on the forum or in game. But I'm not about to drop Minetest forever :)
 

bobomb
Member
 
Posts: 101
Joined: Sat May 23, 2015 20:28
GitHub: bobombolo
IRC: bobomb

Re: [Mod] Real Terrain [0.0.2] [realterrain]

by bobomb » Fri Oct 23, 2015 03:08

install imlib2
install luarocks
then
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
luarocks install lua-imlib2
 

bobomb
Member
 
Posts: 101
Joined: Sat May 23, 2015 20:28
GitHub: bobombolo
IRC: bobomb

Re: [Mod] Real Terrain [0.0.2] [realterrain]

by bobomb » Fri Oct 23, 2015 03:14

Since the luarocks magick package is now fixed (there was a path issue) I am switching the master branch to the magick version, one library is as tricky as another...
 

bobomb
Member
 
Posts: 101
Joined: Sat May 23, 2015 20:28
GitHub: bobombolo
IRC: bobomb

Re: [Mod] Real Terrain [0.0.4] [realterrain]

by bobomb » Sun Oct 25, 2015 05:12

luafilesystem is also a dependency now (for now)
 

bobomb
Member
 
Posts: 101
Joined: Sat May 23, 2015 20:28
GitHub: bobombolo
IRC: bobomb

Re: [Mod] Real Terrain [0.0.4] [realterrain]

by bobomb » Sun Oct 25, 2015 19:42

"trees" branch

Image
 

bobomb
Member
 
Posts: 101
Joined: Sat May 23, 2015 20:28
GitHub: bobombolo
IRC: bobomb

Re: [Mod] Real Terrain [0.0.4] [realterrain]

by bobomb » Sun Oct 25, 2015 21:07

trees merged into master branch:

Image

Image
 

User avatar
Splizard
Member
 
Posts: 220
Joined: Wed Jan 25, 2012 07:20
GitHub: Splizard
IRC: Splizard
In-game: Splizard

Re: [Mod] Real Terrain [0.0.4] [realterrain]

by Splizard » Mon Oct 26, 2015 23:47

Looking great! looks like Minetest will become the new Google Earth :D
Games: The Hungry Games.
Mods: Lifters (Simple Lifts), Snow Biomes and Gates.
Also checkout my texture pack Gridtoon!
View all of them plus more at http://minetest.splizard.com! (may not always be online).
 

Next

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 12 guests

cron