Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Random Continent Generating With Perlin Noise


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 Barrett   Members   -  Reputation: 152

Like
0Likes
Like

Posted 11 May 2013 - 02:45 AM

Hello!

 

I have got a problem with random map generation.

I'm trying to generate a map based on fantastic Perlin noise.

Here my results

 

84df35003a0f42f3ac21851.th.png396981a3b2684d059b8feed.th.png55b8feee3be543c6a7d6ce7.th.png

 

And now I want to create only a continent with nearest islands.

I tried to use Gauss function for reducing squares far from center and I tried to use a simple circular reduction for ignoring squares far from center.

Both of this ways gives me a map with good-loking maps, but with circular contour of reduction at edges of reduction zone.

Here an example

 

a3b30e4f834642839a4b8f6.th.png

 

I need your opinion to solve this problrm. What another methodics I can use to create best random maps? wink.png

I'm using C#.

 

Thanks in advance!

Denis

 

P.S. Sorry for my English


Edited by Barrett, 11 May 2013 - 02:55 AM.


Sponsor:

#2 hupsilardee   Members   -  Reputation: 487

Like
0Likes
Like

Posted 11 May 2013 - 05:39 AM

Grow/shrink the circle using 1D perlin noise? Make the radius a function of the angle, something like this:

 

// PerlinNoise1D(x) returns a value in [0, 1]
 
radius = radius * (PerlinNoise1D(angle) + 0.5);


#3 Barrett   Members   -  Reputation: 152

Like
0Likes
Like

Posted 11 May 2013 - 05:39 AM

I found a solution that look like good for me.

I 'm creating a radom "fuzzy" rectangle as reduction area/

 

Here are some examples

040ed4232e7d422d82c503b.th.png7eb4aa7a04b24f138a8a945.th.png

 

And get some maps like that

7b16caaff11e45fcb9fd129.th.png

 

It looks nice.

Any ideas of improving this algorythm?



#4 Barrett   Members   -  Reputation: 152

Like
0Likes
Like

Posted 11 May 2013 - 05:40 AM

Grow/shrink the circle using 1D perlin noise? Make the radius a function of the angle, something like this:

 

 

// PerlinNoise1D(x) returns a value in [0, 1]
 
radius = radius * (PerlinNoise1D(angle) + 0.5);

Oh, good idea! I will try it and upload here some results.


Edited by Barrett, 11 May 2013 - 05:42 AM.


#5 FLeBlanc   Crossbones+   -  Reputation: 3117

Like
1Likes
Like

Posted 11 May 2013 - 08:50 AM


Grow/shrink the circle using 1D perlin noise? Make the radius a function of the angle, something like this:
 

// PerlinNoise1D(x) returns a value in [0, 1]
 
radius = radius * (PerlinNoise1D(angle) + 0.5);


Oh, good idea! I will try it and upload here some results.


Here's some results for you:

CK9dbvJ.png

Since you are using a 1D function indexed by angle, the pattern ends up as a randomized star-like shape. You can't generate disconnected islands this way. All pixels lying along a given angle will use the same radius.

However, if you use a 2D noise function, indexed by (x,y) to modify the radius, you can get some disconnects:
radius=radius+noise2(x,y)
Gk5mgAf.png

Pixels lying along a given angle won't use the same radius, so some pixels further out might use a shorter radius than pixels lying nearer in. This means that voids, or holes, open up, providing the necessary turbulence to create disconnects.

#6 Barrett   Members   -  Reputation: 152

Like
0Likes
Like

Posted 12 May 2013 - 09:33 AM

Oh, thank you so much!






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS