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 :(
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
I saw this technique, but it doesn't work :( It clipping in terrain system, but in shaders displacements it's doesn't work :(
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?
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 :))))
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.
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.
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.
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 ;)
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.
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 ;)
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).
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
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.
No attitude, no slope.. it's a selection stuff and with displacement it's a mess :-\ !!
Matt's get altitude blue nodes worked for me also.
Dune, or anyone, what is the blue displace scalar node, or where? I found all the rest but clueless on that one you have there.
Somethings up Dune. Your solution is by bar more elegant (it seems in life I prefer the overly complicated, round-a-bout path), but mine does work I swear I swear :) I've posted the file, if you (or anyone) is interested.
The blue node you're looking for luvsmuzik, I think: right-click in the node view, select Function -> Convert -> Displacement to Scalar.
...at least, I think that's the one you're asking about.
Fuzzy, thank you. I did find the convert displace to scalar node. My version does not have the function option as in Dune's illustration here to set height to 2000. (Edit: yes it does if you plug it into the right place) My file has the flattened surface now.
We shall find the answer! Edit: Read and follow directions....
Thanks all!
Quote from: luvsmuzik on July 11, 2016, 12:07:34 AM
Fuzzy, thank you. I did find the convert displace to scalar node. My version does not have the function option as in Dune's illustration here to set height to 2000. (Edit: yes it does if you plug it into the right place) My file has the flattened surface now.
We shall find the answer! Edit: Read and follow directions....
Thanks all!
Woo Hoo...another forum success story...way t' go every one!
@Fuzzy: in your setup you have this strange sideways displacement and hard edges to the clamp. In my setup you have a smooth edge, and non of the strange tilt.
Ah yeah, I see that. Damn I should have noticed - sorry about that. I should spend more time examining rather than assuming the nodes are doing what I think they should be doing :-/
Thanks Dune! BTW I finally splurged and grabbed your railway scene(s) from NWDA store. Mind. Shattered. Can't find all the pieces. Can't figure out if that's a good thing or a bad thing. Finding time to really dig into it all is going to be almost as challenging as understanding it....
You can't find all the pieces? I should check whether it still works under TG4, but I wouldn't know why not. And yes, it's not very simple, so if you're still a bit unfamiliar with TG, it might take some time to understand. But you will!