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"

Restore All Materials


Help me to restore all materials of my level.

alt text

I need termopary override all static meshes materials to single specific material, for example "Black"

Then restore all materials as it was before.

My blueprint works on actors with single material slot

This is hard to me when actors has many materials slots

Please, give me an advice how to solve this task.

Thank you.

Product Version: UE 4.20
more ▼

asked Sep 18 '18 at 09:00 PM in Blueprint Scripting

avatar image

26 3 6

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

3 answers: sort voted first

Perhaps you should look into material param collection instead.

Think of it as if it was a global variable that can be applied to many materials at once. Rather than replacing all materials and restoring them, you could use a single vector to change their look - turn them black, for example.

more ▼

answered Sep 18 '18 at 09:22 PM

avatar image

12.5k 71 24 51

avatar image brothermechanic Sep 18 '18 at 09:38 PM

Hm... Black - just for example

In real game this was radically different material

And my idea is don't change all material's shaders

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

From the top of my head, I would create a structure, which contain a variable that can reference to an actor, and 1 variable that can contain a list of material template. Then before you switch all mesh material to a single material, go through all the mesh, create a structure for each mesh to store mesh reference and that mesh list of material, store it into an array of structure and put it somewhere that can be access later. Then when you want to restore all the material, just simple go through all the mesh and all the structure again, create and assign correct material to correct mesh.

more ▼

answered Sep 19 '18 at 07:27 AM

avatar image

874 26 18 48

avatar image brothermechanic Sep 19 '18 at 08:23 AM

can you draw simple blueprint to describe this, please))) This is my level link text (LOOP level in level builerint)

loop.zip (1.6 MB)
(comments are locked)
10|2000 characters needed characters left

May be there is way collect and replace by every material on level, not by every actor?

more ▼

answered Sep 19 '18 at 07:00 AM

avatar image

26 3 6

(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