[C++ Mapgen] Terrainbrot - A fractal-based mapgen

Post Reply
User avatar
Hume2
Member
Posts: 592
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

[C++ Mapgen] Terrainbrot - A fractal-based mapgen

by Hume2 » Post

To install my mod, build the source code at:
zip package: https://gitlab.com/h2mm/minetest/-/arch ... inbrot.zip
GitLab branch: https://gitlab.com/h2mm/minetest/tree/terrainbrot.

After that you can see the "terrainbrot" as one option. Windows users can download the (currently outdated) build here.

Warning! The settings are currently subject of change. If you download a new version of terrainbrot, reset the settings to default.

This mapgen is based on the "fractal" mapgen. It iterates a rational function and uses perlin noise to generate stuff endlessly. Its variety is very huge. It can generate anything from flat lands to insane mountains. It also generates rivers. Some areas are full of rivers, other areas contain no rivers at all. Some rivers are straight, other rivers are curly.

It is not supposed to be a realistic terrain. I focused that on being simple and using a lot of variety. However, there are many places those look very realistic. I think, it might be also a good fantasy world.

Some screenshots: https://imgur.com/a/HSv5oCN

A short explanation of how it works:
+ Spoiler
All screenshots are from one world. The seed is no longer valid but the look hasn't changed. It's hard to find a world in which all interesting stuff can be seen. I have found at least some of them in this world.

License LGPLv2.1+

Changelog:
+ Spoiler
Video: https://youtu.be/XireVf2cwOM
Image
Last edited by Hume2 on Tue Jan 29, 2019 09:57, edited 9 times in total.
If you lack the reality, go on a trip or find a job.

User avatar
voxelproof
Member
Posts: 991
Joined: Sat Aug 05, 2017 08:13
Location: Europe

Re: [C++ Mapgen] Terrainbrot

by voxelproof » Post

It looks very, very good. And this shot

Image

is just awesome. I hope you'll work on it further and the mg will be added to the Minetest engine.

EDIT: of course I meant Minetest Game :)
Last edited by voxelproof on Wed Jun 27, 2018 18:48, edited 1 time in total.
The core of the gaming joy is putting predatory fish of hazard into a transparent aquarium of Play. Guy Debord

User avatar
Hume2
Member
Posts: 592
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: [C++ Mapgen] Terrainbrot - A fractal-based mapgen

by Hume2 » Post

Thanks for your feedback. I made a video and a short explanation of how it works. I made two more screenshots:

Image

Image
If you lack the reality, go on a trip or find a job.

User avatar
ChimneySwift
Member
Posts: 320
Joined: Fri Sep 22, 2017 06:46
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift
Location: 127.0.0.1

Re: [C++ Mapgen] Terrainbrot - A fractal-based mapgen

by ChimneySwift » Post

Wow this is really cool, I like that it's not that realistic, it opens up a new world of awesome terrain. I can see this and similar mapgen becoming the mapgen of choice for people who want a fantasy world.

In my testing it was quite slow however, I don't usually have speed issues with map generation but through out my tests my CPU was pinned and the map still generated slowly, still cool though.

Oh, and for the Windows users who want to try it, I made a Windows build which you can access here
A spoon is basically a tiny bowl with a stick on it

User avatar
Hume2
Member
Posts: 592
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: [C++ Mapgen] Terrainbrot - A fractal-based mapgen

by Hume2 » Post

ChimneySwift wrote:Wow this is really cool, I like that it's not that realistic, it opens up a new world of awesome terrain. I can see this and similar mapgen becoming the mapgen of choice for people who want a fantasy world.

In my testing it was quite slow however, I don't usually have speed issues with map generation but through out my tests my CPU was pinned and the map still generated slowly, still cool though.

Oh, and for the Windows users who want to try it, I made a Windows build which you can access here
Thanks for feedback.

I'll try to optimise the generator a bit. Maybe the mgterrainbrot_rank can be reduced to 4 but I am unsure about the consequences. I'll try to work with perlin noise more effectively.

Thank you for making a Windows binary. However, your link seems to be broken, it says file not found. Could you look at it please?
If you lack the reality, go on a trip or find a job.

User avatar
ChimneySwift
Member
Posts: 320
Joined: Fri Sep 22, 2017 06:46
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift
Location: 127.0.0.1

Re: [C++ Mapgen] Terrainbrot - A fractal-based mapgen

by ChimneySwift » Post

Huh. That's weird. My other files are still there... Hopefully this doesn't become a problem.

New link here
A spoon is basically a tiny bowl with a stick on it

User avatar
Hume2
Member
Posts: 592
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: [C++ Mapgen] Terrainbrot - A fractal-based mapgen

by Hume2 » Post

Thank you. I added the link to the first post.
If you lack the reality, go on a trip or find a job.

User avatar
voxelproof
Member
Posts: 991
Joined: Sat Aug 05, 2017 08:13
Location: Europe

Re: [C++ Mapgen] Terrainbrot - A fractal-based mapgen

by voxelproof » Post

Hume2 wrote:Thanks for your feedback. I made a video and a short explanation of how it works. I made two more screenshots:

Image
Wonderful.
The core of the gaming joy is putting predatory fish of hazard into a transparent aquarium of Play. Guy Debord

User avatar
paramat
Developer
Posts: 3691
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [C++ Mapgen] Terrainbrot - A fractal-based mapgen

by paramat » Post

Interesting. Good idea to randomly create the iterative function from noise and seed and make it a quite complex function to generate a more complex structure.

User avatar
Hume2
Member
Posts: 592
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: [C++ Mapgen] Terrainbrot - A fractal-based mapgen

by Hume2 » Post

Update: I have improved the speed a few times. Now you can find my code on GitHub. I hate Micro$oft©®™ but this is an exception because Minetest source is still on GitHub.

The algorithm doesn't change but the worlds are different though. And the code needs clearing :)
If you lack the reality, go on a trip or find a job.

User avatar
Hume2
Member
Posts: 592
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: [C++ Mapgen] Terrainbrot - A fractal-based mapgen

by Hume2 » Post

I was experimenting with scaling the noises. I scaled both coordinate and polynomial noise 4 times in each axis. Even more epic structures generate. However, it takes long to find a spawnpoint and it often ends with placing the spawnpoint on sea or underground so this will not be default settings.

Some screenshots:
Image
Image
More screenshots at: https://imgur.com/a/2a21gzp
If you lack the reality, go on a trip or find a job.

User avatar
voxelproof
Member
Posts: 991
Joined: Sat Aug 05, 2017 08:13
Location: Europe

Re: [C++ Mapgen] Terrainbrot - A fractal-based mapgen

by voxelproof » Post

Hume2 wrote: Some screenshots:
Awesome.
The core of the gaming joy is putting predatory fish of hazard into a transparent aquarium of Play. Guy Debord

User avatar
Hume2
Member
Posts: 592
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: [C++ Mapgen] Terrainbrot - A fractal-based mapgen

by Hume2 » Post

I'm now experimenting with cave generation. I reused some noises to generate caves. They are all sizes and less predicable. It's a shame that there's not much to show underground. I used cave_explorer mod.

Image
Image
Image
Attachments
screenshot_20180719_163500.jpg
(85.2 KiB) Not downloaded yet
screenshot_20180719_163622.jpg
(61.09 KiB) Not downloaded yet
screenshot_20180719_163721.jpg
(47.1 KiB) Not downloaded yet
If you lack the reality, go on a trip or find a job.

User avatar
Hume2
Member
Posts: 592
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: [C++ Mapgen] Terrainbrot - A fractal-based mapgen

by Hume2 » Post

Update: I managed to fix the issue with spawnpoint that caused the spawnpoint to place in wrong height.
I think, I'll disable Cavebrot by default because these caves aren't what I expected to be. It will be still possible to enable it in config. The caves generate too frequently, are too large, don't branch much and I don't see a way to fix this.

Now the mapgen is almost as fast as v7. The spawnpoint finding function might use caches as well but currently it takes approx. 7 sec to find one, so I don't plan to do it now.

PS: I never noticed structures like these: Image These highlands elevate between y=100 and y=200 and there are large caves bellow them. And there are these weird structures at the borders.
Attachments
screenshot_20180903_183828.jpg
(126.97 KiB) Not downloaded yet
If you lack the reality, go on a trip or find a job.

User avatar
Hume2
Member
Posts: 592
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: [C++ Mapgen] Terrainbrot - A fractal-based mapgen

by Hume2 » Post

I finally migrated my branch to GitLab.

I added an option to make the fractal purely polynomial. After some experiments, it results in such realistic terrain as this shown on the pics. Only the rivers aren't much realistic.
Image
Image
Attachments
screenshot_20190128_143052.jpg
(84.55 KiB) Not downloaded yet
screenshot_20190127_194713.jpg
(111.4 KiB) Not downloaded yet
If you lack the reality, go on a trip or find a job.

User avatar
runs
Member
Posts: 1803
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [C++ Mapgen] Terrainbrot - A fractal-based mapgen

by runs » Post

How to add to Minetest? I mean the code only not the whole Minetest.


I think this should be added to the official branch...
Day 42 of the quarantine

User avatar
Hume2
Member
Posts: 592
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: [C++ Mapgen] Terrainbrot - A fractal-based mapgen

by Hume2 » Post

runs wrote:How to add to Minetest? I mean the code only not the whole Minetest.


I think this should be added to the official branch...
You can do it by git rebase. If your Minetest is already downloaded via git, it shouldn't be a problem for you to check out another branch. Git shouldn't download all the unchanged files again, only the changed ones. Also, this mod modifies the Minetest's engine, so you have to build whole Minetest to enable it.
If you lack the reality, go on a trip or find a job.

CalebJ
Member
Posts: 317
Joined: Sat Dec 29, 2018 19:21
GitHub: KaylebJay
IRC: KaylebJay
In-game: CalebJ
Location: Tunnelers' Abyss

Re: [C++ Mapgen] Terrainbrot - A fractal-based mapgen

by CalebJ » Post

Here's a 900m ice spike created by terrainbrot. :D
screenshot_20190614_070842.png
(216.51 KiB) Not downloaded yet
If you want realism, you're in the wrong place. Get off your mobile.

Post Reply

Who is online

Users browsing this forum: CalebJ, Noodlemire and 7 guests