Noob questions about clamping function terrain

Started by Shigawire, May 18, 2014, 07:14:01 PM

Previous topic - Next topic

Shigawire

Hi there. I'm a Terragen noob, mostly a background in 3dsmax and Modo. I recently learned a bit of World Machine. I made a desert scene in World Machine, and I now want to be able to procedurally generate the same kind of desert in Terragen 3 - because TG provides "infinite" horizon.

I have learned a little bit from the tutorials about "A Function Only Landscape", as that is the approach that is closest to what I used in World Machine. But I am still stuck with one thing.

The screenshots attached as "Erg_Big_Machine" and "Erg_Big_Daddy" show what kind of Erg / Dune Field I have attempted in World Machine. I have tried to focus my energy on Barchanoid, Transverse, and some Parabolic sand dunes as shown here.



I have attached the TGD as dune_field_01.tgd - which is basically a slightly modified version of the same dune field from the tutorial by David Burnett mentioned earlier.

As you see, everything has the same height, and I am unable to mask-clamp down certain parts of the dunes using a perlin noise map, as I did in World Machine. So instead of having multiple parallell lines continuing into infinity, I want the dunes to come up from the earth, and roll down into the earth again.. and disappear based on a mask perlin noise. I know it's possible because I did it in WM, I just don't know how to do it in TG. I've tried scalar clamp, but it didn't do what I thought it did.

I hope someone can help :)

p.s. the Dune shapes made in that tutorial are perfectly fine for smaller barchanoid sand perturbations such as these:
http://www.physicalgeography.net/fundamentals/images/desertdune.jpg

Dune

#1
Is this what you mean?

EDIT: Or better maybe, this.

Shigawire

Hmm very good. It's much closer to what I had in mind, and I think it will help me tremendously. Thank you.

But there are some rules I try to uphold:

Dunes should avoid intersecting each other, crossing over each other
(these are called "star dunes" and are very rare but have to look just right)

New Dunes should stay in the gulleys, away from the slopes of other dunes.

Larger Barchanoid / Parabolic dunes should not continue forwards like a snake, but look like the letter C and disappear into the sand for each new dune.

Dune slope angles are max 15° on the leeway, and max 32° on the avalanche side if barchanoid (or compression side if parabolic)

In any case, what you provided is exactly what I wanted for and I will study this :) Thank you

Dune

If you add a color adjust shader between the fractal mask and the surface that holds the smaller dunes, you can decrease the coverage by sliding black to a higher level. For instance.

Shigawire

Quote from: Dune on May 19, 2014, 06:04:25 AM
If you add a color adjust shader between the fractal mask and the surface that holds the smaller dunes, you can decrease the coverage by sliding black to a higher level. For instance.

Great tip! Thanks

Tangled-Universe

To control coverage you can indeed use a colour adjust, like Dune proposed.

How TG does this with surface layers and such is basically by multiplication.

So you can also multiply (use multiply scalar/colour, should not make much difference in this case) the dunes mask with a constant scalar/colour.
If the constant scalar/colour is set to 0.5 then you will reduce the coverage of the dunes by 50%.
If it's >1 you will increase coverage, logically.

Doing it this way is a bit more predictable, because you know what's happening exactly to the values, compared to clipping the black with a constant shader as that's not necessarily a linear adjustment.

Cheers,
Martin

bobbystahr

Welcome to Terragen in general and this forum in particular  Shigawire, and thanks for a great learning thread. I've already understood something I had no clue about 10 min. ago.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Shigawire

Thank you all for the welcome, and kind help. I will try to look at the suggestions you've provided for me.
Though I don't fully understand the process yet.

Dune, fitting name btw, my nickname is from the Dune sci fi novels :D
This is probably not the first time someone has attempted to make dunes for Terragen, and said that your name is fitting :P

Just out of idle curiosity, is there a way to "mask" the smoothness using only function nodes?
Or is it limited to the powerful surface layer nodes?

This seems like a great community. :)

Though my funds are in the "minus" range at the moment  ::) (Modo 801 just came out, and funded multiple kickstarters),
I will eventually purchase Terragen 3 Professional + Animation :)

Shigawire

Is there a way to tell the dune functions to "skip" every 2nd dune wave? /|___/|  instead of /|/|/|

Dune

This IS a great community.

Skipping every second dune should be possible, but you'd need to set up some sinus function with an amplitude of twice the distance between dunes, and use that as a mask. Such mask can be made with a get position in texture, X(or Z) to scalar, a divide function for the size, and a sinus. Enter that as mask input to a surface shader and hacve the dunes as child. But that would be very straight lines north-south, so you need to warp that sinus, by a warp shader+ vector displacement+power fractal (you need get position in texture as opposed to get position to be able to warp). You may also need to add another power fractal mask to give occurrence of dunes some randomness. 
But why all function nodes? surface shaders are very practical.

Tangled-Universe

I'd say; make a function with half the wave-length of your pattern. Then using a colour adjust or bias scalar node you can alter the sinus shape to sharper spikes. The distance between the spikes should not change.
Now multiply this sinus function with the function you're interested in and you should be able to cut out every 2nd ripple.

It probably means quite a bit of fiddling to get it right.
Be aware of the negative values generated by the sinus function, but I'm pretty sure you are.

Shigawire

Ok, thanks. I might try that later. But the function to skip the dune should be done at the linear level, prior to the perlin noise X-Add function - so before the perturbation.

Shigawire

Ok, I bit the bullet and bought Terragen 3 P+A

Tangled-Universe


bobbystahr

something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist