• Create Account

### #ActualKhatharr

Posted 29 November 2012 - 08:51 PM

Are you looking for Perlin Noise?

You could map the distributions separately and then combine them into a final map.

edit - nvm, didn't see you mention that when I first read through. Sry

What, specifically, were the other methods doing that you didn't like? I don't understand what it is that you're trying to make happen that those methods aren't giving you. If it's tighter grouping to create 'clusters' of like objects then maybe you could generate a grid of noise for a set radius and then scale each tile by its distance from the center point?

For instance, a 5x5 grid represented by a 2D float array. Fill it with random values between 0 and 5 and then consider the center of the grid as the center of a circle with radius 6 or so. For each value in the array calculate (6 - distance from center point) and then scale the value by that amount. Once done just compare each value against a threshold value. If the value is greater than the threshold then place an entity in that position.

I haven't tested that, but by adjusting the aggressiveness of the 'distance from center' (exponential rather than linear, for instance), the range of the original values (0 to 100 instead of 0 to 5, maybe) and adjusting the threshold you could probably get pretty decent clusters even from random noise.

### #8Khatharr

Posted 29 November 2012 - 08:50 PM

Are you looking for Perlin Noise?

You could map the distributions separately and then combine them into a final map.

edit - nvm, didn't see you mention that when I first read through. Sry

What, specifically, were the other methods doing that you didn't like? I don't understand what it is that you're trying to make happen that those methods aren't giving you. If it's tighter grouping to create 'clusters' of like objects then maybe you could generate a grid of noise for a set radius and then scale each tile by its distance from the center point?

For instance, a 5x5 grid represented by a 2D float array. Fill it with random values between 0 and 5 and then consider the center of the grid as the center of a circle with radius 6 or so. For each value in the array calculate (6 - distance from center point) and then scale the value by that amount. Once done just compare each value against a threshold value. If the value is greater than the threshold then place an entity in that position.

I haven't tested that, but by adjusting the aggressiveness of the 'distance from center' (exponential rather than linear, for instance) and adjusting the threshold you could probably get pretty decent clusters even from random noise.

### #7Khatharr

Posted 29 November 2012 - 08:48 PM

Are you looking for Perlin Noise?

You could map the distributions separately and then combine them into a final map.

edit - nvm, didn't see you mention that when I first read through. Sry

What, specifically, were the other methods doing that you didn't like? I don't understand what it is that you're trying to make happen that those methods aren't giving you. If it's tighter grouping to create 'clusters' of like objects then maybe you could generate a grid of noise for a set radius and then scale each tile by its distance from the center point?

For instance, a 5x5 grid represented by a 2D float array. Fill it with random values between 0 and 5 and then consider the center of the grid as the center of a circle with radius 6 or so. For each value in the array calculate (6 - distance from center point) and then scale the value by that amount. Once done just compare each value against a threshold value. If the value is greater than the threshold then place an entity in that position.

I haven't tested that, but by adjusting the aggressiveness of the 'distance from center' and adjusting the threshold you could probably get pretty decent clusters even from random noise.

### #6Khatharr

Posted 29 November 2012 - 08:19 PM

Are you looking for Perlin Noise?

You could map the distributions separately and then combine them into a final map.

edit - nvm, didn't see you mention that when I first read through. Sry

What, specifically, were the other methods doing that you didn't like? I don't understand what it is that you're trying to make happen that those methods aren't giving you.

### #5Khatharr

Posted 29 November 2012 - 08:15 PM

Are you looking for Perlin Noise?

You could map the distributions separately and then combine them into a final map.

edit - nvm, didn't see you mention that when I first read through. Sry

### #4Khatharr

Posted 29 November 2012 - 08:14 PM

Are you looking for Perlin Noise?

You could map the distributions separately and then combine them into a final map.

PARTNERS