Procedural Canyons (hurrah!)

Started by ProjectX, April 05, 2007, 02:10:03 PM

Previous topic - Next topic

ProjectX

I noticed that too, although mathematically there's no way it could work without the fractal on the get altitude (that's what controls where the canyons appear - there are canyons where there are valleys in the fractal - or at leat, that's what should happen). perhaps a more experienced node artist will be able to help (after all, I only really decided to do this after I read the terrain from functions tutorial on the wiki - I was a complete novice beforehand).

3DGuy

One quick way I can create canyons is by just slapping on a distribution node, limiting the altitude and use the displace offset to move sections below or above a certain height up or down. That way use use the valleys in the original fractal as a base for the canyons. Like so:


rcallicotte

3DGuy, this looks good.  Thanks.
So this is Disney World.  Can we live here?

ProjectX

#18
good idea 3dguy! The only downside I can see is that you can't plateau the tops.

I have noticed something odd with my canyon setup.

Counter-logically the get altitude gets the altitude on the input of the displacement shader and not the input of the get altitude shader.

This means that if you want a different pattern of canyons then you'll need to change the seed of the input terrain.

How odd.

dhavalmistry

and what happens when you disable that input power fractal shader....
"His blood-terragen level is 99.99%...he is definitely drunk on Terragen!"

ProjectX

The input of the get altitude shader? nothing. Therefore it is redundant.

3DGuy

Quote from: ProjectX on April 13, 2007, 11:19:51 AM
good idea 3dguy! The only downside I can see is that you can't plateau the tops.

For flat tops you'll have to start with a smaller initial displacement amplitude.
example attached...

ProjectX

I see, that's clever, good thinking!

dhavalmistry

Quote from: ProjectX on April 13, 2007, 11:45:45 AM
The input of the get altitude shader? nothing. Therefore it is redundant.

no the actual shader...the one that connects to displacement shader...I know this should change the whole displacement...but try it....and then maybe you can go from there
"His blood-terragen level is 99.99%...he is definitely drunk on Terragen!"

Tsukiyono

ProjectX... what did your nodes look like once you completed the example?

Not sure if I got mine set up right as I set my one scaler to 100, and I dont have straight walls... ???

ProjectX

Uploaded a tgc for you.

Tsukiyono

Thanks much :)

Going to check it out :D

ProjectX

I put it in as one shader for you, (which is actually a renamed displacement shader) view the internal workings if you want to know how it all fits together. Plug a standard terrain with displacement around 1000 into it's input and plug the output into the compute normal.

ProjectX

#28
I've worked it out, I was using the wrong node for getting the high points from the fractal, so it was effectively doing nothing. Thanks go to Volker for a massive help there!

Ok, here's what the nodes do:

Canyon Fractal: This fractal determines the shape of the canyons, you can modify the settings to change the overall shape. A noteable setting is the colour contrast and colour roughness settings, these determine the slope of the canyon walls and the degree to which the canyon wall is broken up.

Luminance to scalar: This is the function I was missing, it takes the degree of whiteness of the greyscale fractal and maps it to a scalar between 0 and 1. if we were to multiply this scalar now the white bits would get whiter, and so will the dark bits. The only bits that would not get lighter would be those that are absolute 0, so we have to manipulate the values a bit.

X2: This node multiplies the scalar by 2, so the range is between 0 and 2.

-1: This node subtracts 1 from the scalar, so the range is now between -1 and 1. When we multiply now, the darker bits get darker, and the white bits get whiter.

X50: This node multiplies the scalar by 50. This means that if we were to take a section of the scalar (say between 0 and -20) it would be a vertical wall. You can play with this to change the sheerness of the canyon walls.

Clamp -20,0: This node clamps the scalar between the values of -20 and 0. Think of this as being a canyon 20 meters high with valleys at an altitude of -20. Changing this value changes the height of the walls and the range of fractal detail captured. If you increase the displacement magnitude and decrease the sample range, your canyon walls will be shearer.

Attached below is the new shader. Plug it in on the end of your terrain, (you can also swap the internal fractal for your terrain fractal to have canyons only in the lowlands).

If you have any problems post here, and i'll see what I can do.

Edit> Added a quick render for you.

old_blaggard

Interesting result.  Looks like I'll be downloading the new version ;).
http://www.terragen.org - A great Terragen resource with models, contests, galleries, and forums.