Author Topic: Constant Shader node = Constant color?  (Read 515 times)

Offline FlynnAD

  • Member
  • *
  • Posts: 73
Constant Shader node = Constant color?
« on: June 14, 2017, 01:04:38 AM »
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

Offline Dune

  • Member
  • *
  • Posts: 12730
  • Corkscrew Bird
    • www.ulco-art.nl
Re: Constant Shader node = Constant color?
« Reply #1 on: June 14, 2017, 05: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.
In case you still haven't seen enough of my work: www.ulco-art.nl

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 11746
  • Holy snagging ducks!
Re: Constant Shader node = Constant color?
« Reply #2 on: June 14, 2017, 06:33:53 PM »
The setup you initially describe seems to work fine for me. See attached. What is different in your setup?

- Oshyan

Offline FlynnAD

  • Member
  • *
  • Posts: 73
Re: Constant Shader node = Constant color?
« Reply #3 on: June 14, 2017, 08: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

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 11746
  • Holy snagging ducks!
Re: Constant Shader node = Constant color?
« Reply #4 on: June 15, 2017, 10: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

Offline FlynnAD

  • Member
  • *
  • Posts: 73
Re: Constant Shader node = Constant color?
« Reply #5 on: June 16, 2017, 04:26:26 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

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 11746
  • Holy snagging ducks!
Re: Constant Shader node = Constant color?
« Reply #6 on: June 16, 2017, 07: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

Online cyphyr

  • Member
  • *
  • Posts: 3553
    • richardfraser
Re: Constant Shader node = Constant color?
« Reply #7 on: June 23, 2017, 03:51:18 AM »
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...
www.richardfraser.co.uk
/|\

i7 5930 @3.5Ghz, 32Gb
i7 2600k @3.4Ghz, 16Gb
i7 980 @3.33Ghz, 16Gb

Offline Dune

  • Member
  • *
  • Posts: 12730
  • Corkscrew Bird
    • www.ulco-art.nl
Re: Constant Shader node = Constant color?
« Reply #8 on: June 23, 2017, 06:43:09 AM »
Yes, it's a weirdy, alpha is not doing very much either, afaik.
In case you still haven't seen enough of my work: www.ulco-art.nl