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"

Material compiling differently if put into a material function

I've run into an issue that I'm perplexed by - I'm trying to create a simple "range" material function, which works correctly when I use the math directly within my shader, but yeilds different and incorrect results when I extract it into a materialFunction node.

I'm not sure if I'm missing a setting somewhere, or if I'm making a really dumb mistake. (Or maybe this is just a bug). Either way, I'd greatly appreciate any assistance. :)

In the three examples below - the first image, with the math in the material directly, is correct: the colors should very quickly clamp out at 1. The second, using the material function with the exact same math (3rd) is incorrect.

Thanks! alt text alt text alt text

Product Version: UE 4.8
correct.jpg (278.3 kB)
incorrect.jpg (275.6 kB)
range_function.jpg (135.3 kB)
more ▼

asked Aug 04 '15 at 01:54 AM in Using UE4

avatar image

99 5 11 24

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi Keith -

So I did double check this just to make sure and it is working correctly. Your Material Function from the picture above does not have your Multiply connected into your output. It looks like the Add goes to both the A slot of your Multiply and the Output node.

Let me know if that doesn't correct the issue though and I will keep investigating.

Thank You

Eric Ketchum

more ▼

answered Aug 04 '15 at 06:36 PM

avatar image

Lovecraft_K ♦♦ STAFF
36.7k 702 260 735

avatar image keith.guerrette Aug 04 '15 at 07:48 PM

Oh man, that was a total newb mistake.... I guess it was a long night. Thanks so much for taking the time to answer!

avatar image keith.guerrette Sep 04 '15 at 08:57 PM

By the way, since i can't delete this thread from the archives, in case anyone runs across this, the above range function is totally wrong, so don't try to use it.

avatar image Nsomnia Sep 05 '15 at 12:17 AM

Accept someones answer and it will no longer be in "unanswered questions" and keeps things clean.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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