Planetside Software Forums

Function Nodes In Practice => Function Node General Discussion => Topic started by: pclavett on August 29, 2020, 09:52:38 am

Title: Any way of producing gradients with blue nodes ???
Post by: pclavett on August 29, 2020, 09:52:38 am
I was trying to see if you can make a gradient with the blue nodes ? So could you say that anything less than 100 on the x scale is white and anything above 400 on the x scale is black...... and anything between 100 and 400 a gradient from white to black ? I was wondering if it is possible with blue nodes to set up such a gradient....... The only thing I have been able to obtain so far is black above 400, white below 100 and a mid-gray (50%gray) between the two !!!
Of course I have very little knowledge of what I am doing..... so not surprising !
If someone can nudge me the right way this would be appreciated !
Then again, what I am looking for may not be possible and if so...... knowing so will save me time as well !
I thank you all for your patience !
Take care !
Paul
Title: Re: Any way of producing gradients with blue nodes ???
Post by: Dune on August 29, 2020, 11:31:17 am
You should start with get position in texture, then X (or Z) to scalar, and then a smooth step for the gradient, with inputs in meters.
Title: Re: Any way of producing gradients with blue nodes ???
Post by: sboerner on August 29, 2020, 12:26:34 pm
I see Ulco beat me to it, but here is a setup I've used. Works for inclined plane displacements, too.

Ulco, what't the benefit of the smooth step node?

Edit: Use a transform shader to position this where you need it.
Title: Re: Any way of producing gradients with blue nodes ???
Post by: WAS on August 29, 2020, 01:44:26 pm
Indeed, and if you need a radial gradient without the falloff issue of the SSS shader, you can multiply the get position in texture shader by a small number (for radius) and than a smooth step on a X to Scalar.
Title: Re: Any way of producing gradients with blue nodes ???
Post by: Dune on August 30, 2020, 01:41:49 am
It's easier to get the gradient that you want with a smooth step, and where you want it. You can also use a PF in each input for variable gradient 'ends'.
Title: Re: Any way of producing gradients with blue nodes ???
Post by: pclavett on August 30, 2020, 12:32:33 pm
Thank you all for these suggestions and pointers !
Hard at work learning !
Your help is appreciated !
Paul
Title: Re: Any way of producing gradients with blue nodes ???
Post by: Hetzen on August 30, 2020, 12:49:00 pm
A Distance Shader with the correct fall off attached to a reference Camera will also work.

Adding to what Ulco is suggesting with the Smooth Step, you can also wobble the X input with a PF.
Title: Re: Any way of producing gradients with blue nodes ???
Post by: WAS on August 30, 2020, 01:03:43 pm
Though may want to use a Get Position in Texture if you plan on making alterations.
Title: Re: Any way of producing gradients with blue nodes ???
Post by: Dune on August 31, 2020, 02:48:16 am
That's what I said in my post, as that's what I always use, exactly for warping, and stuff. The variable inputs, as Jon mentions, I often use too. Use meters for colors, and think of the sizes as distribution of those 'color' values.