[mod] Fractal World Generation [fractal_worlds]

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

[mod] Fractal World Generation [fractal_worlds]

by Mator » Mon Apr 03, 2017 07:07

Image
imgur album - WIP GitHub repository

Introduction
Several years ago, I watched a music video on YouTube of a flight through a mandelbox. The architectural features of the mandelbox inspired me to want to generate fractals in Minecraft. I achieved that goal through a WorldEdit script, though what I truly wanted were massive, world-size fractal objects to explore. Minecraft's 256-height limit and obtuse modding API was a major turnoff to this, so I made my own Voxel Engine in Java. Making this engine taught me a lot. I later made a much faster and cleaner engine in C++ using SDL. I've generated some awesome fractal images with this engine. (1, 2, 3)

However, part of what I wanted was to be able to interact with a fractal world. I recently found out about Minetest, which has brought me full circle back to my original idea - generating fractal worlds to mine, explore, and build in.

The Project
The project will come in two stages. The first stage is using the Lua modding API to make world generation code as a proof of concept. The second stage is native integration into the base game as new world generation modes, including biome and seed support.

Progress

Stage 1 (in progress)


Stage 2

  • Mandelbox: Generates a Mandelbox the size of the entire world.
  • Mandelbulb: Generates a Mandelbulb the size of the entire world.
  • Fractal biomes: Create fractal biome palettes and support multiple fractal "biomes".
  • Parameter seeds: Map seed values to fractal parameters. o
  • Fractal garden: Generates a variety of fractals at various sizes throughout the world.


Any help is appreciated!
- Mator
Last edited by Mator on Sat Feb 17, 2018 08:31, edited 25 times in total.
 

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

Re: [mod] Fractal World Generation [fractal_worlds]

by paramat » Mon Apr 03, 2017 08:43

Good to have you active in Minetest and i'm happy to help.
 

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

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 » Mon Apr 03, 2017 16:33

paramat wrote:Good to have you active in Minetest and i'm happy to help.

Thank you paramat! :)

azekill_DIABLO wrote:awesome! purely awesome! are the colors random or they represent some kind of patern?

The colors are mapped from the iteration that the point exceeded the fallout. When generating fractals such as Mandelboxes and Mandelbulbs you have an algorithm which applies a formula to the point you are testing repeatedly until its magnitude exceeds a certain value, at which point you consider it to be headed to infinity and part of the set. The iteration at which this occurs is mapped to a block in a palette.

+ Warning: Math things ahead!
Last edited by Mator on Mon Apr 03, 2017 17:11, edited 1 time in total.
 

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

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

Re: [mod] Fractal World Generation [fractal_worlds]

by Andrey01 » Mon Apr 03, 2017 18:13

Interestingly... This is second CaveRealms mod in a screenshot
DL9Eh7xVBw7DXwLAMX1lStE21bSD2XUQ
 

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 » Mon Apr 03, 2017 20:52

Andrey01 wrote:Interestingly... This is second CaveRealms mod in a screenshot


What do you mean, and which screenshot?
 

User avatar
toby109tt
Member
 
Posts: 647
Joined: Sun May 29, 2016 23:42
Location: Belgium menen
GitHub: tobyplowy
In-game: Toby109tt

Re: [mod] Fractal World Generation [fractal_worlds]

by toby109tt » Mon Apr 03, 2017 21:10

That looks like chaos but in the good way I like it :)
i'm the co-dev and lead artist of farlands
 

User avatar
DS-minetest
Member
 
Posts: 1022
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [mod] Fractal World Generation [fractal_worlds]

by DS-minetest » Tue Apr 04, 2017 17:39

toby109tt wrote:That looks like chaos but in the good way I like it :)

I don't think, that it looks like chaos. It's totally structured. Chaos would be like dust.
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

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 » Tue Apr 04, 2017 21:09

Octahedron Fractal generation working. Added images to the imgur album in the OP. Here's a few good ones:

Image

Image

Image

Image

Image
 

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

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 » Thu Apr 13, 2017 00:18

I have three new fractals today.

Fractal Pyramid:

Image

Image

Quadratic Koch Surface:

Image

Image

Greek Cross Fractal:

Image

Image


Additional images have been added to the imgur album linked in the OP as well.
 

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

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

Re: [mod] Fractal World Generation [fractal_worlds]

by Krock » Fri Apr 14, 2017 14:36

These are impressive! It would be lovely if these fractals could be adjusted in a way to use them as a map. Directly thinking of the mandelbrot set.
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

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 » Sat Apr 15, 2017 17:32

azekill_DIABLO wrote:it's just amazing!


Thanks man. Fractals are fun. :)

Krock wrote:These are impressive! It would be lovely if these fractals could be adjusted in a way to use them as a map. Directly thinking of the mandelbrot set.


That's stage 2. I don't have mandelbrot set planned, however, because it's a 2d fractal. I don't really see the point of 2d fractals in a 3d graphics engine. The mandelbulb, however, is similar to the mandelbrot set. It's not a canonical 3d representation of the mandelbrot set, but it has some mathematical similarities.
 

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

Re: [mod] Fractal World Generation [fractal_worlds]

by paramat » Sat Apr 15, 2017 21:46

We already have 3D/4D mandelbrots used as maps in mgfractal.
 

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 » Sat Apr 15, 2017 21:52

paramat wrote:We already have 3D/4D mandelbrots used as maps in mgfractal.


That's actually a 2d mandelbrot set with height projected based on iteration instead of using iteration to determine color (I think). It is cool though. :)

EDIT: Actually no, I have no idea what that is. o_o

EDIT 2: I think it's some form of Julia Set maybe? Not sure.
 

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

Re: [mod] Fractal World Generation [fractal_worlds]

by paramat » Sat Apr 15, 2017 23:37

2D with height as iteration is too boring for me.
Some are 3D slices of 4D hypercomplex mandelbrot sets, some are 3D hypercomplex mandelbrot sets, each has the corresponding julia option.
All are from http://www.bugman123.com/Hypercomplex/index.html

All parameters are here https://github.com/minetest/minetest/blob/master/minetest.conf.example#L1523

Code: Select all
#    Choice of 18 fractals from 9 formulas.
#    1 = 4D "Roundy" mandelbrot set.
#    2 = 4D "Roundy" julia set.
#    3 = 4D "Squarry" mandelbrot set.
#    4 = 4D "Squarry" julia set.
#    5 = 4D "Mandy Cousin" mandelbrot set.
#    6 = 4D "Mandy Cousin" julia set.
#    7 = 4D "Variation" mandelbrot set.
#    8 = 4D "Variation" julia set.
#    9 = 3D "Mandelbrot/Mandelbar" mandelbrot set.
#    10 = 3D "Mandelbrot/Mandelbar" julia set.
#    11 = 3D "Christmas Tree" mandelbrot set.
#    12 = 3D "Christmas Tree" julia set.
#    13 = 3D "Mandelbulb" mandelbrot set.
#    14 = 3D "Mandelbulb" julia set.
#    15 = 3D "Cosine Mandelbulb" mandelbrot set.
#    16 = 3D "Cosine Mandelbulb" julia set.
#    17 = 4D "Mandelbulb" mandelbrot set.
#    18 = 4D "Mandelbulb" julia set.
#    type: int min: 1 max: 18
# mgfractal_fractal = 1
 

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 » Sun Apr 16, 2017 01:42

Got four new fractals today, all fractals I hadn't known about before now. Generation algorithms for these fractals are all very similar to the Menger Sponge.

Snowflake Cube

Image

Image

Penta Sponge

Image

Image

H Sponge

Image

Image

Koch Cube

Image

Image
 

User avatar
the_raven_262
Member
 
Posts: 315
Joined: Mon Sep 22, 2014 09:30
GitHub: theraven262
IRC: the_raven_262 Raven262 Corvus262 corvus
In-game: the_raven_262 Raven262 Nevermore

Re: [mod] Fractal World Generation [fractal_worlds]

by the_raven_262 » Sun Apr 16, 2017 11:00

I see you are doing an awesome job here :)
I thought to ask if fractals like the ones here (3d ones) could be made as minetest maps: http://hirnsohle.de/test/fractalLab/(The fractal library section)
[amber] [conjuration] [warzone] | Why is #minetest-mod-dev so empty?
 

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 » Sun Apr 16, 2017 23:15

the_raven_262 wrote:I see you are doing an awesome job here :)
I thought to ask if fractals like the ones here (3d ones) could be made as minetest maps: http://hirnsohle.de/test/fractalLab/(The fractal library section)


Hi the_raven,

The only fractal there which I don't already have here is the SphereSponge. I don't know how good it will look volumetrically, but if I can find a description of the algorithm I'll give it a go.

The main thing that site has differently is a bunch of transforms. Some of these are entirely new to me. The biggest difficulty is in figuring out the transform's implementation.

- Mator


EDIT: Found the original posting about the SphereSponge fractal. Will see if I can implement the pseudocode provided there.
 

User avatar
the_raven_262
Member
 
Posts: 315
Joined: Mon Sep 22, 2014 09:30
GitHub: theraven262
IRC: the_raven_262 Raven262 Corvus262 corvus
In-game: the_raven_262 Raven262 Nevermore

Re: [mod] Fractal World Generation [fractal_worlds]

by the_raven_262 » Mon Apr 17, 2017 10:32

Thanks for the answer, I don't know about making a spherical fractal in a cubic world, might seem odd, a lot.
Do you plan on using minetest's ore generation or are you going to use the fractal for it?
Also, I have no idea how does that site add colour to the fractals, but as it colours certain sections of the fractal I can guess colouring has something to do with the fractal itself, would be nice to implement biomes this way.
[amber] [conjuration] [warzone] | Why is #minetest-mod-dev so empty?
 

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 » Wed Apr 19, 2017 04:48

the_raven_262 wrote:Thanks for the answer, I don't know about making a spherical fractal in a cubic world, might seem odd, a lot.
Do you plan on using minetest's ore generation or are you going to use the fractal for it?
Also, I have no idea how does that site add colour to the fractals, but as it colours certain sections of the fractal I can guess colouring has something to do with the fractal itself, would be nice to implement biomes this way.


I think the SphereSponge can work in a cubic world so long as I set the minimum sphere radius sufficiently high.

I'm planning on taking both a "natural" approach to biome/ore generation (via MineTest algorithms or similar) and potentially a fractal approach as well. We'll see how it goes once I get there. :)
 

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 » Wed May 03, 2017 22:34

Added cube tree fractal after taking a bit of a break.

Image

Image

Image
 

User avatar
the_raven_262
Member
 
Posts: 315
Joined: Mon Sep 22, 2014 09:30
GitHub: theraven262
IRC: the_raven_262 Raven262 Corvus262 corvus
In-game: the_raven_262 Raven262 Nevermore

Re: [mod] Fractal World Generation [fractal_worlds]

by the_raven_262 » Thu May 04, 2017 12:10

Awesome! I really hoped you didn't abandon this project :)
[amber] [conjuration] [warzone] | Why is #minetest-mod-dev so empty?
 

Next

Return to WIP Mods



Who is online

Users browsing this forum: Pyrollo and 2 guests