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"

Location Mask - Affecting Multiple Materials

Hello everyone,

I am a programmer who has been getting into U4 Materials lately.

That said, I worked on making a pretty cool location mask material last week, and it is working great, but I need this material to affect every mesh on my scene, including meshes that have a different material or list of materials and I do not want to replace their original materials.

So, while I know I can create and apply a material instance to every mesh on the scene through Blueprint/C++, this would simply replace their current material or materials with the mask material, which in turn makes those meshes lose their original base color, normal maps, metallic, etc... and that won't do.

I also know I can actually set this up if I turn the Mask material into a material function, and then go into each different material and implement it from there, but for the purposes of this question, please assume that is not an option, I want to find a dynamic solution that would let me get the results I want without having to manually add a material function to each material that has already been created.

To summarize, how could I have a Location Mask Material's Mask affect all materials within a level without adding a material function to each one of those materials.

Any answers, help or advice would be truly appreciated.

Thank you.

Product Version: UE 4.15
Tags:
more ▼

asked May 04 '17 at 02:00 PM in Rendering

avatar image

*Gio*
31 3 6

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

1 answer: sort voted first

Short answer: You can't.

Long answer: You can modify the shader files and add your function to default material template, while doing respective changes on the code side to update mask parameters, but it is likely to be not worth it.

more ▼

answered May 09 '17 at 07:02 PM

avatar image

Deathrey
7.7k 129 29 290

(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