Quote from: james adamson on February 05, 2020, 04:08:30 PM1.Why have you used complement scalar and not complement colour? What is the difference between the two?
We only need a scalar to mask displacement. Plugging in a colour also works just fine, but it's not necessary. Terragen's node network will happily switch between colours and scalars, but because shaders output colour that's what you'll see used as a mask most of the time. Scalars
might be slightly quicker in some cases, but you'll only notice it if you have really complex networks of function nodes. If you're building complex function node networks it may be useful to think about this distinction.
Quote2.Why would negate colour not do the same job?
"Negate" and "complement" are kinds of inverse, but they're different. Negate turns positive values into negative values (e.g. 0.5 becomes -0.5), but we want the mask to contain values between 0 and 1. We want x to become 1-x. In Terragen's language that is called the complement. We don't call it "inverse" because that is yet another function which is defined as 1/x.
Quote3.So can I feed a mask output into any function input?
Yes. Some function inputs expect a colour, some expect a vector and some expect a scalar. But you can plug any kind of function or shader data into these inputs and it will convert to what it expects using a set of rules. The rules are designed to make it easy to use data from different sources without needing special conversion nodes, but if you want to know the conversion rules they are here:
https://planetside.co.uk/wiki/index.php?title=Node_Input_Type_ConversionQuote4. And this is more general, if I then wished to add detail to the sides of my gorge, would I do a compute terrain before doing so?
Yes.
QuoteAnd as your setup as I understand it raises everything around the mask what would be considered the zero ground plane before compute terrain and after compute terrian.
I didn't know what you'd want to do with the surrounding area, but I based the setup on the idea that the terrain would be at 0 near the bottom of the gorge and at the "outlet" which I imagined in your description. And I imagined it carving out of a higher plateau. But I didn't take care of what would be behind the camera. You may want to chain multiple Simple Shape Shaders together to extend the 0-elevation area. Or perhaps it needs a different setup altogether.