General Domain Warping

Perlin noise is a simple way to generate terrain that takes on believable shapes. However, after a while, one starts to get used to the kinds of terrain that Perlin noise creates, recognising the same types of shapes again and again, and that these are neither particularly realistic or interesting.

Today we will be looking at a simple sophistication of the basic Perlin noise with a bit of added-in domain warping. This function looks as follows:

height(x,y) = noise(x,y,noise(x,y))

One can imagine a vat of 3D Perlin noise then sliced through by a Perlin noise-shaped blade. Or maybe it is easier to just see the difference.

It takes us from this:

To this:

And of course, nothing is wrong with the noise in the first example. It's just a bit uniform and boring. Walking around that terrain in Minecraft, there'd be nothing but rolling hills and valleys. No steep cliffs and/or long slips of land. While it is fine for constructing landmasses perhaps, neither the inland terrain features or the coastlines are particularly interesting.

In this post, I will show the same slice of terrain again and again, though with variations on the two factors of the domain warping:

height(x,y,strength,size) = noise(x,y,strength*noise(size*x,size*y))

Let us dive a bit deeper into the difference in strength. As we increase the strength, this is what happens:

This terrain is even more interesting, put in one way, but it might be close to some limit, where the terrain is too distorted, looking more painterly than realistic. This is most easily seen in the strange peninsulas just left of the centre of the picture.

Perhaps this would work well if you are walking around the terrain, but from up far, it looks quite odd. We are nearing the limit.

At this strength of domain warping,  the whole thing breaks apart. We get concentric artifacts where the terrain is "warped" around the a center point. This centerpoint would match a "peak" or an "abyss" of the noise that is used for the domain warping.

While this kind of noise is pretty bad for terrain, perhaps it would work just fine for other purposes, such as art. I at least have earlier found great use in highly warped noise and just that kind of fashion.

Let us then change our perspective and look at different size factors used in the domain warping:

Here, we are back where we began, well, actually at a slightly smaller strength than before. As the  size factor increases, giving a, smaller-scale, higher frequency domain warping, the effect of domain warping will become more apparent just as when we increased the strength directly. However, the types of artifacts will change.

Already here, we can see that the domain warping has fewer of the sinewy artifacts than before, instead creating more fragmented terrain overall.

At this point, we start to see the same impact of distortions as in the earlier examples, though in a very different way. The fluid, non-uniform structures appear at a smaller scale than before - which is logical, really, because that's what we are doing.

Just a simple note - the images in this series are all of the same underlying noise terrain, so the shapes and continents are the same. However, we can see the large influence of domain warping, to add three volcanic caldera to the three major landmasses two thirds up the picture, compared to before.

This terrain is quite impressive, honestly. The large continents, the strange islands and archipelagos.

And now, finally, the terrain is becoming strange and marred, taking on a texture uncommon to terrain. Perhaps it might work for a foreign planet, or it might be better suited for a different purpose than terrain, such as art. As before. This seems to be the end result when either the strength or size of domain warping becomes too large.

Originally, I had wanted to do a post full of animations as strength and size factors were changed. It just happens to be the case that the animation of domain warping is incredibly distracting. So these stills are the best I can do, not for lack of trying. Nonetheless, I hope this post has shown some of the possibilities opened by using domain warping for generating terrain, and what types of customisation this offers.


  1. What a fantastic outcome, I really like this! What are your next plan with it, will you populate your generated maps with nations, cities, trade-routes, etc?
    Btw, I never leave a comment but I love all of your posts, keep it up :)

  2. I.. have no idea why my account is called "Future" or who that is in my profile image..

    1. Glad that you like it! Pulling back the veil a bit, this was actually a last-minute improvisation when what I really wanted to do didn't work out. I don't have any particular plans to do with terrain atm, though this might change. Maybe I'll continue this, put in continents, biomes, some shading, who knows. It's been a while since I last did planet-size terrain. But this is all hypothetical - right now, I'm working on something very different instead.

    2. Alright, sounds good :) Looking forward to read about it!


Post a Comment