I’m working with my first material (this is the first time I work with Unreal Engine)
I have a scalar parameter that will accept values from -4 to 100, and I want to avoid 0 values.
Maybe a need a function to avoid 0 values. For example, If value is -4, it will return 1, and from that value, the function will return lower values until zero.
Are you saying it goes from -4 to 100 or from -4 to -100?
Are you saying you want to enter positive values to change the negative values?
After reading your post a few times we need a little more info to get you sorted.
I need this function to set a value to set emissive effect value in my material. Now, I have a parameter, and I want a function to convert a value between -4, 100] to [0, 1].
I see.
So what you want is a slider in a material instance to have your range of -4 to +100 correct?
You actually don’t need any fancy math for that.
Multiply your emissive by a scalar
In the scalar set the max slider range to -4 and 100