# 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 !