1
$\begingroup$

I am trying to make a node setup where:

  • If the input is 0 or anything less it outputs 0
  • If the input is 5 or anything greater it outputs 5
  • If the input is between 0 and 5 it outputs the input

I can't figure out how to do this because 'greater than or equal to' and 'less than or equal to' are not options for the math node and the minimum and maximum nodes are only boolean and don't allow me to output the original number (if it is allowed).

$\endgroup$
3
  • $\begingroup$ What if the input is between 1 and 5 ? $\endgroup$
    – thibsert
    Commented Jun 1, 2019 at 23:48
  • $\begingroup$ @thibsert Sorry, my bad I got mixed up. Its if the input is between 0 and 5 $\endgroup$
    – Bobby G.
    Commented Jun 2, 2019 at 0:08
  • $\begingroup$ Greater than and Less than return Booleans, but Maximum and Minimum return values,no? $\endgroup$
    – Robin Betts
    Commented Jun 2, 2019 at 17:58

2 Answers 2

3
$\begingroup$

Maybe there is a better/more efficient way to do that, but the Clamp parameter should do the job : enter image description here

$\endgroup$
1
$\begingroup$

Maybe the clunky approach, to avoid floating-point ops and errors...

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .