[mod] Fractal World Generation [fractal_worlds]

Robsoie
Member
Posts: 104
Joined: Fri Apr 29, 2016 16:22

Re: [mod] Fractal World Generation [fractal_worlds]

by Robsoie » Post

After seeing this thread , and this gallery :
http://www.mandelbulber.com/gallery_page1.php

No doubt fractal worlds that could take such shapes would make for completely amazing fantasy outworldy exploration.
Fantastic work.

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

Re: [mod] Fractal World Generation [fractal_worlds]

by paramat » Post

You can create a massive variety of forms already with the fractal mapgen if you experiment with the parameters, so far i have not seen anyone other than myself create anything other than the default structures.
Of course mgfractal is limited to hypercomplex mandelbrot and julia sets, i am very keen to see the mandelbox added or in a new core mapgen. The mandelbulb doesn't interest me so much in it's normal form but maybe altered forms will be good, it is also very slow to calculate.

User avatar
Mator
Member
Posts: 18
Joined: Sun Apr 02, 2017 17:41
GitHub: matortheeternal
In-game: Mator

Re: [mod] Fractal World Generation [fractal_worlds]

by Mator » Post

Hilbert Curve generation conquered. I was kind of dreading generating this fractal because every approach to generating it that I've seen uses a string-rewrite (L-System) approach. It was actually much easier than I expected via some clever coordinate transformations.

I think it may actually be simpler than the L-system approach, in some cases. But enough of that, here's some screenshots:

Image

Image

Image

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] Fractal World Generation [fractal_worlds]

by TumeniNodes » Post

Now THAT..., is really, really awesome, and impressive..., and looks like a lot of fun
A Wonderful World

User avatar
wes
Member
Posts: 45
Joined: Fri Jul 07, 2017 12:00
GitHub: wesofx
In-game: wes

Re: [mod] Fractal World Generation [fractal_worlds]

by wes » Post

paramat wrote:I am very keen to see the mandelbox added or in a new core mapgen
Get to work, paramat! I expect Mandelbox in Minetest by August! :)

Code: Select all

#include <iostream>
int main(){while(true) std::cout << "nyan ";}

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [mod] Fractal World Generation [fractal_worlds]

by azekill_DIABLO » Post

wes wrote:
paramat wrote:I am very keen to see the mandelbox added or in a new core mapgen
Get to work, paramat! I expect Mandelbox in Minetest by August! :)
>>> will be same for me!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

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

Re: [mod] Fractal World Generation [fractal_worlds]

by paramat » Post

Yeah looking at Mator's code i realised i could add the mandelbox to mgfractal, and i intend to do so.

User avatar
Andrey01
Member
Posts: 2574
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: [mod] Fractal World Generation [fractal_worlds]

by Andrey01 » Post

Mator wrote:
Andrey01 wrote:Interestingly... This is second CaveRealms mod in a screenshot
What do you mean, and which screenshot?
First screenshot looks like mapgen as in Caverealms mod. Only here use wools instead of stone and etc.

User avatar
Mator
Member
Posts: 18
Joined: Sun Apr 02, 2017 17:41
GitHub: matortheeternal
In-game: Mator

Re: [mod] Fractal World Generation [fractal_worlds]

by Mator » Post

I have returned to this project. Just today I managed to generate the sphere tree fractal.

Image

Image

User avatar
TechNolaByte
Member
Posts: 465
Joined: Wed May 10, 2017 21:00
GitHub: TechNolaByte

Re: [mod] Fractal World Generation [fractal_worlds]

by TechNolaByte » Post

Wow this world gen is AMAZING!
also so great that this could get even better now that your working on it again
The great quest of alchemy neither failed nor attained gold; programmers are those great alchemists who transmute caffeine into code.

User avatar
Mator
Member
Posts: 18
Joined: Sun Apr 02, 2017 17:41
GitHub: matortheeternal
In-game: Mator

Re: [mod] Fractal World Generation [fractal_worlds]

by Mator » Post

RSLRedstonier wrote:Wow this world gen is AMAZING!
also so great that this could get even better now that your working on it again
Thanks, glad you like it. :)

Yeah I've got some plans. I want to get the Pythagoras Tree working still, but after that I'll be moving forward with full world-generation presets implemented with C++. I'm specifically excited for the Fractal Garden idea from the OP.

User avatar
Gael de Sailly
Member
Posts: 845
Joined: Sun Jan 26, 2014 17:01
GitHub: gaelysam
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly gaelysam
Location: Voiron, France

Re: [mod] Fractal World Generation [fractal_worlds]

by Gael de Sailly » Post

Hello Mator,

I tried your sphere tree fractal today and this is very good work, however the map generation is slow. I looked a little into your code and I think there is a huge optimization possible. The code iterates over nodes and builds the sphere tree for each node, and there are millions ones, that's what consumes so much time. Building the sphere tree once, storing positions/radiuses in a table, and iterating over spheres could give much better results.
Just realize how bored we would be if the world was perfect.

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

Re: [mod] Fractal World Generation [fractal_worlds]

by paramat » Post

Good to see you back again.

IanniPowerup!!!
Member
Posts: 100
Joined: Wed Nov 29, 2017 17:33
In-game: IanniPowerup
Contact:

Re: [mod] Fractal World Generation [fractal_worlds]

by IanniPowerup!!! » Post

MOD CONTAINS DISSALOWED CHARACTERS !!!!!!!!!!!!!!!!!!!!!
CANT PLAY IT

User avatar
the_raven_262
Member
Posts: 343
Joined: Mon Sep 22, 2014 09:30
GitHub: theraven262
IRC: [Discord unfortunately] corvus262

Re: [mod] Fractal World Generation [fractal_worlds]

by the_raven_262 » Post

IanniPowerup!!! wrote:MOD CONTAINS DISSALOWED CHARACTERS !!!!!!!!!!!!!!!!!!!!!
CANT PLAY IT
Maybe if you actually read some of the info before posting a full-caps response would be nice.
The folder of the project contains different mods of which you choose one, not the whole folder.

User avatar
Mator
Member
Posts: 18
Joined: Sun Apr 02, 2017 17:41
GitHub: matortheeternal
In-game: Mator

Re: [mod] Fractal World Generation [fractal_worlds]

by Mator » Post

Gael de Sailly wrote:Hello Mator,

I tried your sphere tree fractal today and this is very good work, however the map generation is slow. I looked a little into your code and I think there is a huge optimization possible. The code iterates over nodes and builds the sphere tree for each node, and there are millions ones, that's what consumes so much time. Building the sphere tree once, storing positions/radiuses in a table, and iterating over spheres could give much better results.
That's unfortunately not possible because the memory available to Lua scripts is very limited. It's also potentially impossible for large objects due to the RAM required. Generating a part of the fractal given arbitrary coordinates is the most natural way to do world generation. Recursive division is faster most of the time, but at large scales it's actually often slower (depending on the fractal being generated) because of disk IO (because the entire world cannot exist in RAM all at once).

The code is fast enough that the generation time will be imperceptible once I port the code to native C++ world generation. :)

User avatar
Gael de Sailly
Member
Posts: 845
Joined: Sun Jan 26, 2014 17:01
GitHub: gaelysam
IRC: Gael-de-Sailly
In-game: Gael-de-Sailly gaelysam
Location: Voiron, France

Re: [mod] Fractal World Generation [fractal_worlds]

by Gael de Sailly » Post

Mator wrote:
Gael de Sailly wrote:Hello Mator,

I tried your sphere tree fractal today and this is very good work, however the map generation is slow. I looked a little into your code and I think there is a huge optimization possible. The code iterates over nodes and builds the sphere tree for each node, and there are millions ones, that's what consumes so much time. Building the sphere tree once, storing positions/radiuses in a table, and iterating over spheres could give much better results.
That's unfortunately not possible because the memory available to Lua scripts is very limited. It's also potentially impossible for large objects due to the RAM required. Generating a part of the fractal given arbitrary coordinates is the most natural way to do world generation. Recursive division is faster most of the time, but at large scales it's actually often slower (depending on the fractal being generated) because of disk IO (because the entire world cannot exist in RAM all at once).

The code is fast enough that the generation time will be imperceptible once I port the code to native C++ world generation. :)
Some days after, I've managed to make a version of the sphere tree mapgen that runs way faster. However I haven't tested the amount of memory taken. See https://github.com/matortheeternal/fractal-miner/pull/1
Just realize how bored we would be if the world was perfect.

User avatar
Mator
Member
Posts: 18
Joined: Sun Apr 02, 2017 17:41
GitHub: matortheeternal
In-game: Mator

Re: [mod] Fractal World Generation [fractal_worlds]

by Mator » Post

Gael de Sailly wrote:Some days after, I've managed to make a version of the sphere tree mapgen that runs way faster. However I haven't tested the amount of memory taken. See https://github.com/matortheeternal/fractal-miner/pull/1
OK, I'll take a look and give it a test. Thanks!

EDIT: PR accepted. Fantastic work! :)

It looks like you managed to make the algorithm require constant time regardless of fractal iteration, which is the way it should be. Sorry it took me awhile to see your PR, I really do appreciate your contribution. :)

User avatar
Mator
Member
Posts: 18
Joined: Sun Apr 02, 2017 17:41
GitHub: matortheeternal
In-game: Mator

Re: [mod] Fractal World Generation [fractal_worlds]

by Mator » Post

I felt a bit inspired by Gael de Sailly's optimizations, so I adjusted the sphere tree generation code to support a palette of blocks, where spheres are generated using blocks from the palette based on their iteration level.

Image

Image

Sires
Member
Posts: 190
Joined: Mon Jan 02, 2017 21:00
GitHub: Sires0
IRC: Sires
In-game: Sires Sores Siri Seris or anything ppl call me
Location: :noitacoL

Re: [mod] Fractal World Generation [fractal_worlds]

by Sires » Post

Awsom project, also, here is why you should use drugs kids: https://youtu.be/7L3ziP64DOQ
:P
I don't have anything important to say.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 15 guests