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"

UE freezes when saving a material that is related to current shader compiling

I changed some bools in my MICs and added some more parameters in my material parameter collection which resulted in heavy shader compiling, something like 26000. While shader compiling I changed the base material and saved that which resulted in UE4 freezing and locking me out. But in the task manager I can still see ShaderCompilerWorker doing their shader compiling.

Product Version: UE 4.8
more ▼

asked Jul 17 '15 at 02:49 PM in Bug Reports

avatar image

930 100 147 199

avatar image Lovecraft_K ♦♦ STAFF Jul 20 '15 at 03:00 PM

Hi Davision -

Thank you for your report. We have assigned this issue to a member of our support staff, and they will begin investigation as soon as possible. If we are unable to reproduce the issue, or we need additional information, our staff member will comment here with additional questions. Otherwise, we will post an ‘Answer’ once we have logged the issue in our bug database or we have a solution for it.

In the meantime, please be sure to review our suggestions for how to report a bug, and feel free to edit your post if you have additional information to provide: https://answers.unrealengine.com/questions/12363/how-do-i-report-a-bug.html

Thank you -

Eric Ketchum

avatar image AndrewHurley Jul 20 '15 at 05:53 PM

Hey Davision,

Would you elaborate on the acronym MICs? Material Instance Constant?

If you are compiling shaders for a material that is referencing a master material, it is recommended you wait till the shaders have finished compiling before attempting to edit the master material. It other words, changing the child of a parent, applying the shader changes, and then editing the parent at the same time is going to cause your materials to need to re-compile again.

This is why you were able to see the processes still running even though your editor was frozen. Another question, how complex is the material your are attempting to save and apply the changes?

Would you also mind providing me with your computers 'dxdiag'?

Thank you,

Andrew Hurley

avatar image Davision Jul 20 '15 at 07:18 PM

I don't even have to click compiling for it to recompiling. When I add a new material parameter in the material parameter collection it instantly starts compiling 6000 shaders. Now if I add another parameter it adds another 6000. So I now have to wait for 12000 to compile. To be me it seems the automatic shader compiling is rather stupid. Like in that described case it compiles the shaders twice, the base shader + the childs (material instance constants) x2. Since I'm now at 38 material parameters in the collections and ca 90 MICs you can imagine that this rather simple shader compiling took in total hours. All for 1 actual material/shader that is not complex, only complex if a static bool for every of the 38 material parameter of the collection is complex (I have 38 rivers now and each needs its own parameter they also have different segments that need different MICs)

Is there a way to abort shader compiling or reset shader compiling or turn automatic shader compiling off? It also bugs me with the terrain painting where it was constantly recompiling for the different terrain components and that also with very high counts.

link text

P.S. Currently waiting for 46000 shader to compile.

dxdiag.txt (27.4 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hey Davision,

I found within the documentation the location to turn off automatic shader compiling. Turn off the Live Update option within the Material Editor and your issue should clear.

Live Nodes and Live Update


alt text

I would also take a look at the Material Parameter Collection documentation as it has some useful information on its limitations in case you run into an issue there as well.


Andrew Hurley

more ▼

answered Jul 21 '15 at 08:46 PM

avatar image AndrewHurley Jul 21 '15 at 08:54 PM

I also found this within the Material Parameter Collection doc.

Limitations and Performance Characteristics

"A Material can reference, at most, two different MaterialParameterCollections. One is typically used for game-wide values while the other can be used for level specific parameters. A collection can have up to 1024 scalar parameters and 1024 vector parameters.

Modifying the number of parameters in a collection will cause a recompile of all Materials that reference that collection. If you need to add numerous parameters, it can be faster to add a lot of parameters up front in an empty map.

If you rename a parameter, any Materials referencing that parameter will continue to work as expected. However, any Blueprint referencing that parameter will now be broken. You must reassign the ParameterName of the Blueprint function which operates on the collection to fix this.

Updating values in a MaterialParameterCollection is much more efficient than setting many different parameters on various Material instances."

avatar image Davision Jul 25 '15 at 01:25 PM

I have those settings usually turned off but that trick with the material parameter collection is really helpful. Another issue with it I found that it sometimes even recompiles when I simply open a material instant constant. For that river master MIC that is 9000 shader compiling again without any apparent reason.

(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