Editor's Note: This tutorial marks the first tip written by someone from the WM community! This excellent tutorial is written by Filipe Dias. If you are interested in writing a guest tutorial, drop me a line with your idea!

World Machine Tip of the Month : Sunday, November 24th, 2002.

#4: Advanced Complex Terracing


How many of you have seen layers of rock staked on top of each other coming out of the hills? Tip #3 gave a look at it... But Nature seems to do a bit more than just placing layers of rock on top of each other. Geologic forces also push landmasses upwards. And when you push more on one end than on the other you get leaned strata.. This was my motivation to find a way of doing this in WorldMachine.

Here are some images I found on the internet with strata. These were generated on earth and rendered with photons on film.:-)

This tutorial shows how to combine "simple" ideas to get a subtle effect that greatly enhances realism of the output terrain. My approach to this tutorial may seem unusual: I will go through it chronologically in the same way my brain was working... In any case you can find the .tmd files at the end of this page to open in WorldMachine(v.98)






Terrain and terraces Creation

Ok, first thing to do: if we want to get strata (leaned or not) we need two things.. a terrace filter and an existing terrain. Both these things are one click away :-) A terrace filter and a perlin noise! (I also added an erosion device there just to get the noise to look more like a terrain...)
Now if you only terrace a noise you will basically end up with a veeeeeery simplified version of tip #3, so lets move to this tip: What more do we want? A leaned terrace!


A terrace in Pisa

How do we lean a terrace? Well we can lower some parts of a terrain by subtracting something!
So in our case, if we have a flat sea and want to lean it, we subtract something like a ramp (or gradient): we get a leaned sea. :-P Ok, let's try it! We Terrace a noise, and subtract a ramp.
Problem number 2, however, is "where do we get a gradient?". To do this in version .98 of WorldMachine we create a new noise with an extremely low frequency! A noise like the "experimental" goes nicely if you set "Feature Size" to "Continents" and "Persistence" to a low value. Take a look at the noise setup in the side image..


If we now place a combiner subtracting the gradient after the terracing, we get leaned terraces!!! ...only with one problem: the terrain is leaned as well..
What do we do to unlean a terrain, but not unlean the terrace? Simple: we unlean the terrain before it gets terraced! Ok, lets just add (inverse function of subtract) the gradient to the terrain prior to terracing it.

Now if you did everything I described here, you will find out that the general shape of the terrain did not go back to its original shape. This is because after adding two terrains WorldMachine rescales the terrain to fit it to all of the height spectrum. What we need to do now is to use a clamp device before the subtraction to influence how much we what to subtract, so we end up with the original "general horizontal-ness". I'll explain in more detail right away!


Playing with the parameters

Welcome to the tedious part! Now is the time when we know what we want, but need to adjust parameters to get it!

Before telling you how to tangle with that clamp device, I will talk about the original terrain we want to terrace and the leaned effect we want.
I can't believe that by now you haven't pushed the preview button yet.. It could be possible that you didn't see much because the noise wasn't be best one. I would say the best way to see the leaned terrace would be to have it leaned in a perpendicular direction to the slope of the terrain. If both terrace and terrain are leaned the same way the terraces will look horizontal.
In order to do this we need to find a good long valley or hillside in the original terrain (this means pushing the random button some times) and finding a slope that is perpendicular to that hillside (more random button pushing).. (To save you that work, I'll tell you my values:
"Gradient: FeatureSize=122.88km, Persistance=.344, offset=.938, Gain=.875, RandomSeed=7019, Type=Experimental; 
Terrain: FeatureSize=1.71km, Persistance=.344, RandomSeed=2, Type=Billowy")
Any way, as you can see, I managed to get a valley roughly aligned to the gradient, and the rendering of the bottom hill side of that valley can be seen on the top of this page.

Now for the clamping instructions! We added the gradient with the terrain and we leaned everything. Now we wanted to subtract a little bit of gradient, so we added a clamp device. (We could be using the slider in the combiner, but that distorts the image too much for my taste). The higher the slider is in the clamp device the more we will subtract, thus the lower the resulting terrain will be. The image on the left shows the attempts (a, b, c and d) for moving the slider for the clamp device. We want to get a resulting image that most resembles the original one. You can see that in a the clamping value was too low, because the resulting image on the combiner is not close enough to the original. In b it is closer but not yet at the right value: Notice the blue valley is lower but it was supposed to be pink! In c, on the other hand, too much was subtracted: the valley is now red. So in d the slider was lowered a little and the result is very close to the original... Wufff!..


Improving the model

Yes! we finally got through the tough part!

Now if we go back for more of Nature's inspiration, we could say that we would only want the terraces on a certain place, for instance on the lower areas.. That is what that "select height" device is doing (I named it "Terrace here"). Basically you choose where to terrace. And you could also vary the number of terraces by adding another height selection device ("How much to terrace"). That clamp device appears to regulate the number of terraces..

One thing I didn't explain was why I placed the erosion after the noise, but didn't select the heights from it. This was because I wanted to select smoother surfaces and not the ones resulting from the erosion.. But that was just an irrational attitude and I left it there. :-)


How does this end?

Well, in my opinion, this doesn't end here. You can easily complicate things to an unimaginable level.. For instance imagine you want to add a fault on the terrain. (Currently WorldMachine doesn't allow sideway-sliding faults to be modelled, but we can emulate vertical movement faults!) Just select some height and add it to your original gradient and you get a sudden change in height. And since it is on the gradient, it will only influence the place where the terracing will occur.. Check this image, and the complicated.tmd file that generated it, but BEWARE of the complication (take a look at the graph)...


You can download the files for this tutorial here:


Imagination is more important than knowledge! (Albert Einstein)



Tutorial by Filipe Dias. 11/24/2002.