[mod]mg_earth (Lua Mapgen)

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

[mod]mg_earth (Lua Mapgen)

by ShadMOrdre » Post

mg_earth.

Licensed under LGPL v2.1
Author: Shad MOrdre aka Steven Merchant.
Copyright: Sept. 2022

Forum Topic: viewtopic.php?f=9&t=27374
Github: https://github.com/ShadMOrdre/mg_earth
ContentDB: https://content.minetest.net/packages/S ... /mg_earth/


Credits for code: Gael de Sailley, paramat, Termos, Sokomine, demon_boy, duane, dokimi, Pyrollo, burli
Credits for textures: paramat
License for textures: CC BY-SA 3.0


mg_earth is a lua based mapgen. Features are listed below:

v2d_noise mapgen is a simple single 2d noise terrain generator.
v3d_noise mapgen is a simple single 3d noise terrain generator.
v3D mapgen is based on paramats' LVM_Example. Determines "density" from single 3d noise.
v5 mapgen. (Currently non functional. Only produces flat terrain.)
v6 mapgen with builtin biome, ore, and decoration support.
v7 mapgen without mountains, ridges, floatlands, and altering the "base terrain" noise to use the same seed as the "alt terrain" noise.
vCarpathian mapgen in both 2d and 3d variants.
vDiamondSquare mapgen uses the "diamond-square" algorythm to generate terrain. Akin to standard noise. Must use a fixed size.
vEarth mapgen uses voronoi cells to define continents, rivers, and mountains.
vEarthSimple mapgen is a simplified vEarth, removing rivers code and not altering noise based terrain additives.
vIslands mapgen is a modified version of Termos' Islands mapgen, eliminiating that mods mountains in favor of terrain based on modified v7.
vLargeIslands mapgen is the same as vIslands, except uses larger scale and spread values.
vNatural mapgen is a simplified vEarth mapgen, using Carpathian and Islands code to generate continental terrain.
vAltNatural mapgen is the same as above, but generates run Carpathian code before Cliffs code.
vValleys mapgen in both 2d and 3d variants. Uses Gael de Sailleys' Valleys mapgen

vBuiltin mapgen adds ability to use all engine based mapgens.
vSinglenode mapgen adds ability to use other lua based mapgens that create a 2d indexed heightmap, compatible with the voxelmanip heightmap object.

All of the above listed 2d mapgens are additive, and can be enabled simultaneously. The above 3d mapgens can only be used by themselves. The 3D mapgens are:
(v3d_noise, v3D, v5, and vCarpathian and vValleys when the 3d option is enabled.)

Additional mapgens included are: (These are available via the heightmap select option. vFlat is a 2d mapgen, while all others below are 3D)

vFlat mapgen sets the entire heightmap to the settings value.
vCubes mapgen creates a chunk sized cube determined by distance to random point within chunk. (Chebyshev distance creates squared/cubed voronoi cells.)
vDiamonds mapgen creates a chunk sized diamond determined by distance to random point within chunk. (Manhattan distance creates angled/diamond voronoi cells.)
vSpheres mapgen creates a chunk sized sphere determined by distance to random point within chunk. (Euclidean distance creates round/spheroid voronoi cells.)
vTubes mapgen creates an interlocking tube network per chunk. Tube shape is determined by distance metric.
vVoronoiCell mapgen creates unique 3D voronoi cells per chunk. Cell shape and appearance are determined by distance metric.
vPlanetoids mapgen creates random spheres throughout the map, based on 2D voronoi.
vPlanets mapgen creates random spheres throughout the map, based on 3D voronoi.
vSolarSystem mapgen creates a "scaled" model of the Solar System. Planet sizes are to scale with each other, and distances are to scale. Based on 3D voronoi.

Additional settings enable the following: (These affects can be applied simultaneously.)

enable_v6_scalar uses heat / humidity values to determine strength of v6 terrain. Higher heat and lower humidity, or low heat and high humidity increase the strength.
enable_carpathia allows other mapgens to use the mountain building code of vCarpathia, in a scaled down form.
enable_cliffs allows other mapgens to use the cliff building code of vIslands.

heat_scalar applies a real world heat model to the map. Hot equator, cold poles.
humidity_scalar applies a real world humidity model to the map. Should mimic the patterns associated with ocean based weather.

enable_boulders creates voronoi shaped boulders, rocks, mesas, and icebergs.

enable_rivers allows rivers on vValleys and vEarth mapgens. Non functional for all other mapgens.
enable_lakes allows use of code from Sokomines' lake mod.

enable_caves carves caves below the surface.
enable_caverns carves large caverns deeper.

enable_cities draw city like grid of streets randomly on map. Based on paramats' NoiseGrid mod. Can use path, road, or street logic.
enable_paths draws a dirt or gravel path at a set interval across the map.
enable_roads draws a cobblestone road at a set interval across the map. Based on paramats' pathv7 mod.
enable_streets draws a modern street at a set interval across the map. Based on paramats' roadv7 mod.

Each of the above may have addition settings, such as cave size, grid size, or width.


The following settings are used across all mapgens.

mg_world_scale allows the user to scale the generated map. This can be used to "see" an entire world map. Can be scaled from 10 times, down to 0.01.
mg_base_height sets the maximum height used by voronoi based mapgens.
sea_level set the sea level. Should be same as map_meta value, but this is internal, and can be scaled.

seed sets the mapgen seed. This affects the builtin mapgen, so if using with an engine based mapgen, this overrides the seed value in map_meta.

voronoi_distance selects which distance metric will be used. Choose between Chebyshev, Euclidean, Manhattan, or (Chebyshev + Manhattan / 2)

voronoi_points_file selects which file to use to load voronoi points. Currently hard coded, but should read from folder.
voronoi_neighbors_suffix determines the suffix to apply to generated Voronoi Cell Neighbors file.


Additional settings allow the user to define noise values for all available mapgens.


mg_earth is compatible with aotearoa, australia, darkages, default, ethereal, gal, naturalbiomes, underch, and valleys_c.

If gal is active, mg_earth can create gal ecosystems alongside existing biome mods. Also, if gal is active, then that mod determines world scale, base height, and sea level.

Features of mg_earth include a voxelmanip compatible heightmap, biomemap, citymap, riversmap, path, road, and streets maps, and provides generic information about the currently
generated chunk. Chat commands to emerge and load areas, and an active hud that gives heat and humidity values, based on actual values. These are interpreted to mean Farenheit.


Current issues are v5 mapgen and vEarth rivers.

Understanding that terrain affects the roads and streets, so if there are breaks or disconnects, it is most likely very jaggy or extreme terrain.



This is still an actively developed project, and while released and fully functional, there may still be bug fixes, other changes or feature additions.


Image

Image

Image

Image

Image

Image
Attachments
screenshot_20211013_140110.jpg
screenshot_20211013_140110.jpg (250.64 KiB) Viewed 4212 times
screenshot_20211010_191949.jpg
screenshot_20211010_191949.jpg (273.01 KiB) Viewed 4212 times
screenshot_20211010_183603.jpg
screenshot_20211010_183603.jpg (359.62 KiB) Viewed 4212 times
Last edited by ShadMOrdre on Thu Nov 03, 2022 00:50, edited 4 times in total.

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [mod]mg_earth (Lua Mapgen)

by Krock » Post

After long await it's finally here! This is truly an unique mapgen. Would it be possible to expose some per-world configuration so that the generated terrain could be customized? For example the world scale, mountain/hill scaling factor, cave threshold.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

Re: [mod]mg_earth (Lua Mapgen)

by ShadMOrdre » Post

@Krock,

Thanks for your kind words. Yes, the next update will include exposing the adjustable settings, as well as, some documentation.

I had previously attempted to understand the new minetest.Settings object, and still need to figure that part out, so that the mapgen settings can be properly revealed to the menu and the user.

For the moment, I have turned my attention to my biomes/ecosystems mod, newly renamed to gal. My older GAL (Game Abstraction Layer) project is a game, and has thusly been renamed, while the new gal (geographic abstraction layer) is a mod. I am currently focused on getting it posted to github as well, since this mapgen can use it's features.

I do hope to entice Gael de Sailley to consider this as a base for natural river generation, since the edges of voronoi cells on this mapgen create "valleys" and drainage basins.

Shad

User avatar
TumeniNodes
Member
Posts: 2941
Joined: Fri Feb 26, 2016 19:49
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes
Location: in the dark recesses of the mind
Contact:

Re: [mod]mg_earth (Lua Mapgen)

by TumeniNodes » Post

Definitely keeping an eye on this
A Wonderful World

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

Re: [mod]mg_earth (Lua Mapgen)

by ShadMOrdre » Post

I've posted an update that allows for custom voronoi point sets, and added some basic comments to the settings.

As for allowing user based settings via the menu, for now, I'd like to keep the settings as they are. Some are very sensitive, and some may not have user value or be user friendly. Others are looking a little more necessary set as they now are.

If there are specific settings you want to play with, let me know, and I can provide more in depth details.

Shad

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

Re: [mod]mg_earth (Lua Mapgen)

by ShadMOrdre » Post

I've posted yet another quick update, that disables this mapgen if not set to singlenode, and sets the map seed specifically to '16096304901732432682'.

I am still figuring out which settings to expose, besides the world scale, which is settable by my gal mod. That kinda complicates the issue, as biomes, ecosystems, decos, and ores are all affected by the scaling.

Shad

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

Re: [mod]mg_earth (Lua Mapgen)

by ShadMOrdre » Post

I've posted another update to this mapgen.

This update includes the following changes:

Mountains are rugged instead of sloped pyramid like peaks.
Ecosystems are available if using my gal mod.

I've enabled rivers, as ugly as they appear, for the sake of consistency into the future.

In my opinion, the only further development would be to more properly generate rivers, limit noise terrain based on proximity to cell center, and better math (in general).

Please post any issues, suggestions, or other comments.

Shad

Image

Image
Attachments
screenshot_20211022_183525.jpg
screenshot_20211022_183525.jpg (247.04 KiB) Viewed 4212 times
screenshot_20211022_131035.jpg
screenshot_20211022_131035.jpg (430.59 KiB) Viewed 4212 times

User avatar
Eris
Member
Posts: 175
Joined: Thu Nov 19, 2020 23:12
IRC: definitelya Ovalo
In-game: Eris_still_crafts

Re: [mod]mg_earth (Lua Mapgen)

by Eris » Post

Loading mg_earth in addition to gal mod generates all world decorations with light level 0, most of the time, until the blocks are updated manually: they are black.
Awesome mapgen!
Jump in the caac

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

Re: [mod]mg_earth (Lua Mapgen)

by ShadMOrdre » Post

Eris,

I cannot find a place in the code that could be causing this.

Can you provide a screenshot showing the issue, and a screenshot showing which mods are loaded, using the /mods chat command.

If nothing comes up in debug.txt, there isn't much to go on.

My own rig is an i5 with 8GB ram and 2GB nvidia graphics.

Shad

User avatar
Eris
Member
Posts: 175
Joined: Thu Nov 19, 2020 23:12
IRC: definitelya Ovalo
In-game: Eris_still_crafts

Re: [mod]mg_earth (Lua Mapgen)

by Eris » Post

Shad,
it looks like one of the many pull requests to the engine, merged on the 31th, fixed this.
I didn't notice as I only now generated a new world and had already set up a base.
Thanks for trying to help regardless.
Jump in the caac

User avatar
Eris
Member
Posts: 175
Joined: Thu Nov 19, 2020 23:12
IRC: definitelya Ovalo
In-game: Eris_still_crafts

Re: [mod]mg_earth (Lua Mapgen)

by Eris » Post

The mod seems to fail silently, even when used alone, after the same changes on October 31th.

Code: Select all

2021-11-09 19:10:11: [Main]: [MOD] test:  Loading...
2021-11-09 19:10:11: [Main]: [MOD] mg_earth:  Version:0.1.0
2021-11-09 19:10:11: [Main]: [MOD] mg_earth:  Legal Info: Copyright 2021 ShadMOrdre.
2021-11-09 19:10:11: [Main]: [MOD] mg_earth:  License: LGLv2.1
2021-11-09 19:10:11: ACTION[Main]: World at [/home/PRIVATE/Minetest/current/bin/../worlds/galeone]
2021-11-09 19:10:11: ACTION[Main]: Server for gameid="minetest" listening on 0.0.0.0:61119.
2021-11-09 19:10:13: ACTION[Server]: singleplayer [127.0.0.1] joins game. List of players: singleplayer
Jump in the caac

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

Re: [mod]mg_earth (Lua Mapgen)

by ShadMOrdre » Post

Eris,

Thanks again for reporting this.

I have uploaded a new update to github. Please let me know if you experience any issues.

Update includes:
Menu enabled settings.
New mapgen options.

I'll update the main post.

Valleys 2d mapgen.
Image

Spheres mapgen. Can also be diamond or cube.
Image

3D mapgen, with 2d heightmap and biomes.
Image
Attachments
screenshot_20211107_204452.jpg
screenshot_20211107_204452.jpg (370.02 KiB) Viewed 4212 times
screenshot_20211107_201306.jpg
screenshot_20211107_201306.jpg (149.7 KiB) Viewed 4212 times
screenshot_20211107_162523.jpg
screenshot_20211107_162523.jpg (210.87 KiB) Viewed 4212 times

User avatar
Eris
Member
Posts: 175
Joined: Thu Nov 19, 2020 23:12
IRC: definitelya Ovalo
In-game: Eris_still_crafts

Re: [mod]mg_earth (Lua Mapgen)

by Eris » Post

Great work Shad! Glad I can help.
Jump in the caac

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

Re: [mod]mg_earth (Lua Mapgen)

by ShadMOrdre » Post

Another brief update that adds a riverless valleys noise, along with v7 and v6 noises to the vEarth generator. This really makes mountains look better.

User avatar
Eris
Member
Posts: 175
Joined: Thu Nov 19, 2020 23:12
IRC: definitelya Ovalo
In-game: Eris_still_crafts

Re: [mod]mg_earth (Lua Mapgen)

by Eris » Post

Noooo I want to try this so bad, but it fails loading again!
It happens in 5.4.1 and 5.5.0-dev.
Spoiler
2021-11-12 21:10:48: [Main]: [MOD] test: Loading...
2021-11-12 21:10:48: [Main]: [MOD] mg_earth: Version:0.1.0
2021-11-12 21:10:48: [Main]: [MOD] mg_earth: Legal Info: Copyright 2021 ShadMOrdre.
2021-11-12 21:10:48: [Main]: [MOD] mg_earth: License: LGLv2.1
2021-11-12 21:10:48: ACTION[Main]: World at [/home/PRIVATE/Minetest/current/bin/../worlds/testingmgearth]
2021-11-12 21:10:48: ACTION[Main]: Server for gameid="minetest" listening on 0.0.0.0:55228.
2021-11-12 21:10:50: ACTION[Server]: singleplayer [127.0.0.1] joins game. List of players: singleplayer
Jump in the caac

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

Re: [mod]mg_earth (Lua Mapgen)

by ShadMOrdre » Post

Eris,

Can you provide the debug.txt file that is generated?

If you are using gal, try disabling that. I have probably made an update to gal that I haven't pushed yet.

Shad

User avatar
Eris
Member
Posts: 175
Joined: Thu Nov 19, 2020 23:12
IRC: definitelya Ovalo
In-game: Eris_still_crafts

Re: [mod]mg_earth (Lua Mapgen)

by Eris » Post

I am so sorry, I had NO idea we now should use the log setting in the client to log verbosely; will do in the future, thanks...
Attachments
debug.zip
(56.98 KiB) Downloaded 66 times
Jump in the caac

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

Re: [mod]mg_earth (Lua Mapgen)

by ShadMOrdre » Post

Eris,

I found nothing in your debug file that would indicate an issue with mg_earth. Are you loading any other mods besides the default MTG mods?

I use the warning level setting for debug. It trims extraneous data, but still informs me or issues.

I did post another update, earlier today, that should not have affected you. But just in case, please download the newest version, and try it with only MTG and no other mods.

Shad

User avatar
Eris
Member
Posts: 175
Joined: Thu Nov 19, 2020 23:12
IRC: definitelya Ovalo
In-game: Eris_still_crafts

Re: [mod]mg_earth (Lua Mapgen)

by Eris » Post

On Minetest 5.5.0-dev:

Code: Select all

2021-11-13 08:41:03: [Main]: [MOD] test:  Loading...
2021-11-13 08:41:03: [Main]: [MOD] mg_earth:  Version:0.1.0
2021-11-13 08:41:03: [Main]: [MOD] mg_earth:  Legal Info: Copyright 2021 ShadMOrdre.
2021-11-13 08:41:03: [Main]: [MOD] mg_earth:  License: LGLv2.1
Can confirm I git pulled before submitting the last bugreport.
Attached is the list of mods. I played with only MTG's mods and mg_earth with the last bugreport, too.
Attachments
screenshot.png
screenshot.png (206.39 KiB) Viewed 4212 times
Jump in the caac

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

Re: [mod]mg_earth (Lua Mapgen)

by ShadMOrdre » Post

Eris,

As evidenced by the screenshot, mg_earth is loaded. The log file messages are generated within my code. The message regarding Mod test is a typo. I'll have to investigate a bit as to why the "mod loaded" message isn't also appearing. Sorry for the confusion.

Make sure you are creating a world with singlenode mapgen, and you can set settings in the main menu. With it loading, just fly around to view the terrain.

Shad

User avatar
Eris
Member
Posts: 175
Joined: Thu Nov 19, 2020 23:12
IRC: definitelya Ovalo
In-game: Eris_still_crafts

Re: [mod]mg_earth (Lua Mapgen)

by Eris » Post

Shad,

ofc I'd forget to set singlenode... Works flawlessly, thanks for putting up with me ahah.
Jump in the caac

0siribix
Member
Posts: 123
Joined: Tue Nov 17, 2020 20:54
GitHub: 0siribix
In-game: 0siribix

Re: [mod]mg_earth (Lua Mapgen)

by 0siribix » Post

I am interested in using this for a layer/dimension on a world that already uses mgv7 for the main mapgen

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

Re: [mod]mg_earth (Lua Mapgen)

by ShadMOrdre » Post

While I've not implemented a clear way to add vertical dimensions, I can't see any drawbacks either.

Let me know if this works.


Shad

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

Re: [mod]mg_earth (Lua Mapgen)

by ShadMOrdre » Post

This is a massive update to mg_earth.

There are still some code cleanups and other issues that I'm working on, but included in this update are some of the following:

Menu based settings, including noise values and mapgen.

Voronoi based continents with noise based terrain options.

3D mapgen.

v6, v7, Islands, Carpathian and Valleys mapgens.

Road network.

Caves.

Supports Gal ecosystems.

Can be used with MTG default or gal. Can be updated for Exile and Mineclone.

RIvers. (In progress, but present on voronoi and valleys mapgens)

Provides 2D heightmap and biomemap, compatible with builtin mapgen heightmaps, and used in my own geomoria update, lib_towns mod, and others requiring a heightmap. I've made mg_villages, australia, aotearoa, ethereal, naturalbiomes and valleys_c modifications that enable them to work with this lua mapgen.

Will use registered biomes, decorations, and ores.
Attachments
screenshot_20220905_115856.jpg
screenshot_20220905_115856.jpg (458.22 KiB) Viewed 2558 times
screenshot_20220905_113129.jpg
screenshot_20220905_113129.jpg (375.46 KiB) Viewed 2558 times

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

Re: [mod]mg_earth (Lua Mapgen)

by ShadMOrdre » Post

Just a quick note, github has been updated with latest changes.
Attachments
screenshot_20220905_192638.jpg
screenshot_20220905_192638.jpg (187.16 KiB) Viewed 2530 times
screenshot_20220906_010057.jpg
screenshot_20220906_010057.jpg (292.31 KiB) Viewed 2530 times
screenshot_20220905_163727.jpg
screenshot_20220905_163727.jpg (296.5 KiB) Viewed 2530 times

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests