Planetside Software Forums

General => Terragen Discussion => Topic started by: kalwalt on July 02, 2014, 09:52:06 AM

Title: How to create stones like karren?
Post by: kalwalt on July 02, 2014, 09:52:06 AM
Maybe you are wondering what is a karren, this is a typical geological formation of the carsism. I live in Trieste (IT) and it is very famous for this. for a description in English go in the speleo web page http://www.speleogenesis.info/directory/glossary/?term=Rinnenkarren, in particulary the page point to "Rinnenkarren" in which i would more interested to realize. See also the picture attached, taken from this site http://www.oberstdorf.de/alpininfo/allgaeuer-alpen/geologie/helvetikum.html ; i think i can figure out how to realize the stones but not how to applly the typical erosion from the water streams ( see in the picture in the foreground, those channels are 1-3 centtimeters large), What should in your opinion the best approach to realize this?

Thank you,

Walter
Title: Re: How to create stones like karren?
Post by: mhaze on July 02, 2014, 11:12:11 AM
StretchedPF?
Title: Re: How to create stones like karren?
Post by: archonforest on July 02, 2014, 11:37:59 AM
 ???What is PF means ???
Title: Re: How to create stones like karren?
Post by: Hannes on July 02, 2014, 12:29:01 PM
Power fractal
Title: Re: How to create stones like karren?
Post by: archonforest on July 02, 2014, 12:46:28 PM
Thank you Hannes ;)
Title: Re: How to create stones like karren?
Post by: kalwalt on July 02, 2014, 02:46:05 PM
yes maybe a stretched PF could work, but with a PF, the magnifying detail continues indefinitely? how can i stop the detail?
Title: Re: How to create stones like karren?
Post by: Tangled-Universe on July 02, 2014, 02:59:30 PM
Quote from: kalwalt on July 02, 2014, 02:46:05 PM
yes maybe a stretched PF could work, but with a PF, the magnifying detail continues indefinitely? how can i stop the detail?

In the powerfractal the "smallest scale" is the size of the smallest detail the fractal generates.
As you may know, scales in TG are metric.

So increasing smallest scale is what you may be looking for.
Another way to control the detail of the fractal is the "Displacement roughness" setting in the displacement tab of the power fractal.

Basically this setting controls the drop-off for how fast the amplitude of octaves/scales decrease.
For example, at a setting of default 1 the drop-off is half the amplitude for each next octave.
A setting of 0.5 will make the drop-off stronger, thus removing smallest scale features of the fractal.
A setting of >1 will make the drop-off weaker and at much greater settings than 1 you are even capable of reversing the "profile" where small scale octaves have larger amplitudes than bigger scale octaves.
Title: Re: How to create stones like karren?
Post by: kalwalt on July 02, 2014, 03:06:17 PM
Thank you Tangled-Universe for the quick and very comprehensive answer! Your reply has dissolved all my doubts, I will work on this now. :)
Title: Re: How to create stones like karren?
Post by: mhaze on July 03, 2014, 10:16:41 AM
Sorry I didn't answer more fully - in addition to TU's suggestion you can use colour offset in the colour tab - just set it to a minus value and play.  I find it useful to click on the blue square at the top right of the power fractal pop up to get a visual of what's happening.
Title: Re: How to create stones like karren?
Post by: Tangled-Universe on July 03, 2014, 10:39:45 AM
Quote from: mhaze on July 03, 2014, 10:16:41 AM
Sorry I didn't answer more fully - in addition to TU's suggestion you can use colour offset in the colour tab - just set it to a minus value and play.  I find it useful to click on the blue square at the top right of the power fractal pop up to get a visual of what's happening.

The colour offset and other colour settings won't affect the displacement if you have displacement enabled within that PF node.

If you want to control the displacement with the colour settings then you must disable displacement in the PF, connect the PF to a displacement shader's "function input" port on the right and then the colour output of the PF will be converted to displacement.
Make sure that the displacement shader replaces the PF in the node network chain, meaning that the PF won't have any input connected to it anymore. Important!

Then the offset, contrast and roughness settings will control the displacement, but also the chosen colours themselves.
Title: Re: How to create stones like karren?
Post by: kalwalt on July 03, 2014, 10:53:11 AM
Thank you for the clarifications @mhaze and @Tangled-Universe, actually i'm creating the heightmap with WorldMachine, when it will be ready , i will start to experiment with PF nodes! :)
Title: Re: How to create stones like karren?
Post by: mhaze on July 03, 2014, 11:52:39 AM
Well TU, I didn't know that!  That actually clears up a couple of problems I've had.
Title: Re: How to create stones like karren?
Post by: Dune on July 04, 2014, 04:29:53 AM
I'd say use a stretched ridged perlin PF of very low octave and size and restrict that by max slope. I see some areas of the stones are worn out on the top; you can do that by adding a negatively displaced perlin PF (also not too many octaves), also restricted by max slope.
The squarish stones are harder to get, you might try a combination of X and Z stretched fractals to displace them vertically. Room for experiment...
Title: Re: How to create stones like karren?
Post by: kalwalt on July 04, 2014, 07:59:08 AM
Quote from: Dune on July 04, 2014, 04:29:53 AM
I'd say use a stretched ridged perlin PF of very low octave and size and restrict that by max slope. I see some areas of the stones are worn out on the top; you can do that by adding a negatively displaced perlin PF (also not too many octaves), also restricted by max slope.
The squarish stones are harder to get, you might try a combination of X and Z stretched fractals to displace them vertically. Room for experiment...
yes, Ulco this is a work in progress! and you gave me a good input, i will soon show something of the experimentation.... :)
Title: Re: How to create stones like karren?
Post by: kalwalt on July 04, 2014, 04:11:45 PM
Finally some experiments: first picture karren-without-shaders show a particular of the heightmap created with Worldmachine wiyhout shaders applied.
[attach=1]
this instead is with shaders applied, more or less as suggested by Ulco, but for the crack i used this clip from @dandelO http://forums.planetside.co.uk/index.php?topic=8849.0
[attach=2]
this is a screenshots of my nodes shaders.
[attach=3]
Title: Re: How to create stones like karren?
Post by: kalwalt on July 04, 2014, 04:37:57 PM
Another picture, cracks are more distant:
[attach=1]
I'm wondering how I can enlarge the cracks ??? ::)
Title: Re: How to create stones like karren?
Post by: Dune on July 05, 2014, 03:03:57 AM
That's a strange way of connecting nodes, but if it works...
You can change the size of the fractals or use a transform shader for bigger size.
Title: Re: How to create stones like karren?
Post by: Tangled-Universe on July 05, 2014, 04:38:19 AM
As far as I can see your 2 negative displacement shaders do nothing, since they don't have any input on the right port to displace (negatively).

The port on the left is just to connect it into the network, it allows the shader to do something, but it needs some kind of input in that right triangle to actually do something.

You can indeed resize the cracks using a transform node, but be aware that this does not scale the displacement amplitudes along.

So best is to resize your noise function itself, along with the respective displacement settings.
When displacement is involved I do it like this, because then the ratio of scale to displacement stays clear to me and using a transform shader adds an extra variable to take into account.
Title: Re: How to create stones like karren?
Post by: kalwalt on July 05, 2014, 09:56:56 AM
I'm sorry if it seems strange some my nodes, actually some of them don't do so much. i disabled some of them. I get how to enlarge the cracks: in the DandelO clip there is a color adjust shader, reducing the White point value, and increasing the scale of the noise, did the job. Of course this is only  one of the step to complete the work. I also considering to change the heightmap to a procedural one, or a simpler heightmap created with WM without erosion.
[attach=2]
Title: Re: How to create stones like karren?
Post by: kalwalt on July 05, 2014, 10:17:22 AM
I would to stretch in the X or Z axis the voronoi 3D diff scalar but if i connect after that a transform input shader and increasing the scaling in one of the axes does nothing. Is there some specific function for this?
Title: Re: How to create stones like karren?
Post by: Tangled-Universe on July 05, 2014, 10:29:21 AM
Quote from: kalwalt on July 05, 2014, 10:17:22 AM
I would to stretch in the X or Z axis the voronoi 3D diff scalar but if i connect after that a transform input shader and increasing the scaling in one of the axes does nothing. Is there some specific function for this?

If you replace the "get position 01" with a "get position in texture" node then you should be able to adjust the scale etc. with a transform node.
Title: Re: How to create stones like karren?
Post by: kalwalt on July 05, 2014, 10:42:26 AM
Quote from: Tangled-Universe on July 05, 2014, 10:29:21 AM
Quote from: kalwalt on July 05, 2014, 10:17:22 AM
I would to stretch in the X or Z axis the voronoi 3D diff scalar but if i connect after that a transform input shader and increasing the scaling in one of the axes does nothing. Is there some specific function for this?

If you replace the "get position 01" with a "get position in texture" node then you should be able to adjust the scale etc. with a transform node.
It's perfect! It does exactly what i want!  :D :D :D
another question: does exist a blur function in the TG Function nodes? or there is a way to perform a blur operation combining different nodes?
Many thank's!
Title: Re: How to create stones like karren?
Post by: Tangled-Universe on July 05, 2014, 11:30:15 AM
You're welcome :)

No, procedural blur is a kind of holy grail and does not yet exist or at least not in a way suitable for TG's procedurals.

What do you want to try? Perhaps there's another way?
Title: Re: How to create stones like karren?
Post by: kalwalt on July 06, 2014, 08:12:56 AM
Quote from: Tangled-Universe on July 05, 2014, 11:30:15 AM
You're welcome :)

No, procedural blur is a kind of holy grail and does not yet exist or at least not in a way suitable for TG's procedurals.

What do you want to try? Perhaps there's another way?
Yes, I saw different topics in this forum that argued the difficulties of this approach. My idea was to blur the cracks in order to obtain a smoother transitions from the cracks and the inner part of the stones. I encrased a bit more the size of the cracks and i used a soothstep function, but i think it's not the same as blurring. Probably i need to use a different approach to the problem.
Title: Re: How to create stones like karren?
Post by: Tangled-Universe on July 06, 2014, 10:12:28 AM
I often try to use a "colour adjust" node to tweak a crack function.
So connect the output of your crack function to a colour adjust shader.

If you decrease the white point of the colour adjust shaders then the cracks will become sharper/more narrow.
Increasing whitepoint does the opposite and thus will make the cracks "softer" and wider.

Just click on the little blue "window" button to open the preview of the shader and play with the sliders to see what they do.

The colour adjust shader basically remaps values like Photoshop Levels function.
Title: Re: How to create stones like karren?
Post by: kalwalt on July 06, 2014, 11:18:36 AM
Quote from: Tangled-Universe on July 06, 2014, 10:12:28 AM
I often try to use a "colour adjust" node to tweak a crack function.
So connect the output of your crack function to a colour adjust shader.

If you decrease the white point of the colour adjust shaders then the cracks will become sharper/more narrow.
Increasing whitepoint does the opposite and thus will make the cracks "softer" and wider.

Just click on the little blue "window" button to open the preview of the shader and play with the sliders to see what they do.

The colour adjust shader basically remaps values like Photoshop Levels function.

I was doing the same thing, i have already a color adjust node as you can see in the picture http://www.planetside.co.uk/forums/index.php?action=dlattach;topic=18577.0;attach=51383;image of the nodes cracks, but i was wondering if there were other methods, but as you had confirmed, they aren't.
Thank you again for your answer.