Problem with math in a material
Hello, ladies and gentlemen.
I've created a simple texture for the opacity mask:
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:
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.
asked Jan 06 '19 at 01:22 PM in Blueprint Scripting
You need to disable sRGB in the texture's properties.
Check out this thread to find out why: https://forums.unrealengine.com/development-discussion/rendering/83933-rule-of-thumb-regaring-srgb-vs-linear-colors
Follow this question
Once you sign in you will be able to subscribe for any updates here