### Canyon

Friday, March 07th, 2008 | Author:

A nifty little canyon isn’t that easy.

You’ll find out at the latest when your Mesh looks like an accordion and your Redirect does things it shouldn’t do: either nothing at all, too much, or it results in a render time only Methuselah would appreciate. Hence this tutorial explaining how one can model a canyon with simple means and low render times.

A possible result will look something like this:

Well, the ground surface is miserable but that’s not the point here.

The plan: we take two height fields that rise directly upwards. In between, we’ll leave some space that will give us our canyon.

First, we only have to raise the existing Heightfield Shader 01 via Adjust vertical (mark Heightfield Shader 01 – Add Operator – Adjust vertical) a few meters. I added a height of about 1200m in Add height. With this, we get an area that is higher than the surroundings but still a little too small. Usually, a canyon is rather long, not only a few hundred metres. Heightfield Shader 01 is, by the way, only one side of the canyon. We’ll add the other one later.

Now, we’ll have to adjust the dimensions first, so that we get a longish piece. We can do that in Heightfield generate 01 in Size in Meters. I took 70,000 metres in direction Z (the field on the right). We’ll leave everything else as is. We don’t need to generate the height field because we’ve raised the whole plain with Adjust vertical. Heightfield generate in this case only serves for the pure existence and control of the plain size. The advantage is that we don’t have a terrain with a limited amount of pixels. It would be best to raise the Border Blending in the Heightfield Shader to 0.25, giving us smoother edges.

As we still need an opposing wall, we simply copy Heightfield Shader 01 (Ctrl+D) and connect the thus created Heightfield 01_1 with the Heightfield Shader 01_1 as a Heightfield. We then have two Heightfields of the same size and height. They lay on top of each other, and you cannot see Heightfield 01_1. For this, we need to combine it again with the other Heightfield: right-click in the Node Network and choose Create Shader – Other Shader – Merge Shader. Then connect Heightfield 01 with the Input Nodeinput and Heightfield 01_1 with the input of Shader A. Now attach the output to the input of Compute Terrain. Then select Merge Shader 01, set a value of 1 in Mix to A and select Highest (raise) in Choose by Altitude. In order to move one of the two Heightfields, we choose Heightfield Shader 01_1 and set a value of 10000m with Position and the desired width of the canyon into the left field. I chose 11000m. It should look like this in the preview:

Now we should set the sun to Heading 0 and set an Elevation of 60°, otherwise it will be too dark inside the canyon.

If we look at the canyon now, we’ll realise that the walls don’t rise straight upwards. We shall remedy that with two Twist and Shear Shaders. They bend the terrain into a direction with a certain factor. Right click in the Node Network, choose Create Shader – Surface Shader – Twist and Shear Shader and insert it between our Heightfield Shader and the Merge Shader. Repeating this whole procedure for the other Heightfield Shader with a Lean Factor of –1 will give us nearly straight walls on both sides.

Next, we’ll distort the canyon a little. Hardly any natural canyon is straight for such a long distance. That’s what we’ll need a Redirect Shader for. Simply click on Add Terrain – Surface Shader – Redirect Shader. As you’ll see, this doesn’t work without any input. The best thing would be a simple Power Fractal. So click the button with three dots, Create Shader – Colour Shader – Power Fractal Shader v3. This won’t be enough, though. The Redirect only moves the whole terrain via a function. As we need a rather big function here, we need to adjust some settings of the Power Fractal. Mind the following:

• We need big structures because we don’t simply want to “twist” the canyon a little.
• The smaller the structures for a Redirect, the bigger the render times.
• We don’t need details in our structure.

Looking at the Power Fractal, we see an indication of the Noise Octaves in Scale. The smaller this value, the smoother our structures. So we set the values for Scale, Lead-In Scale, Smallest Scale to 7500. Then we select the Displacement tab and set a Displacement Amplitude of 7500. Now we should have a slightly winding canyon that should look approximately like this:

And here the hitherto existing network:

Now we should look for a nice POV and refine the canyon structure.

By the way, from now on we’ll do everything behind the Compute Terrain node or in the Shader tab respectively since we use a Distribution Shader and need a Power Fractal with Lateral only. All this only works past Compute Terrain unless you have some tricks up your sleeve.

Now we’ll refine the walls and, particularly, the upper side of the canyon a little. Yet the ground should remain even, in case we want to add water later or have other plans for it. So we need a so-called Blending Shader. It determines where another Shader is visible and, more importantly, where not.

We’ll start by laying a coloured Blending Shader on the terrain. We go to the Shader tab and choose Add Layer – Surface Layer. Now we see bright grey everywhere. To have some clarity, we’ll deactivate Fractal breakup of Surface Layer and delete the corresponding Shader from the Node Network. That’s not necessarily required but the more Shaders, the longer the render time. Then go to Altitude Constraints and set the Minimum Altitude to 0 and the Min Alt Fuzzy Zone to about 150m (it always helps, by the way, to colour such a Shader in red in order to see its coverage better). Now we set the colour to white; the Surface Layer marks those areas white that are higher than 0m (with a transition zone of 150m). Now we sever all connections of this Layer in the Node Network and reconnect Base Colours with Planet 01.

Next, we need a Power Fractal. We can add this via Add Layer – Surface Shader – Power Fractal Shader v3. We then connect the Surface Layer with the Blending Shader input of the Power Fractal and activate its option Blending Shader. Now we only need to choose suitable values in order to determine the shape of the Power Fractal. Therefore, we select Tweak Noise and set all values in Noise Variation to 0. We take Perlin ridges as a Noise flavour. Then we go to Scale and adjust the values to our taste. I took the following values:

• Feature Scale: 2500
• Smallest Scale: 10

In Displacement I decided on this:

• Amplitude: 1000
• Roughness: 0.45
• Spike Limit: 0.5

“Appropriate” values can heavily differ between your taste and mine. It’s well possible that you’ll have to click and reclick Random Seed before you find something suitable. Mine looks like this in the meantime:

Our Node Network has been expanded in the meantime:

In the second half we will add details through the Redirect Shader and further Power Fractal Shaders and thus bring our canyon to completion.

First we want some more structure in the horizontal. Small overhangs and indentations in the walls would surely look good so we take a Redirect Shader and again create a Power Fractal that we’ll connect to the X input. This time, however, we will take considerably smaller values, since we don’t want big structures but rather small ones. However, keep in mind that the values should be as small as necessary and as big as possible. We can later make the really fine details more render time friendly than using a Redirect. However, the latter has the advantage that it affects both sides of our canyon negatively (rising on one side means indentation on the other). Thus the canyon retains its diameter. The following are some reference values that do an excellent job for the dimensions of our canyon:

• Feature Scale: 1000
• Smallest Scale: 250
• Amplitude: 500 (Along normal)
• Roughness: 0.5
• Spike Limit: 0.5

We now have smooth displacements in the walls:

As a last step we now want many more details. A structure running horizontally along the canyon, having light bands of strata, would surely look good. However, a Redirect would take more render time, and as I want to use a Billow Perlin for the somewhat stretched Fractal, it is of no use here. Why? Quite simply: a Billow Perlin on one side implies a negated Billow (thus a Ridges) on the other. That just seems unnatural.
So we simply add another Power Fractal. The most important issue is the dimension. We want rather small structures, so accordingly small values should be chosen. Additionally, we only want them on the walls, not on the ground. Moreover, we’d like to have them horizontally and slightly stretched in the Z-direction.

We can solve the problem with the ground easily. But first let’s think about the values we need here. Based on the height of the walls I guessed an approximate scale of 100. We will do the following before setting all the other values: under the Tweak Noise tab we set Noise Flavour to Perlin Billows and we raise the Z value to 3. We then go to the Displacement tab and set Lateral Only. This provides horizontal displacement, which affects the ground only slightly. Now the remaining values. Mine are:

• Feature Scale: 100
• Smallest Scale: 1
• Amplitude: 50 (lateral only!)
• Roughness: 1
• Spike Limit: 1

That’s it, really. The only thing left to do is to add a little colour. I coloured the last Power Fractal with a slight brown and beige hue. About the render time: the 800×600 picture took 73 minutes on my notebook (AMD Turion 64 X2 with 2GB RAM) on detail 1. A very acceptable time, considering the number of different Shaders and two Redirects. Again the result:

I hope you were able follow and achieve good results. I look forward to comments, criticism and suggestions as well as any pictures you create using this method.

P.S.: Of course, this is not the ideal method to model a canyon but it is simple and – in my eyes – every step is easy to follow. We could do a lot in one single shader but I prefer handling things the easy rather than the hard way. I’ve attached the .tgd file where I summarise the single steps in groups describing what is being done. That should simplify matters.

Tags »

Category: Beginner, How to..

You can leave a response.
Pinging is currently not allowed.

17 Responses

1. I’m a little surprised that no-one has commented on how helpful and amazing the tuts are.
So let me be the first to say thank you for sharing your knowledge.

2. 2
Ro-nin

Hey man, great idea that of the Blog!!!!!!!!!!
I’ll be visiting from now on…
Keep up the marvelous work.

3. 3
Goms

Thank you.

4. 4
pfrancke

Helpful!? Inkydigit posted a link to your blog at Ashundar – I have spent a couple of hours just reading and for me this is the most concise, helpful, tg2 info found in a single spot. And so far I’ve just been fooling with the beginner stuff, I can’t wait to see what gold lies deeper. Thank you so much for putting this together!!!

5. 5
buzzzzzz

Fantastic offerings and tips here! Thanks for all you’ve done and plan to do in the future.

6. 6
Diego

One question: I kinda got lost immediately after the last picture of the Node Network. Would it be possible for you to show your final Network, ’cause I can’t figure out how you’re connecting the “smooth displacement” shader and the “fine details” displacement shaders. Yes: I’m a total noob. Sorry for my English, and thanks in advance!

7. 7
Diego

^^^ Oops! Missed the .tgd file. Sorry =P

8. Thanks for this! I have been back many times! – Bill .

9. This information is outstanding; and, I am so thankful that you have published it. Learning Terragen 2 is a slow process for me; but with information like this, the process goes faster for me. Thank you so much.

10. 10
littlecannon

Outstanding tutorial… very helpful, I learnt a lot. Thanks

11. From where I stand this is the tutorial that sets THE standard for clarity and completeness that I try to live up to.

12. 12
fxsculpt

This is fantastic help. Your clarity is impressive. I could not figure our how to get the lateral displacements to work previously.

Thanks

13. 13
fxsculpt

Btw is there some kind of rules you use for setting the scale of displacement features? Your values you use seem so precise. A tutorial on these ratios would be welcome. Maybe explain how you come up with values for low, medium and high frequency details.

14. 14
bobbystahr

Brilliant..dunno how I missed this when I was doing canyons…gonna have to get back int the canyon for a bit now…thanks mate.. …

15. 15
Platon

Wow! Awesome tutorial! So helpful, thank you very much

16. 16
Dan