Clump, clipping, flattern terrain

Started by Artice-3d, July 08, 2016, 05:30:40 AM

Previous topic - Next topic

Artice-3d

Hello!!  Help me please!!  I need so bad a clipping function, i saw the solutions here, but they all are good if you don't have multiple displacements in all directions, but i have and they don't work at all, how to cut off, clump a top part of terrain completely ?!!!  thanks for any help :(  This must be in a list of main functions, but still not, after so many years :(

AP

Try this solution. The sixth post down where Matt posted a technique to flatten a terrain.

http://forums.planetside.co.uk/index.php?topic=7548.msg80786#msg80786

Artice-3d

I saw this technique, but it doesn't work :(  It clipping in terrain system, but in shaders displacements it's doesn't work :(

Martin

Oh I really like that displacement though. Is it just one or several simple perling noise with some colour correct ? Or a more complicated thing with redirect shaders etc?

Artice-3d

Martin thanks, this is just experiments, it's has pretty complicated functions.. I will tell you after i will finish my work, it will be more realistic than you see :))))

Dune

One thing you could try is use the color of a PF to make the terrain, but keep the white and black clamped. If you add a displacement shader, you can set the exact height you need. And add all displacements after that. Only problem is the very hard cut of of the top. You can overcome that by adding a smaller displacement.
What you can also try is use a strata shader (maybe even right at the end) with 0 octaves, to 'clip' your terrain. Set heights and see what happens.

fuzzyEuclid

Okay I think I have something you can try:

PF --> Displacement Shader to Scalar converter

Displacement Shader to Scalar --> converters for x, y, and z

Y to scalar --> Conditional scalar; the conditional scalar is an if/then mechanism, so create a constant scalar for your top height ("top Y value" in the image), and set the conditional to yield the original Y to Scalar value if the Y to Scalar value is less than or equal to "top Y value", and the ELSE clause to be the "top Y value". Then plug that result, plus the X and Z scalars into a "Build Vector" node. Plug that into a Vector Displacement shader, and plug that into whatever - in this case it's the warper and compute terrain nodes from the default scene.


Dune

#7
That doesn't work (not when I tried it anyway), but here's an easy way to get some sort of clipped height. You can choose the range over which to clip from the original displacement, and set a maximum height range in the displacement shader. By choosing the lower range (in the smooth step constants) you obviously get more terrain and a huge flat top, choosing the highest range gives you the occasional (flattish) peak, and much lowland. Further to be displaced by additional PF's.

Edit: instead of the smooth step, you can use a color adjust with the same values for black and white, and have the additional use of the gamma.

Artice-3d

Thank you guys, buuutt....  Dune i need a solution after all displacements in scene.. i have multiple layers of surface in scene and many have displacements so with your solution i will need to connect to each of them to preserve top, but i need overall solution.. Maybe the last surface layer in scene which has cutoff both top and bottom like a nife for all displacements ;)

Dune

#9
You can add all extra displacements after the displacement shader (between that one and base color node). Just add a surface layer there and add all extra displacements into the child input.

Edit: and if needed for lateral displacements, add a compute terrain or compute normal.

Artice-3d

Dune the solution is good for creating what i want, but the problem still exist, when i use displacement with mode along normal it displace all terrain, but i want just walls :)))  And thank you very much for your amazing job ;)  I feel we somewhere near ;)

Dune

You can set a minimum slope, so the displacements won't be on horizontal (lish) terrain. Or a height restriction in the surface layer (min and max height+ fuzzy zone).

Artice-3d

Attitude don't give me nice results :(  Ok, leave this, i try to do something later :)))  I will post later the results i have now, not good, but not as bad, as it could be ;) Thanks for all

bobbystahr

Quote from: iwnbts on July 09, 2016, 08:37:15 AM
Attitude don't give me nice results :(  Ok, leave this, i try to do something later :)))  I will post later the results i have now, not good, but not as bad, as it could be ;) Thanks for all

Dune said Slope and you were trying Altitude...I think Slope is what you want to work with.
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Artice-3d

No attitude, no slope.. it's a selection stuff and with displacement it's a mess  :-\ !!