Page 1 of 1

Remap node

Posted: Tue Jan 21, 2020 7:28 am
by Egert_Kanep
Let's say I have a gradient with values from 0-10 and use remap node with input and output min0 max1. Is it going to limit the output gradient between 0-1?

Re: Remap node

Posted: Tue Jan 21, 2020 11:06 am
by B.Y.O.B.
Yes, because I implemented it with clamping: https://github.com/LuxCoreRender/LuxCor ... ap.cpp#L83
However, the formula performing the actual remapping might work without clamping: https://github.com/LuxCoreRender/LuxCor ... ils.h#L331

I can remove the clamping if you want.

Re: Remap node

Posted: Tue Jan 21, 2020 11:35 pm
by kintuX
B.Y.O.B. wrote: Tue Jan 21, 2020 11:06 am Yes, because I implemented it with clamping: https://github.com/LuxCoreRender/LuxCor ... ap.cpp#L83
However, the formula performing the actual remapping might work without clamping: https://github.com/LuxCoreRender/LuxCor ... ils.h#L331

I can remove the clamping if you want.
I believe it would be best, if it could be made as an optional on/off checkbox?

Re: Remap node

Posted: Wed Jan 22, 2020 5:33 am
by Egert_Kanep
If output max/min remaps the input to specified range then I don't see how clamping here would help anymore. It is just that sometimes I feel like remap node did not behave like I expected. It felt like sone values went under 0 and over 1, but I don't have any specific examples yet