UE4 4.21 Material Editor BUG

Hi!

I’ve been using 4.19 for a big project I’m doing work for hire for and the studio decided to switch to 4.21.

Thing is, everything works fine EXCEPT, the material editor.
I’ve been working exactly the same way I was before and with the same materials and it worked perfectly previously.

Issues with 4.21:

First of all, materials are compiling REALLY and I mean REALLY slow, I have to wait at least a minute to compile simple shaders that in 4.19 took 5/6 seconds.

Second, when I make changes to any material, they won’t be visible in the preview mesh in the top left viewport, they take like two minutes to show up, in 4.19 that was almost instant.

Last thing, switch parameters are sort of messed up. On my end, the engine is crashing each time I do the following:

  • use a switch parameter in a material (false value as default)
  • compile the material
  • create an instance of that material
  • change the value of that static parameter in the instance to true (this will remove the parameters that are not connected to the true chain - like if the switch was actually working - except that it does not change anything and ignore it
  • a few seconds later the engine just crashes

I’d appreciate anyone who sheds any light in my path.

Thanks!

I would recommend starting by clearing out your Intermediate directory and your derived data cache. It’s possible that you have intermediate artifacts from shader compilation on 4.19 that aren’t compatible with 4.21. Very often when you encounter unexplained-seeming errors after an update, they’re caused by leftover build artifacts.

Hey good idea, I’ll try that today I’ll tell you how that goes thanks!

didn’t work :frowning: thanks for the idea though!

Shaders compiling slower is a result of changes in the engine between mentioned versions. And it is pretty terrible. I suggest that you properly report the crash though.

that’s exactly what I didn’t want to hear lol
I hope they fix that soon - insert have some faith meme here -

I’ve got exactly the same problem ! All works fine in 4.19 version but not on the 4.21.0 :confused:

I’m still having the issue, materials take about 3 to 9 minutes to compile it’s making me lose hours of work

Uninstall IncrediBuild, had the same problem and I’m happy to say this fixed it for me!

worked like a charm! thanks!