Sign in to follow this  

Good Noise for Scattered Blobs

This topic is 4557 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 %?

Share this post


Link to post
Share on other sites
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 = Noise
If x < Threshold Then
x = 0
Else
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].

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

This topic is 4557 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this