Planetside Software Forums

General => Terragen Discussion => Topic started by: FlynnAD on June 13, 2017, 09:04:38 PM

Title: Constant Shader node = Constant color?
Post by: FlynnAD on June 13, 2017, 09:04:38 PM
Hi all,

If a Constant Shader node (with a custom color like orange) is plugged into a PF, and the PF only has Apply High Color on (like green), so that the Constant Shader's color will pass through, and the PF is then plugged into the Color Function of a Surface Layer node, why does the Constant Shader NOT show up on the Surface Layer? Only green will show up, not any orange.

The Constant Shader DOES show up if you open up a local PF shader preview window, so it's a bit confusing why it does not render as such.

Conversely, if you make a second PF that has orange for High and Low color (e.g. making a solid, constant color PF), and plug that orange PF into the first PF (instead of plugging in the Constant Shader), then into the Surface Layer's Color Function, the orange and green both show up.

Am I incorrect in thinking that the Constant Shader is a constant color? I thought this would be faster to calculate than using a PF.

Thanks,
Matt
Title: Re: Constant Shader node = Constant color?
Post by: Dune on June 14, 2017, 01:49:00 AM
As far as I know, the alpha doesn't do much, and it's indeed a constant color (like the blue node constant color), and I never use it.
Title: Re: Constant Shader node = Constant color?
Post by: Oshyan on June 14, 2017, 02:33:53 PM
The setup you initially describe seems to work fine for me. See attached. What is different in your setup?

- Oshyan
Title: Re: Constant Shader node = Constant color?
Post by: FlynnAD on June 14, 2017, 04:24:55 PM
Ahh, that's it.

The Constant Color node is not the same as the Constant Shader node, and I was using the Constant Shader node.

Thanks Oshyan,
Matt
Title: Re: Constant Shader node = Constant color?
Post by: Oshyan on June 15, 2017, 06:10:37 PM
Is there just a "Constant Shader"? I think they're all named for what kind of output they have (Constant Scalar, Vector, etc.).

- Oshyan
Title: Re: Constant Shader node = Constant color?
Post by: FlynnAD on June 16, 2017, 12:26:26 PM
Quote from: Oshyan on June 15, 2017, 06:10:37 PM
Is there just a "Constant Shader"? I think they're all named for what kind of output they have (Constant Scalar, Vector, etc.).

Fair enough; you didn't know there was a Constant Shader; I didn't know there was a Constant Color node.

Right click/ Create Shader/ Surface Shader/ Constant.

My initial issue makes sense now, that you can't plug a Constant Shader into the PF's low-color and expect it to pass through. You can plug a Constant Shader directly below a Compute Terrain, while you cannot plug a Constant Color node directly beneath a Compute Terrain. Learn something new every day...

Matt
Title: Re: Constant Shader node = Constant color?
Post by: Oshyan on June 16, 2017, 03:51:36 PM
Hmm, yes,, but now that I look at the shader you're talking about (which I don't use much and had just forgotten about :D), it seems odd to me as well that it doesn't pass through since it does put out color info. I'll ask Matt (Terragen Software Architect) about it.

- Oshyan
Title: Re: Constant Shader node = Constant color?
Post by: cyphyr on June 22, 2017, 11:51:18 PM
Interestingly it (the constant colour) does pass through the empty low colour channel if the pf is plugged into the child layer input instead of the colour input...
Title: Re: Constant Shader node = Constant color?
Post by: Dune on June 23, 2017, 02:43:09 AM
Yes, it's a weirdy, alpha is not doing very much either, afaik.