Range Mapper as a C.O.F.F.E.E. Script
This post has already been read 2801 times!
Sometimes you may wish to control everything in one script, especially if you’re creating complex xpresso setup, too much nodes can get messy in xpresso editor…
That’s because I would like to share a small Cinema 4D C.O.F.F.E.E. Script doing the same job with default Range Mapper Node in Cinema 4D Xpresso.
var fixbug = ((Input_Upper - Input_Lower)/100);
var expres = ((Output_Upper - Output_Lower)/100)*(Input - Input_Lower);
if (Input_Upper == Input_Lower)
fixbug = 1;
expres = 0;
Output = expres/fixbug + Output_Lower;
Of course we need to create our C.O.F.F.E.E. node and paste this code. And also we should add Input_Lower, Input_Upper, Output_Upper, Output_Lower ports.