Problem with math in a material

Hello, ladies and gentlemen.

I’ve created a simple texture for the opacity mask:

264369-mask1.png

In it, the squares’ colors go from 0 to almost 1 with the difference of 1/16 or 0.0625. Then I’ve created a simple material:

The Sub Parameter has the value of 1, so the subtraction result is 0 at the beginning. What I do next is start slowly decreasing the Sub parameter for it to finally get to 0. At every point of time the squares whose color value is more than the Sub value turn into 1 because of the Ceil node and so these squares become opaque (opacity clip value is set to 0.99). This part works fine, but I would normally expect the squares to appear uniformly; if I use a timeline with a straight curve to change the Sub parameter from 1 to 0 in 2 seconds, I’d expect the squares to appear once every 1/8 of a second. But what in fact happens, the squares start appearing slowly and then accelerate, like this:

264382-mat.gif

So why does this happen? The color difference is the same and the parameter is changed uniformly. Where does this acceleration come from?

Thank you in advance.

You need to disable sRGB in the texture’s properties.

Check out this thread to find out why: rule of thumb regaring sRGB vs linear colors - Rendering - Unreal Engine Forums

Thank you! I would’ve never thought to do that myself. That works perfect.