Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Problem with math in a material

Hello, ladies and gentlemen.

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

alt text

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: alt text

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: alt text

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.

Product Version: UE 4.21
mask1.png (1.0 kB)
mat.png (97.6 kB)
mat.gif (2.4 MB)
more ▼

asked Jan 06 '19 at 01:22 PM in Blueprint Scripting

avatar image

1.7k 11 7 8

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

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

more ▼

answered Jan 09 '19 at 09:49 PM

avatar image

16.7k 671 167 674

avatar image Tuerer Jan 09 '19 at 10:04 PM

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

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question