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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.