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 Node Performance: Multiply vs Lerp vs Switch

Hey there! :D

Just a simple performance Question, but in my example, is is very important.

I have two Materials for my trees. One for the leaves, one for the trunk. Then I have lots of instances of each material. In this case, i use my leaf material for the leaves and for the Billboard LOD at verry far distance. And i just would like to have the possibility to disable wind in the Material Instance. I got 3 options:

Use a "Multiply" Node. Wind multiplied by 0 results 0.

Use the "Lerp" Node and Lerp between the Wind an 0.

Us a "static Switch" with a "static Bool" Node and compare between the wind and 0. (I know, it creates a new material by switching, but does it also create one my multiplying by 0?)

And also: can I save some performance by disabling Wind this way?

What sould I use, from what can i get the most performance out of it? Thanks!

Product Version: UE 4.15
more ▼

asked May 03 '17 at 06:37 PM in Using UE4

avatar image

8 4 7 8

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

1 answer: sort voted first

If you use multimply out lerp sistem aniway calculate all nodes you got in wind. If you use a switch node our switch parameter and in false set value to 0 our 1 depend what you want to be default value, it dont process the calculation until the condition become true. So you can make a realy complicated master material with alot of switch, and make them like parameters and with a mater material enable our disable what you need in different material istances, and it use minimum ammout of calculation in function what you enable.

I got a realy complicated master material that can arrive to more that 1000 calculation but if I got all disable it making 80 calculation

to see the difference

  • set a switch parameter

  • make a istance of your material (right click on material Create istance)

  • Double click your istance

  • After it calculate default material you got up on left side on the preview how much istruction your pc need to calculate to make this material

  • Now enable the switch and see the difference

more ▼

answered May 03 '17 at 08:45 PM

avatar image

MK Studio
636 16 7 31

(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