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"

Can i put condition on material scalar parameters

Suppose i have 2 scalar parameters say metal and rough. I want to put a condition like sum of metal + rough <=1 then only apply on material. How can i do that? And if sum is greater than 1 after incrementing one param then decrement other so that sum remains = 1. E.g metal is 0.7 and rough is 0.3, if i increase metal to 0.8 then rough should go to 0.2 automatically. Can i do such stuff???

Product Version: UE 4.18
more ▼

asked Apr 10 '18 at 02:11 PM in Blueprint Scripting

avatar image

1 1 1

avatar image EvilCleric Apr 10 '18 at 02:28 PM

In the material editor or in a BP?

avatar image vchillll Apr 10 '18 at 03:21 PM

Any will do, mostly it should be in material editor.

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

1 answer: sort voted first

i know of away to accomplish something similar which ill show in a picture below. there is a little bit of limitation in what i made and it could be expanded upon but basically the switch decides which is the more prominent stat and selects which set of nodes to use based on a bool parameter. the metal and roughness is just a scalar parameter to set the dominant value then a 1-x to set the other value. i made the values into a float two to make the script clean looking but this could also be done with two switches. hope this gets you on the right track

alt text

capture.png (187.9 kB)
more ▼

answered Apr 10 '18 at 02:58 PM

avatar image

8.9k 30 8 20

avatar image vchillll Apr 10 '18 at 03:29 PM

Not sure but looking at it, it wont handle case if metal+rough<1, it will consider 1-x value always.

(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