x

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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How much performance cost for adding many material parameters such as normal intensity, macro variation, etc

Is it considered alright to have a huge, all encompassing master material, even if most features are disabled with switches? If a switch is off, does all performance related to the features go away?

For example:

False -> use only texture

True -> Looooots of stuff

If set to false, is performance better or does material still compute all nodes?

A regular material with only 3 textures has:

Info Base pass shader with static lighting: 122 instructions Info Base pass shader with only dynamic lighting: 94 instructions

While a fairly large material I made has:

Info Base pass shader with static lighting: 140 instructions Info Base pass shader with only dynamic lighting: 114 instructions

Is this a large difference?

Product Version: UE 4.15
Tags:
more ▼

asked Feb 21 '17 at 09:49 PM in Rendering

avatar image

vanlacke
1.5k 65 132 103

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

1 answer: sort voted first

Haha you should be fine for 140 instructions. As a rule once the instructions pass 300 on a master material you should start worrying.

Having a big master material means the game only needs to load it once, and then the material instances will take what they need from that loaded material. It's the same logic for texture atlasing; you have one big texture for multiple materials that are often loaded in together, to save on space and processing power. At the same time it's a bad idea to cram everything into one super big material with 600+ instructions, cause either load times will be astronomical, or your GPU will bottleneck.

So basically make a master material for each major material 'type' in your game, eg. standard Lit, POM, transparent, tesselated, ect, and then use material instances for variants. That way you can have a balance between complex shaders and GPU performance.

more ▼

answered Mar 19 '17 at 06:53 AM

avatar image

Huxskey
31 1 4 5

(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