[Mod] Real Terrain [0.1.0] [realterrain]

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

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

by bobomb » Sat Oct 31, 2015 19:20

0.0.5 pushed to github. many new features and recently incorporated the development of raster analysis functions formerly part of my GIS mod: viewtopic.php?f=9&t=12928
 

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

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

by bobomb » Sun Nov 15, 2015 03:27

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

a recent branch of the mod that uses Lunatic-Python to run python inside lua... nothing major but something python users might be interested in for mod-making...
 

Fixerol
Member
 
Posts: 633
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer

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

by Fixerol » Sun Nov 29, 2015 01:02

I'm very excited about this mod, it will be cool to play minetest on real world terrain. I myself made a map of Ukraine for OpenTTD from some of the DEM files... (greyscale ones). Is it possible to make this mod as separate program too?
 

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

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

by bobomb » Sun Nov 29, 2015 01:25

this mod is only a mod to minetest and in fact requires some configuration of external libraries which can be a challenge. please watch the video I have prepared to see how it works. you will need to install imagemagick and magickwand and have mod security disabled. https://www.youtube.com/watch?v=66pehrH6Bh0
Last edited by bobomb on Sun Nov 29, 2015 02:07, edited 1 time in total.
 

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

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

by bobomb » Sun Nov 29, 2015 02:06

for those asking for trees, and to see the biome editor results:

Image

Image

Image
 

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

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

by bobomb » Tue Dec 01, 2015 04:21

introducing image overlay and band overlay mode which allows you to map a color image onto an elevation map or even map separate bands as red green and blue onto an elevation map (this allows for the display of false-color landsat7 and other satellite imagery)

Image

the color output is limited to 216 "web-safe" colors at this time
 

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

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

by bobomb » Sat Dec 12, 2015 04:21

use realterrain as a mandelbrot exporer or a polynomial explorer:

Image

Image
 

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

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

by bobomb » Sat Dec 12, 2015 04:44

also there is now a default mode that requires no libraries and uses 8-bit color BMP files (only the red channel is used where grayscale rasters are expected such as for elevation and biomes, but color is used for color overlays -- unlike more advanced modes which can handle grayscale images with only one channel, this bmp mode crashes on grayscale images, but at least those wishing to test the system out without installing any libraries now have a way to use this feature-rich mod)
 

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

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

by bobomb » Sun Dec 20, 2015 04:52

some new features: supports graphicsmagick in CLI or Lua lib mode (this is the best lib to use actually). Automatic bit-depth detection implemented wherever possible. Command-line ImageMagick and GraphicsMagick mode added so that no lua libraries are required (for RGB BMPs and imperfectly for grayscale TIFs, and for very small PNGs), improvements to scaling, surface-only modes, surface detection, and distance options implemented.

Image

anyone familiar with the tiff format could contribute by getting the native tiff processor working... or anyone that knows of pure lua libraries that handle various image formats. image libraries that handle 16 bit pixel values, and lua libraries that grant access to individual pixels and pixel groups without loading the entire image into memory are needed.
 

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.9] [realterrain]

by Gael de Sailly » Mon Dec 21, 2015 09:55

I've downloaded a tile from SRTM Data Search (tile #38-03) and finally managed to get it working with realterrain. I use the magick processor.
Scale: 1/93 horizontal and 1/40 vertical.
Some screenshots with their real location:

The Vosges in FranceImage

Lac d'Annecy in the Alps (please imagine the water)Image

Chamonix and the Mont BlancImage
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 :)
 

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

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

by twoelk » Mon Dec 21, 2015 19:44

wow
Heh nice to see pics of places I know :-)

I once was caught in a massive thunderstorm on the shores of Lac d'Annecy and travelled the at some places rather dramatic approach to the Mont Blanc Tunnel near Chamonix many a times.

So, do the valleys of the Ardeche and Verdon look as impressive at this scale as they do in reallity?

edit: oops, guess they are too far south
 

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.9] [realterrain]

by Gael de Sailly » Mon Dec 21, 2015 22:53

twoelk wrote:So, do the valleys of the Ardeche and Verdon look as impressive at this scale as they do in reallity?

edit: oops, guess they are too far south

Yes, that's in the tile below, but I have also tried this one and found the Verdon. The SRTM data aren't accurate enough to generate correctly the canyon (maybe the radar used by SRTM can't scan the depths of the gorges).

That may be better to change the scale to have 40-50 real meters per block, but realterrain can't draw it properly because the position is rounded to the nearest pixel instead of calculating the weighted average of the 4 nearest pixels.
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.9] [realterrain]

by bobomb » Tue Dec 22, 2015 00:50

smoothing when scaling may be in a future release. what is the horizontal resolution of the SRTM original?

creating a cover file that sets the lake surface to pixel value to 55 should be relatively easy. roads to pixel value 15 might be nice to show where the highway runs. how old is your version of realterrain?
 

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.9] [realterrain]

by Gael de Sailly » Tue Dec 22, 2015 09:32

bobomb wrote:smoothing when scaling may be in a future release. what is the horizontal resolution of the SRTM original?

There is 6000 px for 5°, for latitude and longitude.
1 px = 93 m (latitude)
For the longitude, it's distorted on high latitudes, so it's 93 m at the equator and 61 m at 49°N.
simply 93×cos(lat)

The Verdon Canyon
Image
Image
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
emperor_genshin
Member
 
Posts: 32
Joined: Tue Dec 22, 2015 05:04
IRC: Emperor_Genshin
In-game: Emperor_Genshin - Genshin

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

by emperor_genshin » Tue Dec 22, 2015 12:07

+1 This is indeed interesting, great job bobomb :)
Minetest Modder
Server Wanderer

Signature
"I have no words that would do justice to the atrocities you commit to the English language, as well as your continued assaults on the concepts of basic literacy and logical reasoning."

_Tom Gioconda
 

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

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

by twoelk » Tue Dec 22, 2015 23:06

Gael de Sailly wrote:...
The Verdon Canyon
... some pics ...

hmm looking at the pics makes me wonder why I spent two days crossing them tiny hills of a few blocks hight from the coast via Draguignan to the Verdon Canyon on bicycle. A tour of really spectactuIar sights I will never forget. Just as the endless fighting the mistral as I followed the Durance to Avignon.

Actually recreating the Artuby bridge in minetest might be fun - or the stone arc in the Ardeche valley. Hmm might need some painted blocks for the Chauvet cave though ;-P
Last edited by twoelk on Wed Dec 23, 2015 00:54, edited 2 times in total.
 

User avatar
jp
Member
 
Posts: 705
Joined: Wed Dec 18, 2013 09:03
GitHub: kilbith

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

by jp » Tue Dec 22, 2015 23:59

twoelk wrote:Just as the endless fighting the mistral as I followed the Durance to Avignon.

Haha, I'm glad to see someone is knowning such details of my region, I didn't expect that here. I often walk along the Luberon, and I fighted a lot with the mistral in bicycle as well. If you return some day in this corner, I'd be glad to meet another Minetester ;)
 

Fixerol
Member
 
Posts: 633
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer

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

by Fixerol » Wed Dec 23, 2015 00:14

Nice! How big are those (in nodes)?
 

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.9] [realterrain]

by Gael de Sailly » Tue Feb 09, 2016 13:41

I can't load the libraries.
Native processor works.
+ Logs

The libraries works on my other computer: I use the magick processor. Both with Ubuntu 14.04, Minetest 0.4.13-dev.

Including libraries this way is very unclean. Libs should be provided by MT's core itself. The core uses an image manipulation library, it may be possible to allow Lua accessing these functions.
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.9] [realterrain]

by bobomb » Fri Mar 04, 2016 18:09

yes it would change a lot of things for the better to not have to include any libraries for basic pixel-level access to images... including full 16 bit support and all common filetypes. i have discussed this in the irc but there is not much interest in including it in core.
 

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.9] [realterrain]

by Gael de Sailly » Fri Mar 04, 2016 18:28

That's especially for the image library. The core uses an image library. It could simply (I know that technically, it may not be that simple) provide the functions to the Lua interface, no need to add another library to the core.
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.9] [realterrain]

by bobomb » Sat Mar 05, 2016 04:33

yes that's what I mean. should we ask the core developers to include pixel-access to images as a lua method?
 

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.9] [realterrain]

by Gael de Sailly » Sat Mar 05, 2016 08:25

I've sent a pull request to realterrain some weeks ago : PR 97.

For the image library, yes we should ask the devs. That's the moment : they're very active and make very good things these days. We should open an issue on minetest/minetest.
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
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.9] [realterrain]

by Gael de Sailly » Sun Mar 06, 2016 12:11

I have another idea:

making a separate python script that converts the image into raw data that Lua can easily use. Run the script before starting Minetest.
With this method, the raw data can even been split up into many different tiles, each of them matching a… maybe 200x200 pixels, hugely reducing the amount of used RAM (unload a tile when it has not been used during 5 consecutive chunk generations for example). We can even use zlib compression, performed by python, and decompressed by the Minetest API:
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.decompress(data)


I mean, in brief, what has been done for the Moon Mapgen mod by arpruss.
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.9] [realterrain]

by bobomb » Sun Mar 06, 2016 18:41

there are issues with most of the image processor modes under windows, but if you had imagemagick working in the past then changing the MAGICK_AS_CONVERT = false on init.lua line 40 should get you working again.
 

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

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

by bobomb » Mon Mar 07, 2016 22:53

as for image functions in core, this is the answer (no):

viewtopic.php?f=7&t=14164
 

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

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

by bobomb » Mon Mar 14, 2016 17:36

actually celeron55 says yes: viewtopic.php?f=7&t=14164#p210309

anybody want to take a crack at it?
 

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

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

by bobomb » Tue Mar 15, 2016 17:56

Gael de Sailly wrote:I have another idea:

making a separate python script that converts the image into raw data that Lua can easily use. Run the script before starting Minetest.
With this method, the raw data can even been split up into many different tiles, each of them matching a… maybe 200x200 pixels, hugely reducing the amount of used RAM (unload a tile when it has not been used during 5 consecutive chunk generations for example). We can even use zlib compression, performed by python, and decompressed by the Minetest API:
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.decompress(data)


I mean, in brief, what has been done for the Moon Mapgen mod by arpruss.


I have considered this approach but am not, personally, interested in it. The current method, with most of the (working) libraries does not load the entire image into memory anyway (the native png processor lifted from imageloader mod is an exception and crashes on even mid-sized images -- lua image libraries that load the entire image into memory were not considered for this mod. the imagemagick and graphicsmagic libs read the entire file and create a disk cache of it but at least do not load it into memory).
Mainly though I don't want to create any temp files because many of the source files of DEMs are huge and because I want them to be usable without any extra processing steps, otherwise we might as well convert DEM formats to ESRI's GRID (text-based) format. However, I envision a tiling system for version 0.2.0 of the mod which would allow any kind of tiles to be used, whether they be multiple contiguous tiles from a DEM set or from a python script as you say.
the mod already performs "caching" of sorts and only looks up pixels for map chunk "footprints" once in a vertical column -- it knows when a sky or sub-surface chunk is being rendered and does no pixel lookups...
I also experimented with cropping the image into smaller images for efficiency (not 200x200 but mapchunk size of 80x80 and multiples thereof) but with large source DEMs (which are the ones we'd want to do this with) re-opening the source file for cropping took several seconds each time. certain processors actually do this out of necessity. gm and convert for example -- which then translate the image into and parse a text pixel enumeration, which isn't working in windows...)
I think the best way forward is to use core's image handling functions to create lua methods that will open an image and get pixel values. anyone willing to help with this task please jump in ASAP. we could eliminate all outside libraries, command line (python) calls, and remove the mod security settings for this mod, making it much more portable and easy to use by a wider audience.
 

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.1.0] [realterrain]

by Gael de Sailly » Sat Mar 19, 2016 17:11

I've made a script that produces a rivermap from a DEM heightmap. Might be useful in the future.

It's here: rivermapper on GitHub.

Requires python3 and Wand library 0.4.2
Works only for 16-bit depth image for now.

RAM taken: ~ 20 Mo per million pixels, around 700 Mo for 6001*6001 SRTM tiles.
Speed: on my computer, it took 7 minutes to generate the rivers for this 6001*6001 SRTM tile.

Edit: Wand library version, and optimization.
Last edited by Gael de Sailly on Mon Mar 28, 2016 11:02, edited 2 times in total.
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
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.1.0] [realterrain]

by Gael de Sailly » Mon Mar 21, 2016 20:04

Sorry, I forgot to say that the code is only working for wand library 0.4.2.
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 :)
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 11 guests

cron