[Bug Report] Severe Material or Lighting Bug on Instanced Static Meshes
(edit) The glitches described below occurred because the lighting was not setup correctly. There's actually no bug in the engine! If you look at the pictures below you can see that the grass has no shadows, this is because the Directional Light was set to static instead of mobile which is necessary if you're going to use Instanced Static Mesh Components, you cannot compute the lighting before that because the instances are added during runtime!
Most recently I've been creating a blueprint that uses multiple (Hierarchical) Instanced Static Mesh Components and these glitches became very apparent! All Instances should look the same but they do not, some appear much darker than they should which creates odd "color"-borders where there shouldn't be any:
Another glitch I've been observing is that instances will change their color (become lighter or darker, sometimes even black) seemingly at random! I've created a small gif of this color shifting so you can see how it looks:
You can clearly see that the instances of the 4th Component are shifting color after they have been added. I've also noticed this effect occurring after all instances have been added and also when using only one instanced static mesh component, seemingly at random instances become darker or lighter.
Kind Regards, Gull Jemon Studios
After some time I've finally figured out why I wasn't really able to reproduce the glitch so easily in another project. Turns out that my Directional Light was set to Static and that all my shadows were in fact not being rendered correctly.
I have set the Directinal Light to mobile which is absolutely necessary because the instances appear during runtime and therefore the lighting cannot possibly be calculated prior to that. Therefore I can conclude that this was in fact not a glitch caused by a bug in the engine but because of the wrong mobility of the light.
The problem was that I was so focused on the programming part that I became totally oblivious to the fact that there was absolutely no shadow visible. If I had realized that before I wouldn't have thought that there was a glitch in the engine. So if you bump into a similar problem just check if you've setup the lighting correctly.
Hope this helps,
Follow this question
Once you sign in you will be able to subscribe for any updates here