Compiling Shaders Everytime

Yesterday while I was saving my project the GPU crashed and Unreal Engine closed. Ever since every time I open my project it Compiles the Shaders for about a minute.

When I package my project and run the game without editor, it does not compile shaders but still annoys when I open the editor.

Is my project gone corrupt or is there any way to fix this?

Hello tongucci,

From what you describe it sounds as if there is some residual information that was carried over before your GPU crashed. Now when you open your project, UE4 has to calculate what was in your scene.

Make a copy of your project before doing this.

Delete your Intermediate, Saved, and Derived Data Cache directories from your project. This will force the editor to rebuild things like your shaders from scratch. It will rebuild when you open it the first time. Let that finish and save the copy of your project. Then close and reopen your project and see if that fixes your shaders compiling.

Hello ,
I did exactly as you explained. Then it took about half an hour to open the editor the first time. When it opened it didn’t compile shaders and worked fine. But when I saved, closed and reopened the project it opened fast but again compiled shaders.

Would you provide your DxDiag please? I would like to start eliminating the list of possibilities to what could be causing this issue. Deleting the folders begins to eliminate project specific issues.

Do you have one large .fbx with many materials associated with it?
Does this happen in a blank project with nothing else in it?
Does this only happen in 4.9?

After I have this information I can start to narrow down the list of what is causing your shaders to compile.

I am sending my DxDiag. There is no large .fbx and this only happens to a single project. I forgot to mention a very important detail; just before this started happening I had some meshes vertex painted before saving, and now when the project is opened and while shaders are being compiled, those same meshes have no texture until compiling is done. But those meshes are parts of an asset pack from Marketplace and I had re-migrated them to my project but that didn’t fix.

Ok, thanks .

Thank you. So, we have determined that you computer is fully capable of handling large scale projects so it’s not within any limitations of VRAM and graphics that would cause your project to load slower. You have also stated that this does not happen within a new project. At this point I believe you may be correct in your assumption that your project has become corrupt.

I highly recommend starting with a new project. If you have an older version of your project that you can fall back on this may be your best option.

Today I started from my latest backup and the same issue started when I used a mesh with same material, as foliage. Nudging a node and saving the material again easily fixed the problem.

Hello , Tongucci

From a few emails I understood this problem occurs with my “Luos’s modular rock/cave pack” which is on the marketplace.
Apparently it occurs when using the props to paint meshes as foliage.

As I have no experience with that, (never needed any terrain related options so far) I would need to spend a lot of time to set it up. Time which I currently don’t have, at least for another week.
The shader I created is fairly complex, and if it needs recompiling it takes a long time doing so.

I have no idea if painting the meshes as foliage will cause this bug.

In the meantime, try going to your derived data cache, normally found at: C:\Users*username*\AppData\Local\UnrealEngine\Common\DerivedDataCache and clean those.
It will force a recompile as well.

I know its a rather odd request, but …
Do you have time to see if its the shader in my cave package combined with foliage painting that is causing this?

Cheers,
Luos

Hello Luos,

I will look into this as soon as I am able.