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"

Material Bool in Collection Parameters/Material Function?

Maybe I missed something but is there a way to connect a static switch to a collection parameter or change it by code/blueprint in a material function (not a single instance, all at once)?

It would be nice to toggle some effects like displacement for walls or something like that or even switch between a cheap and a expensive node tree without editing each material to adjust the quality switch. I want to achieve the most optimized performance for the final in game settings so it would be a lot of work in my opinion to tweak the performance by using quality switch.

It would also cool to use for some effects, like a super vision (looking through walls, thermo vision...) or something like that.

Are there any plans for such a feature?

Thanks in advance, NaMJaG

Product Version: Not Selected
Tags:
more ▼

asked Sep 29 '14 at 10:36 AM in Rendering

avatar image

NaMJaG
61 2 4 9

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

1 answer: sort voted first

Hey NaMJaG -

Static Switches are primarily used for Material Instant Constants (created in the Content Browser). So you could create two material instant constants based on a master material controlled by that static switch, then change the Material Instance Dynamic (MID) in a Blueprint to be MIC #1 then MIC #2 through a Set Material node in Blueprint.

Let me know if you need further explanation -

Eric Ketchum

more ▼

answered Sep 29 '14 at 08:15 PM

avatar image

Lovecraft_K ♦♦ STAFF
36.7k 702 260 736

avatar image NaMJaG Sep 30 '14 at 11:44 PM

Ah static switches require a material instant constant resulting in a new shader. So even if I could control a static switch of more than one material at once through a Collection Parameter or a Material Function it wouldn't have any effect because the shader doesn't recompile. A simple "if" node combined with a collection parameter is the best way to toggle effects in game on a bunch of materials in one step, but when it comes to rendering it calculates the whole tree so there wouldn't be any performance changes if I toggle effects with a collection parameter.

Now I think I understand how the static switch really works (or am I wrong?)

To make it easier to tweak the performance and toggling effects I would need a feature to edit a static bool parameter in all selected Material Instant Constants. (If I open multiple material instances at once (select them + press enter) I am able to change font, scalar, texture and Vector parameters in one step by adding them to the list and changing the value but I can't change booleans)

I think editing multiple material Instances at once sounds like something I could achieve with a plugin or maybe there will be an update witch improves the possibility of editing multiple material instances in the generic editor.

For in game changes I'll use this super awesome collection parameter system.

Thanks for the help!

(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