World-building

avatar
(Edited)

I recently read a paper on society development in the old world. I wanted to create a more rigorous version of the model since the modelling assumptions do not define a unique model. In addition, I wanted to change some of the governing equations to more realistic ones. It seemed worthwile to apply this model to computer generated maps.  So I developed a fun model to generate landscapes. So here we are!


The image is pretty self-explanatory. Blue is sea/water which has been set to value 0. Then the turquoise is set to height 1, and see the colorbar for more :P 


Method: There are actually many algorithms out there for this kind of stuff (e.g. diamond square algorithm), but these are generally more aimed at 3D. I wanted to create a 2D elevation map. So it is like a top down 3D map. Of course you could use a 3D model and project it on a 2D plane but that is not an optimal way of doing things. 



It works by stacking layer upon layer. First the sea/water-level and the lowest ground level are created by making random pixels blue and turquoise. Then, the pixels look at their neighbours and change their color to equal the majority of adjacent pixels. In case of ties a random color is selected. Repeat this a couple of times and you get a nice base landscape. Then random parts of the elevated areas are selected to make space for higher elevated domains, the greenish pixes. Just boring pixel squares are placed but these are then diffused using the previous neighbour method. If you want higher elevated areas the last part can just be repeated.It is quite surprising how well this works:




There are lots of parameters to play around with to generate more hilly type of landscapes or more flat ones. I haven't gotten round to mess around with those yet.  It seems more fun to add some hum'ies to the world.




0
0
0.000
9 comments
avatar

Whowlesome worlds I suppose...

Posted using Partiko Android

0
0
0.000
avatar

A wh-owl new world... I need to call upon somebody with photo shop skills to make me an owl which rides a magical carpet.

Posted using Partiko Android

0
0
0.000
avatar

Hint: don't call me. I don't know where to buy plane tickets for the photoshop train.

Posted using Partiko Android

0
0
0.000
avatar

Hi @mathowl!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 3.609 which ranks you at #6154 across all Steem accounts.
Your rank has not changed in the last three days.

In our last Algorithmic Curation Round, consisting of 124 contributions, your post is ranked at #97.

Evaluation of your UA score:
  • You're on the right track, try to gather more followers.
  • The readers like your work!
  • Try to improve on your user engagement! The more interesting interaction in the comments of your post, the better!

Feel free to join our @steem-ua Discord server

0
0
0.000
avatar

How long does it take to go from a hilly landscape to a really mountain landscape? :)

0
0
0.000
avatar
(Edited)

It needs to perform the operation on few and fewer pixels when you are turning hilly into mountainous so it wil just take a few seconds. To generate the first two layers it needs to go through the whole grid (200x200 pixels) for a couple of iterations so that is the most expensive.

For practical implementation in games you can actually perform this on 20x20 pixels, then enlarge and make it smooth with an interpolation function. This would take maybe a second or two in total on a below average system

0
0
0.000
avatar

Ah yeah I see. And I imagine with a 200x200 grid, it is large enough to get pretty high mountains, isn't it?

0
0
0.000
avatar

Yes, you could go pretty high. But I turned the number of levels into an integer parameter. In the output I drew it was fixed to 3. I could definitely have picked a higher value :o)

0
0
0.000
avatar

This post has been voted on by the SteemSTEM curation team and voting trail.

If you appreciate the work we are doing, then consider supporting our witness stem.witness!

For additional information please join us on the SteemSTEM discord and to get to know the rest of the community!

Please consider setting @steemstem as a beneficiary to your post to get a stronger support.

Thanks for having used the steemstem.io app. You got a stronger support!

0
0
0.000