Any way of producing gradients with blue nodes ???

Started by pclavett, August 29, 2020, 09:52:38 am

Previous topic - Next topic

pclavett

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

Dune

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.

sboerner

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.

WAS

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.

Dune

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'.

pclavett

Thank you all for these suggestions and pointers !
Hard at work learning !
Your help is appreciated !
Paul

Hetzen

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.

WAS

Though may want to use a Get Position in Texture if you plan on making alterations.

Dune

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.