Planetside Software Forums

Support => Terragen Support => Topic started by: Erwin0265 on October 10, 2014, 07:19:00 am

Title: Raising a simple shape shader
Post by: Erwin0265 on October 10, 2014, 07:19:00 am
Hi all,
It's been a while since I've browsed the forums; basically, I felt I was getting nowhere (learning Terragen) and went back to Vue.........
Anyway, finally someone has created a series of tutorials that I can follow and perhaps learn something (fingers crossed).
So, I have been following the Geekatplay Terragen 3 tutorials and am currently trying to follow along to the "Lake View" tutorials (they're part of the "Exploring Terragen 3" tutorial set).
Near the beginning of the tutorial, Vlad uses a Simple shape shader to create a nice, flat area.
This is fine; no problem; I have a nice, circular flat area.....
But silly me wants to raise it a bit.....
There is a position setting in the shader preview window (x,y,z); so I increase the Y value from 0 to 100; nothing; to 1000; nothing; to 10000; nothing............
I can select the shader in the 3D preview window and bring up the gizmo (or whatever it's called in T3) and I can drag on the green arrow to my heart's content; but it doesn't do anything other than raise the upper "ring of dashes", but this has no effect (so why have it at all....?)....
There has to be a simple way to raise the leveling effect of this shader...................
But how do I do this?
Please remember, I'm an absolute noob at Terragen and although I did find a solution to this (http://www.planetside.co.uk/forums/index.php/topic,12659.msg126050.html#msg126050); it was so complex that I have to ask; surely there is a simpler way?
Why would we not be able to raise or lower a shader that levels an area of terrain (especially when there is a Position setting for it)?
Title: Re: Raising a simple shape shader
Post by: Oshyan on October 10, 2014, 04:12:25 pm
Go to the Displacement tab of the Simple Shape Shader and switch from "Displace relative to surface" (the default) to "Displace relative to shader position". That will allow the displacement "height" to be controlled by shader position. However it may not produce the results you want, depending on what you're actually aiming for. Alternatively you could try leaving it at Displace relative to surface (which will give a smoother, more contiguous result) and increase Displacement Amplitude. It is measured in Meters.

- Oshyan
Title: Re: Raising a simple shape shader
Post by: Erwin0265 on October 10, 2014, 07:09:13 pm
Hey Oshyan, thanks for the speedy response.
I tried all of your suggestions with zero effect; nothing I do moves that damn shader...............
I've attached a few screencaps, so you can see the settings (in case I misunderstood)............
Am I doing anything wrong?
Title: Re: Raising a simple shape shader
Post by: yossam on October 10, 2014, 08:17:56 pm
You need to check the box that says apply displacement.  ;D
Title: Re: Raising a simple shape shader
Post by: Oshyan on October 10, 2014, 11:48:56 pm
Indeed, as Yossam says. Also if this is derived from the Default scene, the Simple Shape Shader in that case is being used as a mask, so Displacement won't have an effect anyway. If you do have the Simple Shape Shader as part of the main Terrain shader chain, then it will work with the Displacement checkbox enabled.

- Oshyan
Title: Re: Raising a simple shape shader
Post by: Erwin0265 on October 11, 2014, 05:01:37 am
QuoteYou need to check the box that says apply displacement.  ;D
:-[ Oops.............

QuoteAlso if this is derived from the Default scene, the Simple Shape Shader in that case is being used as a mask, so Displacement won't have an effect anyway.
???
Remember - noob; I have no idea as to what you mean..
FYI; I created the terrain by first deleting the original terrain, leaving only the Fractal warp shader. Then I added a Power fractal/Fractal terrain.
The order of the terrain layers was changed to have the Fractal terrain first (along with it's accompanying Simple shape shader) and then the Fractal warp shader.
To be honest, I have no idea as to why the order needed to be changed (it was done that way in the tutorial but the explanation as to why was unclear  {Vlad is great in that he creates all of these tutorials for numerous apps, but he can, at times, be hard to understand; given the Russian accent and his tendency to mumble..}................

Anyway, after all is said and done; checking the displacement box had no effect either............
Vlad didn't address this issue at all as his Simple shape shader magically appeared at just the right height............
Any other suggestions regarding the Simple shape shader?
Title: Re: Raising a simple shape shader
Post by: Oshyan on October 11, 2014, 11:21:04 pm
Your Simple Shape Shader is appearing as a child of the Fractal Terrain 01, so it's most likely being used as a Mask. This just means that the Simple Shape is being used to control the area of effect of the Fractal Terrain; it is masking the effect of the Fractal Terrain's displacement. Masks are interpreted as black and white, where white is "full effect" and black is "no effect" for the shader being masked. In this case the Fractal Terrain shader's effect is to create displacement (mountains), so with a Mask, where the shader that is going into the Mask input is White you will have mountains and where it is Black you will have no mountains (flat, back to the default, undisplaced planet sphere). In the default scene however it's actually setup with the mask *inverted* (this is a checkbox in the Fractal Terrain's Mask settings at the bottom of its properties), and as a result where the Simple Shape is white (within the 5-sided, 10,000 meters-per-side area) will be *no* displacement (no mountains) from the Fractal Terrain shader, and where there is black from the Simple Shape shader (outside of the shape it defined) will be mountains.

Thus this is the long way around of describing that the flat area you're seeing is not the Simple Shape Shader *making* flat, rather it is the Simple Shape Shader *preventing* the Fractal Terrain shader from making mountains in that area, and thus you are seeing the flat surface of the default planet. *That* is why it is not being raised intuitively, because that flat surface is not being directly caused by the Simple Shape Shader's displacement, but rather because of its use as a mask. It is the *absence* of displacement rather than a subsequent *flattening* of a previously displaced area.

Also to be clear, the height and displacement amplitude of *any* shader have no effect when it is used as a mask because masks only interpret color, the Mask input ignores displacement.

So, long story short, if you want to displace an area controlled by a Simple Shape Shader and use its height or displacement amplitude to control terrain height, don't use it as a Mask for another shader. If you use the Add Terrain button and add another Simple Shape Shader and enable displacement, you should be able to get the effect you want, more or less. However be aware that it will not be inherently flat or smooth! It is applying displacement *on top of* the existing terrain shape created by the shaders above it. Displacement, from any shader, does not inherently create flattening.

To really get the effect of a flat area *within mountains* that you can control with the height of the Simple Shape Shader, I think you'd want to *copy* the Simple Shape Shader you already have, and add it to the node network in-between the Fractal Terrain and Fractal Warp Shader, then enable Displacement. The reason I say copy is so that both Simple Shape Shaders will have the same size and edge settings. The end result should be that you displace (raise or lower) the flat area that has been previously created by the other Simple Shape Shader that is being used as a mask.

OK, I hope that's helpful. :)

- Oshyan
Title: Re: Raising a simple shape shader
Post by: Erwin0265 on October 12, 2014, 07:01:00 am
Yes!
We have progress!
Putting the Simple shape shader in between Fractal terrain 01 and the Fractal warp shader appears to be having some effect.
However, I disconnected the original SSS as it appears to be having no effect (?)............
Now, I can control the height of the displacement (and the top is dead flat when using the "Displace relative to shader position" option) but can't get the edge to respond to any of the controlling parameters (Edge profile/width/units).

Separate question: what is "Position key"? I checked the Wiki but there's no explanation for that parameter..........
Another separate question: The preview window doesn't automatically render when a change has been made (it does sometimes, but less than 25% of the time); is there a quick/easy way to trigger a preview render? I've been clicking in the preview window (a habit from using Vue) and scrolling back and forth slightly (hoping not to change the camera location), but this is not really desirable due to possibly changing my camera location................

I again watched the Geekatplay tutorial showing this part of the process (ie. Creating a flat area for a lake) and he does actually talk about using the SSS as a mask; in fact, he uses the "Mask by shader" parameter in the Fractal terrain 01.......
And Terragen just crashed!
Guess who forgot to save at any stage of this project..............
Ahhhh crap!
Oh well; serves me right; BUT I must say; T3 has crashed on me 3 times in as many days (so you'd reckon I'd remember to save, wouldn't you?); I can't recall T2 ever crashing on me............... [v3.1 (build 3.1.02.0)]

Oshyan, I have to thank you for your persistence and willingness to help me (as well as many others); it may be part of your job, but you do it better than anyone in any of the various app forums that I have used/browsed over the past 5 or so years during my quest to learn 2D/3D digital art practices...........
Perhaps it isn't said enough, but I truly appreciate your genuine efforts to help me learn Terragen. Never lose that dedication; Planetside would be lost without you...........................
OK, enough with the mushy stuff; there's more learning to be done.
Again, I have attached a screencap to hopefully shed some light on what I am doing wrong....................
Whilst I wait for help, I will recreate the scene (if you can call it that; I've barely started and gotten stuck here) as best I can.
Thanks again.
Title: Re: Raising a simple shape shader
Post by: Erwin0265 on October 14, 2014, 05:14:20 am
I really don't want to give the impression that I am being impatient for help; I am quite content to wait for when someone has the time and knowledge to help; but I also wanted to be sure that it was clear that although there is progress, I still have a few issues to resolve before being able to go on with this project/tutorial.
I can't get the edge to respond to any of the controlling parameters (Edge profile/width/units).

I also had a few separate questions (if anyone has the time):
What is "Position key"?
The preview window appears to not automatically render when a change has been made (it does sometimes, but less than 25% of the time); is there a quick/easy way to trigger a preview render?

OK, that's it.
Hopefully, someone has the time to help me just that little bit further and then I can get back to it...............
Thanks.
Title: Re: Raising a simple shape shader
Post by: jaf on October 14, 2014, 11:56:39 am
You could click one of the icons in the preview window, like clouds on/off.  Click it to reverse it's state and a preview render should start.  Click it again and it will restart in the original state.
Title: Re: Raising a simple shape shader
Post by: Erwin0265 on October 14, 2014, 05:58:14 pm
Good idea, Jaf; thanks..........
Any ideas regarding getting the SSS edge to respond to any of the controlling parameters (Edge profile/width/units)?
That's still my main problem stopping me continuing with the tutorial/project...........
Title: Re: Raising a simple shape shader
Post by: Dune on October 15, 2014, 02:21:10 am
...
Title: Re: Raising a simple shape shader
Post by: Erwin0265 on October 15, 2014, 03:30:48 am
Hey Dune, thanks for your input.
I had a look at your tgd but it goes back to using the SSS as a mask (which is pretty much what Vlad does in the tutorial but with his example the height works fine [ie. he didn't need to adjust the height]; on mine it does not) which Oshyan told me I shouldn't do as I will have no control over the height of the flat area; which is what I am after.
From Oshyan's advice, I created another SSS [an exact copy of the one being used as a mask] and placed it in between the Fractal terrain and the Fractal warp shader.
This gave me control over the height of the flat area but I lost control over the edge profile/width/units.
I must also include the fact that I deleted the original SSS that was being used as a mask [so it was a child of the Fractal terrain; as in your tgd] as it appeared to be having no effect on anything; perhaps I was wrong..........
Anyway, I have attached my tgd for your perusal [not that there's much to it - I barely got started before I got stuck]...

To summarise; what I am basically after is both the ability to control the height of the flattened area as well as the edge profile so as to allow me to blend it into the existing Fractal terrain.
I also want to be able to control the size, of course, but that doesn't appear to have been an issue [ie. at least that works... lol].

An additional question (especially as you appear to have changed the default setting; what does the "Position key" parameter do?
I have also attached the warnings dialogue that popped up when I opened you tgd; it's probably just because our content is located in different places but I didn't understand most of it so thought I'd include it for a translation....
Thanks to all who have so far helped me; and will hopefully continue to do so
Title: Re: Raising a simple shape shader
Post by: Dune on October 15, 2014, 06:30:55 am
Something like this perhaps? No worries about the warnings, I work in another version.
Title: Re: Raising a simple shape shader
Post by: Erwin0265 on October 15, 2014, 09:40:37 am
OK, this is going to make you see just how much of a noob I am:
Your tgd opened fine but the preview is just plain bizarre!
This may be the result of T3 to T2 or vice-versa; I have no idea - but the camera focal length was 2mm.
I changed it to 35mm but the preview was still very stretched.
I created another camera and linked that to the renderer but it was still distorted.
So, I have yet to see what you have done; other than in the (sorry, no idea what it's called) top left hand window where I can see you've added a Surface layer node (I have yet to read the description of the node  as I have not come across it before)....
I have attached a screencap of the strange preview as well as a render of same (for what it's worth); this is exactly how the file opened - I can't imagine you would have saved it this way.........
Although it's probably an easy fix for anyone who has a clue; unfortunately, I'm not one of them............
Title: Re: Raising a simple shape shader
Post by: Dune on October 15, 2014, 12:10:36 pm
Well, they were your settings. Better start with a fresh scene....
Title: Re: Raising a simple shape shader
Post by: Erwin0265 on October 15, 2014, 06:02:11 pm
Hi again, Dune.
Thank you for persisting with me; it's very much appreciated.
OK - it works! I'm sure that's no surprise to you [other than, perhaps, me getting it to work - using your tgd of course].
So I copied your settings into my tgd and played around a bit; funny that this method doesn't really produce a distinct circle or square, etc; but then, I wanted it to blend in anyway.
Kind off a bit annoying that the Geekatplay tutorial didn't even mention this as a possible issue (height of the flat area for the lake to come). But, oh well, I guess we can't foresee every possible outcome; especially with Terragen - there are just so many different ways of doing the same thing.
Anyway, I have attached the resultant tgd as well as a test render of the same for any other noobs who may end up with a similar issue (especially if they view the same tutorials - and hopefully know to come here for help).
I have also attached a screencap of my original tgd settings (as posted here earlier) and your tgd which should have the same camera settings (mine is on the left/larger monitor); as you can see, they are very different.
I wonder whether it's possible that going from T3 to T2 and back to T3 again could have done this?
I assume you're still using T2 as you mentioned using a different version..........
It's not a big deal; it just may come up again with other file sharing scenarios.

So, thank you very much,Dune; you've got me back up and running.
Also thanks to others who helped, especially Oshyan.
I'm sure I'll be back in the not-too-distant-future with another sticky question...........
Title: Re: Raising a simple shape shader
Post by: Oshyan on October 15, 2014, 08:02:40 pm
Erwin, I'm glad you were able to get it figured out, and thanks to Ulco (Dune) for contributing very helpfully. I do want to get some more info for you on why certain things behave the way they do, but for now I'm just happy you have a solution. :)

- Oshyan
Title: Re: Raising a simple shape shader
Post by: Erwin0265 on October 15, 2014, 08:32:36 pm
Thanks, Oshyan.
It would be great to have more info regarding why things work the way they do; it really is the only way to learn and to be able to create.
Anything else is just learning by rote and results in extremely limited creative possibilities.

For some reason, the items I attached in the last post didn't come through so the forum "pixies" have already attached them again for me.............

OK...........it appears that my last post didn't actually come through at all!
I found another way to do this; it's much simpler and also uses the same steps as shown in the tutorial.
Although I can't raise or lower the SSS, I can raise and lower the fractal terrain relative to the SSS!
So if I want the flattening effect to occur lower, I simply raise the fractal terrain (Displacement offset in the displacement tab)....
The attached tgd should clarify (for any other noobies who may end up with the same problem - especially if viewing the Geekatplay Terragen tutorials).
Title: Re: Raising a simple shape shader
Post by: jo on October 21, 2014, 02:47:08 am
Hi Erwin,

The reason for the "wall" around your circle in the LakeView1.tgd example is that you're using displacement relative to the shader position. This is explained in the Simple Shape Shader documentation:

http://www.planetside.co.uk/wiki/index.php?title=Simple_Shape_Shader_-_Displacement_Tab

Regards,

Jo
Title: Re: Raising a simple shape shader
Post by: Erwin0265 on October 21, 2014, 06:33:35 am
Hi Jo,
I set it to displacement relative to the shader position as this was the only setting that gave me the flat surface I was after.
With the help of Oshyan and Dune, I managed to get what I was after - just don't ask me to do it again without rereading all of the advice as well as watching the relevant Geekatplay tutorial again... ;D

I'm sure I'll get stuck the next time I'm trying for a flattened area; at least I know that I'll have this thread to refer back to and get me going again.
I truly believe you learn far more when you have problems than when everything goes smoothly.............
Title: Re: Raising a simple shape shader
Post by: choronr on October 30, 2014, 10:48:34 pm
This reminds me of a recent issue I had where I needed to sink the tires of a truck into a muddy surface. Six ways to Sunday, I couldn't do it. With the help of Dune, I was able to resolve the issue by his suggestions and illustrative file: "raise the terrain".
Title: Re: Raising a simple shape shader
Post by: Erwin0265 on January 26, 2016, 06:47:59 am
Well, I'm back working with Terragen (as I generally do during the hot summer months on days when it's just to hot to do anything outside) and am redoing some of GeekAtPlay's tutorials/projects to refresh my memory (what there is of it).......
I had intended on continuing with TG throughout last year but got rather ill and had to have emergency surgery; along with a 6-month recovery..............
Anyway, back to what's important.............
Again, I got stuck with raising/lowering the SSS and so found my way back to this post to refresh my memory.
The only additional reply after I "had it all worked out", is from you, Choronr......... (Yeah, I know; this thread is getting a little old but it can't hurt to try).
If you happen to still have notifications checked for this thread, you may receive this.......
In that hope, could you direct me to Dune's illustrative file, "Raise the terrain", please?
I've tried a search but that resulted in nil, nada & nothing (I'm as good at searching these forum threads as I am at TG itself...  ::))..
So, back to the tutorials........
NOTE: Please excuse any typos that I have missed; I really need a new keyboard (Mine is one of the first illuminated KB's, Logitech G15 and the paint has worn from many of the keys, making them "mystery keys". It may be a gaming KB but I have only ever used it for digital art as I like to keep the area around my monitors dimly lit to make what I see on the monitors clear and unobscured.........)
Title: Re: Raising a simple shape shader
Post by: Oshyan on January 26, 2016, 01:30:54 pm
I'm not clear on what the problem is now. Your last post said you had it resolved? Perhaps Ulco can find this "raise the terrain" file...

- Oshyan
Title: Re: Raising a simple shape shader
Post by: Dune on January 27, 2016, 02:22:08 am
I don't know. But if you explain what the problem exactly is, I'll have a look. By the way; Choronr (Bob) has sadly passed away last year.
Title: Re: Raising a simple shape shader
Post by: Erwin0265 on January 28, 2016, 05:41:47 am
Oh...........
I had no idea; I had realised from a post I read last week that Bob was the same age as my mother and we almost lost her over the Christmas period due to a simple fall in the bathroom which lead to  subdural and extra-dural haematomas (brain bleeds), due to her age. In other words, life gets so very fragile at that age..............
However, I do believe that Bob will be alive for many on these forums due to his many posts as these don't [fortunately] pass when the author does...........

Lastly, I don't have a problem; I simply looked up this post again (which I have now copied into a Word doc) as I had predictably forgotten how to raise a SSS, and I noticed Bob's post regarding his issue getting wheels to sink into mud and was helped by
Quote"With the help of Dune, I was able to resolve the issue by his suggestions and illustrative file: "raise the terrain". "

So I was curious and wanting to see the mentioned "Raised the terrain" file.
It's no big deal; just curiosity...........
If I have upset anyone, it was most definitely not my intent and I sincerely apologise if my post did upset anyone..........
Title: Re: Raising a simple shape shader
Post by: Dune on January 28, 2016, 05:48:28 am
No problem, if you're not daily here, you may miss things. Good luck.
Title: Re: Raising a simple shape shader
Post by: Erwin0265 on January 28, 2016, 09:40:09 pm
Thanks.....