Good Noise for Scattered Blobs

Started by
5 comments, last by ApochPiQ 18 years, 10 months ago
Hi, I have been playing around with perlin noise to incorporate into my terrain editor for heightmap and alphamap generation. However, it doesn't seem to be very good for creating scattered blobs that are spaced far apart. Does anyone know of any enhancements to perlin noise, or other noise functions that can create good scattered blobs? So far I have implemented scale, octaves and falloff into my perlin function. Thanks all
Advertisement
As a first step, try raising the result of your noise function to some power. The higher the power, the more the results head towards 0 with only the highest numbers being apparent.
Another trick you can try is to clamp the noise values on, say, [0.4, 1] instead of [0, 1]. After clamping, renormalize the noise back to the [0, 1] scale. This will give large, flat areas with a few scattered lumps. You can then rescale this to give different shapes and distributions. Usually this works best with multiple octaves, where you can combine very large, very spread "mountains" with much higher-frequency surface detail, and even put "pits" into the flat area in scattered places by subtracting an octave from the noise if it is clamped.

The great thing about procedural noise is that you can create all kinds of different effects by messing around. Usually, to get the exact results you want, you'll have to combine (and likely invent) several variants and functions. There really aren't too many highly reusable variants (aside from the biggies like marble and some of the other orignal Perlin experiments). Play around a bit, be creative, and see how different functions and tweaks affect the overall results. As you continue to do this you'll get a good feel for how to acheive a certain type of effect, and from there how to get specific details and subtleties.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

Quote:Original post by ApochPiQ
Another trick you can try is to clamp the noise values on, say, [0.4, 1] instead of [0, 1]. After clamping, renormalize the noise back to the [0, 1] scale. This will give large, flat areas with a few scattered lumps. You can then rescale this to give different shapes and distributions. Usually this works best with multiple octaves, where you can combine very large, very spread "mountains" with much higher-frequency surface detail, and even put "pits" into the flat area in scattered places by subtracting an octave from the noise if it is clamped.

The great thing about procedural noise is that you can create all kinds of different effects by messing around. Usually, to get the exact results you want, you'll have to combine (and likely invent) several variants and functions. There really aren't too many highly reusable variants (aside from the biggies like marble and some of the other orignal Perlin experiments). Play around a bit, be creative, and see how different functions and tweaks affect the overall results. As you continue to do this you'll get a good feel for how to acheive a certain type of effect, and from there how to get specific details and subtleties.


Some great advice, thanks. What is the quickest way to normalize? Do I really need to walk through all the values to find the largest in order to find the scaling %?
Actually, you can use a dirty trick. Since the original values are normalized to [0, 1], cutting off the lower portion of the sample and rescaling will give you a normalized result, i.e.:

x = NoiseIf x < Threshold Then   x = 0Else   x = (x - Threshold) / (1 - Threshold)


This will work in the general case assuming your noise function has a good distribution over the [0, 1] interval. Anything that was originally lower than Threshold will be dropped off to 0, and the remaining values will still distribute over [0, 1].

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

you could also check out cellular textures...they are similar conceptually to perlin noise in that they're texturing "primitives," the base for a texturing chain that goes up through different functions to modify the boring primitive to get the look you want.

its a little harder to implement than simple perlin noise, but not too hard (and probably simpler than doing the "real" algorithm yourself), and the effect you get is different enough to be worth it. essentially the algorithm is to pick a bunch of psuedorandom points in n-D space, find the distance from the point youre texturing to its neighbors, and shade based on that result. you get quite different results based on how you measure that distance (euclidean, manhattan, etc) and which neighbor you measure to. then, as with perlin noise, you get a scalar you can do all sorts of funky things to.

a quick google finds this page. if you look at the second picture from the left at the top of the page, you could imagine making those cells further apart, and thus bigger, and clamping the scalar result (as apoch mentioned) to make space between them. splattered blobs! that result might be too perfectly hemi-spherical for you, so, as i said, you can change the distance function to change the shape of the blobs. or combine the cellular basis with a noise basis, for instance using the noise as a intermediate lookup into the cellular basis to make the cells perturbed, like you would do a marble texture.

anyway, even if you dont use it for this, a very good tool to have under your belt for future procedural stuff. and as apoch said, the key is to mess around as much as possible.
Ah yes, cellular textures are great as well - I'd completely forgotten about them [smile]

You can get some very interesting effects by combining turbulence-based techniques with cellular textures, as justo hinted. For instance, sampling a smooth, rolling cellular pattern with a subtle, high-lambda, low-omega turbulence function can produce effects that look a lot like glacial erosion in mountains. Exponentiating a cellular function and blending it with a low-frequency noise function can produce very nice wave effects.

Another idea to consider would be having several different functions that generate different types of detail at different heights. A base heightmap is created, and then the height is used to select two (or more) different detail functions and interpolate their results. This should give a smooth blending between different types of "terrain" at differing altitudes. The idea is similar in concept to detail texturing.

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

This topic is closed to new replies.

Advertisement