Planetside Software Forums

General => Terragen Discussion => Topic started by: N-drju on January 02, 2019, 01:14:21 PM

Title: Push vertical surface in
Post by: N-drju on January 02, 2019, 01:14:21 PM
Guys, I need your kind advice.

Attached is a screenshot of what I would like to do. I have a gently curved rock wall. Mid-height, I would like to indent this wall so that a small, narrow path is carved into said wall.

[attach=1]

I tried to make some adjustments using the surface shader's altitude limits, but that's not enough. Looks like I forgot how nodes should be arranged for a lateral displacement magic.

Now, I consider either a Surface Shader-masked twist and shear shader or a displacement vector to achieve the said push effect, but if you have some better ideas I am all ears and willing to learn. :) Thanks.

And by the way - have a healthy and creative year 2019! :)
Title: Re: Push vertical surface in
Post by: cyphyr on January 02, 2019, 04:11:29 PM
Something like this?
:)
You could use several with different displacement values at different levels for a more interesting effect ...
Title: Re: Push vertical surface in
Post by: N-drju on January 02, 2019, 04:20:23 PM
Uh-huh. That's what I am aiming for, but it's a real pain in the back!

I put to work, what Oshyan once gave me in that other thread (where you also waged in) and the "shelf" in the wall can indeed be made this way with lateral displacement:

https://planetside.co.uk/forums/index.php/topic,24082.msg255467.html#msg255467

But you know what the trouble is? I need that shelf to be very, very narrow. Not more than 5 meters wide. I can't seem to control it in any way... It seems that the cavern formed by lateral displacement is stuck at 30 meters deep and I turned my computer into a heater just to try and adjust it! :-\
Title: Re: Push vertical surface in
Post by: cyphyr on January 02, 2019, 05:20:05 PM
Compare with this one. Here the inset is only 5m but I have also reduced the falloff on the min and max height limits.

Another alternative method that may help is to use a Strata and Outcrop shader with 1 octave and octaves set to 1. Set the hard layer altitude to your desired height. See v3
Title: Re: Push vertical surface in
Post by: Dune on January 03, 2019, 02:47:51 AM
Ì would probably use a surface shader/distribution shader with altitudes sharply set and a vector displacement shader with a single white as input. You can control the angle pushed in.
Title: Re: Push vertical surface in
Post by: N-drju on January 03, 2019, 03:21:35 AM
These are good ideas and work to some extent but I still cannot nail one thing - I would like the "ceiling" to extend slightly beyond or exactly match the edge of the shelf below.

In your example Ulco, The upper edge of the indenture could be extended in order to form an overhang. This is what I also attempt. I tried to do it through an altitude-based displacement offset but the result is somewhat poor...

Alternatively, I also thought about using an elongated SSS and curve it with Redirect just like I did with the main terrain but it will be hard to control and adjust.
Title: Re: Push vertical surface in
Post by: Dune on January 03, 2019, 05:20:29 AM
For an altitude based displacement offset, you need a compute terrain. If you use redirect or vdisp, you won't. I like to do as much without compute terrains. You could set a minimum altitude as in my example (but as high as the max altitude for the dent) on another surface shader and have it vdisped out. Perhaps just locally, by masking it by big soft SSS.
Title: Re: Push vertical surface in
Post by: N-drju on January 03, 2019, 01:11:06 PM
Guys, I just played with both of your setups, but there is one significant problem that needs to be solved in Ulco's suggestion...

When I try to make a Surface Layer altitude-based shelf with a small (30 cm) fuzzy zone, what I get are these ugly transition zones on my mountain path:

[attach=1]

Of course I plan to add pebble and rock debris to cover it up but it looks very shabby anyway... Is there a way to smooth it over?
Title: Re: Push vertical surface in
Post by: N-drju on January 03, 2019, 01:38:13 PM
And while we're at it, do you guys have any suggestions on what should I do with the noise flavor of the lateral displacements (which I also use) on the planned rock wall? For now, they look like a complete columnar nonsense...

[attach=1]

Ahhh... Forget it. I get columnar displacements because I use "compute normal" instead of "compute terrain". :)

To be honest, I have a very scant knowledge regarding "compute" nodes, what they do and how patch sizes affect the terrain networks.
Title: Re: Push vertical surface in
Post by: Dune on January 04, 2019, 02:04:43 AM
You probably need to mask out the path for those verticals. And what I know about computes is that patch size makes some average, so the larger the faster and also rougher. In this case a small patch size would be good. If you want big terrains with large smooth snow fields a very big (50-100m) patch size often does wonders in displacement intersection.

Or get my mountain road setup at NWDA, which can do that with some adjustments  ;) I just happen to be making some U-shaped gully mountain path with some overhangs.
Title: Re: Push vertical surface in
Post by: N-drju on January 04, 2019, 03:06:35 AM
This vertical problem is no longer valid. Crossed-out as you can see.

But if you have some suggestions on what to do with this nasty, fuzzy zone effect on the path itself it would be nice. :)

I actually experienced this before when masking "twist and shear" by altitude. These transitions happen each and every time...
Title: Re: Push vertical surface in
Post by: Dune on January 04, 2019, 04:26:44 AM
There are some new settings regarding fuzzy zone computation, you might try to see if they do anything. And instead of color adjust use a smooth step (softer edged), but perhaps that's not used here.
Title: Re: Push vertical surface in
Post by: N-drju on January 04, 2019, 04:50:01 AM
Quote from: Dune on January 04, 2019, 04:26:44 AM
There are some new settings regarding fuzzy zone computation, you might try to see if they do anything.

What do you precisely mean?

As far as the path is concerned - you mean replacing "constant color" with "smooth step" as a vector function, yes?
Title: Re: Push vertical surface in
Post by: Dune on January 04, 2019, 07:04:24 AM
In the surface shader's effects tab; fuzzy zone better color... but I don't know if that would help.
And no; I mean if you need a colr adjust it's sometimes better to use a smooth step, as that has smoother transition. If you use a get altitude and want to have a soft zone, I'd prefer a smooth step.
Title: Re: Push vertical surface in
Post by: N-drju on January 04, 2019, 04:00:35 PM
After all, I decided to use a completely different approach to achieve what I want. Not because I don't know how, but because it seems easier and more controllable.

I made another SSS-masked surface shader to make the path. I made it a bit wider than the main elevated terrain, so that a 3-5 meter path is created all along the wall, then, I'll just curve it like the main wall with the same exact redirect that I used for the larger structure. The good thing about SSS-masked terrains is that they are always smooth as long as they have an edge profile. Even if it's just a few centimeters...

An overhang can be conveniently made with a well-masked lateral displacement and I will add it too.
Title: Re: Push vertical surface in
Post by: Dune on January 05, 2019, 02:20:01 AM
Good ideas. I'm curious what you'll come up with at the end...
Title: Re: Push vertical surface in
Post by: N-drju on January 05, 2019, 09:05:59 AM
I have a lot of determination to this project, so I am curious myself. ;)

Unfortunately, reusing the redirected terrain curves to mask out lateral displacement is too difficult to achieve. Once you shrink an SSS to about 35 meters (which is enough to do the mask-out) the SSS does not match the area of the path. This is due to the warping in the original redirect shaders and it is not suitable for a narrower SSS.

I will have to make a network of about 15 - 20 smooth-edged SSS to mask the desired areas... Not too bad I guess.

My only question though is...

Is there a way to "throw" the Simple Shape Shader color from a horizontal plane, rather than a default vertical plane? ??? Could be easier to operate SSS, but on the other hand the SSS would have to float in space, so I don't know...


[attach=1]

I just want to visualize the entire SSS network as a surface shader and only then apply it as a mask.
Title: Re: Push vertical surface in
Post by: Dune on January 05, 2019, 09:13:48 AM
The SSS is horizontal by default, so I don't think that would work. Have you considered painting a line by painted shader in your terrain?
Title: Re: Push vertical surface in
Post by: N-drju on January 05, 2019, 09:30:28 AM
Painted shader will leave out nasty, sharp edges on the edge of displacements, not unlike the transitions from distribution shader. Even with high falloff values. Camera is right next to them, so I wish to avoid that.

You see, the whole problem now is that I have two lateral displacements that do not "spoil" the mountainside path and two that do. I try to mask away the latter.

I could theoretically go with the two I already have. However, I like to have at least three LODs in terrain features. That's why I try to save the two smaller, wilder displacements, but it's not easy...
Title: Re: Push vertical surface in
Post by: N-drju on January 05, 2019, 03:18:00 PM
Here's what I have so far. No out-masking. I just changed fractal seeds to the least "intrusive" ones. The white on the right is due to an accidental surface shader that I forgot to disable and turned it off mid-render...

[attach=1]
Title: Re: Push vertical surface in
Post by: Kadri on January 06, 2019, 12:18:54 AM

Many ways to do the same things in Terragen.
Here i used the strange effect of the smooth option in the compute terrain node.
It kinda breaks the simple shape shader node displacement into 3 parts as you can see in the gif animation below.
You can get 2 flat surfaces this way.
The lower one is prominent as the road but the other higher one can be seen too in this example below.

Title: Re: Push vertical surface in
Post by: Dune on January 06, 2019, 02:32:20 AM
Kadri is right, several ways to get that sort of thing. Here's another quick setup. You can switch the smooth steps by the distribution shaders (then disable compute terrain) and see the difference.
Title: Re: Push vertical surface in
Post by: N-drju on January 06, 2019, 07:23:32 AM
More than three blue nodes and I'm out of the game. :-[

Yes, I noticed the same thing Kadri described but it sort of destroys my vision so it's not suitable for my lanscape.
Title: Re: Push vertical surface in
Post by: Kadri on January 06, 2019, 08:01:20 AM
Quote from: N-drju on January 06, 2019, 07:23:32 AM
...it sort of destroys my vision so it's not suitable for my landscape.

Just curious, in which way?
Title: Re: Push vertical surface in
Post by: Dune on January 06, 2019, 11:28:20 AM
QuoteMore than three blue nodes and I'm out of the game.
Come on, man, these are just 4 numbers, a get position in texture and two smooth steps (and the numbers and smooth steps are actually just replacements for color adjusts, but better). Nothing complicated. Just try it.
Title: Re: Push vertical surface in
Post by: N-drju on January 06, 2019, 01:57:26 PM
@ Kadri - Well, the smoothing option makes the entire wall smooth. That also means the path's area too. As a result I get a slanted, 20m wide path (made that way via smoothing) which disappears as a rounding error as soon as I try to contract it through a respective SSS (I need about 5-18 meter wide path mind you).

Also, the smoothing effect causes my main path to run at about 15m above the ground level (due to the triple division that you correctly observed) instead of the planned 50-70 meters of height. Not sure why... To be blunt, a fall from that path is supposed to be lethal... :D Death. Not just bruises. Of course, I can increase the displacement value of the surface shader but I just don't feel like it...

I'm not saying it is a bad solution. It is in fact a very good solution! Making interesting terrain and displacement features. It's just I don't quite see how I could implement it.

@ Dune - I know. Thank you so much Ulco. :-[ It's just that I'm confused as to where I should put it, connect it and how these values affect the entire thing...

I'm sorry if I recently entered in some kind of a defeatism mode. I don't know what's wrong with me...
Title: Re: Push vertical surface in
Post by: Kadri on January 06, 2019, 02:14:54 PM

LOL! I for one have no problem at all. Just trying to help and learn at the same time :)
Title: Re: Push vertical surface in
Post by: N-drju on January 06, 2019, 02:29:27 PM
Quote from: Kadri on January 06, 2019, 02:14:54 PM

LOL! I for one have no problem at all. Just trying to help and learn at the same time :)

It all depends on your artistic vision and what you already have in your scene. If you do it on an empty scene, sure - it is likely it is applicable in all circumstances one can think of.

Not so much if you already have three or more LODs to take care of and a narrow path that occasionally disappears / becomes too wide when you apply something. ::)

Don't get me wrong. I appreciate you waged in, and I'll be more than happy to keep this in my brain. It's just that it doesn't quite get along with the features I already have... Not to say it cannot be a feature some other time.
Title: Re: Push vertical surface in
Post by: Kadri on January 06, 2019, 02:42:26 PM

Applying anything from another scene can be hard in Terragen.
What works good in another scene is not easily transferable into another one all the time.
My sinkhole-tower scene setup that i shared here in the forum for example.
I had to try 2-3 times until i could use it in my last WIP animation.
And it is not the same unfortunately because of this and that reason.
So i can understand you and heck you don't have to use anything you don't want beside all the other reasons :)


Title: Re: Push vertical surface in
Post by: N-drju on January 06, 2019, 02:55:38 PM
Quote from: Kadri on January 06, 2019, 02:42:26 PM

Applying anything from another scene can be hard in Terragen.
What works good in another scene is not easily transferable into another one all the time.

So true. :-[

I just began to understand Ulco's setup. But there is a huge "leap of faith" that one needs to make to apply and adjust it in one's scene. And what it is?

You know the old saying - "Location, location, location". Knowing where to put it in the node network and in the world space is the actual and serious challenge! One hundred meters left or right and you are left with a "useless" node network...
Title: Re: Push vertical surface in
Post by: Dune on January 07, 2019, 02:13:16 AM
That's why I think it's always good to start from scratch (don't throw in big, and especially third party's, tgc's) and build up the main structures first, then start to define smaller elements.
The numbers, btw, are just altitudes. With each smooth step, you make a step; first  between 20 and 20.5m, so half a meter for a rather flat (it would be ugly if you make it zero, I think) bulge-in edge. In the upper it's a softer 25 to 30m step for the wall to bulge out again. And the warping makes it go up and down of course. You can even make some sort of stairway like this, with a distance shader set as warper/vdisp input.
Title: Re: Push vertical surface in
Post by: N-drju on January 07, 2019, 07:08:14 AM
Quote from: Dune on January 07, 2019, 02:13:16 AM
That's why I think it's always good to start from scratch (don't throw in big, and especially third party's, tgc's) and build up the main structures first, then start to define smaller elements.

I don't quite get your point. I am unable to add third party .tgc for just the reason that I started everything from scratch... ;)

Yes, I understand what the steps are for, but a little change is enough for a dimwit like me to destroy this setup. I just don't know if and where in my node network could I put your piece, given that I have a redirected curve for the hero land mass. This feature, consists from another five elements... You see what I mean?

I would have to find another redirect curve that would also bend your setup. And even if I did, I'd have no idea which of the nodes from your example should obtain that mask...
Title: Re: Push vertical surface in
Post by: Dune on January 07, 2019, 08:21:57 AM
Well, it's maybe not this file that doesn't have tgc's added, but I was speaking in general; just adding comprehensive tgc's is not always wise (smooth elemnt in it or so, that destroys all before).

Maybe you can add this warp/redirect after all your warps/redirects? Or yours after mine  ;) Can't tell without tgd.
Title: Re: Push vertical surface in
Post by: N-drju on January 07, 2019, 09:01:49 AM
Heh, I gotta determine it myself. From what I observe, redirecting SSS is suitable for only one size of terrain. Give or take 100 meters in width and it won't work with another feature. It might be time consuming to "plant" anything like that in a generally-ready landscape...

I admit - perhaps this network of yours is not as scary as it seemed at first. I still don't get two things though;

1. How do I raise an altitude of the path itself? In your example it runs at about 15 meters from the leveled area. What if I want it 80 or 500 meters above "zero" point? Shall I adjust some of them constant scalars? :-\

2. What about this nasty stretching that occurs on a path area...?
Title: Re: Push vertical surface in
Post by: Dune on January 07, 2019, 09:28:31 AM
Yes, adjust the scalars to new altitudes; the difference between each set being the corner itself, so to speak. So 50 and 50.5m will angle inward at 50m over a half meter of corner. Vdisping out again at say 60m ; just add 60 in the left input and maybe 65 in the max/right input of the smooth scalar, and you have a soft top to push out again.
Or use these values and add a transform shader (or two) to lift the whole thing. You could even add a constant vector with a Y input for lifting the get altitude. Needs an add vecor and constant vector.
The stretching can perhaps be overcome by adding another compute terrain or tex from XYZ shader, and add your small displacements and colors after it. You just have to try what works.
But maybe that's not even needed. Masking those areas for say gravel on your path is harder.
Title: Re: Push vertical surface in
Post by: N-drju on January 07, 2019, 12:29:18 PM
Quote from: Dune on January 07, 2019, 09:28:31 AM
Masking those areas for say gravel on your path is harder.

Here, you meant "easier" I hope? :D

Ok. I think adjusting the scalar values should do as a height control.
Title: Re: Push vertical surface in
Post by: cyphyr on January 07, 2019, 01:07:15 PM
Just thought of a potential "brute force" solution ... you could use a camera projected image.
Make a VERY large image of a white line on a blackground and project through an ortho camera at 90deg to the vertical.
It would probably need to be fed through a masked surface layer ...
Might help :)

Title: Re: Push vertical surface in
Post by: Dune on January 08, 2019, 02:21:00 AM
That would work. I did that once with painted stairs. But I wasn't overwhelmed by enthusiasm.
Title: Re: Push vertical surface in
Post by: N-drju on January 08, 2019, 02:34:38 AM
Quote from: cyphyr on January 07, 2019, 01:07:15 PM
Just thought of a potential "brute force" solution ... you could use a camera projected image.
Make a VERY large image of a white line on a blackground and project through an ortho camera at 90deg to the vertical.
It would probably need to be fed through a masked surface layer ...

Creative. ;) Perhaps it would need to have edges already smoothed-out in whatever graphics program you use, but apart from this, one may work with that.

The only problem lies within the fact that you will have to redo and re-save an image over again if it turns out poorly.

I don't think I'll have time to sit down to TG until at least weekend. Anyway, knock yourself out if you have any other thoughts or comments.