HISMC flickers in packaged project

You can find some discussion about it here:

Repro project:


This is the LOD flickering from ticket UE-16534 which we fixed today. I just confirmed your content before/after the fix and it vastly improves the appearance and there is no LOD flickering.

The fix is available on github here and the two files it concerns, HierarchicalInstancedStaticMesh.cpp and HierarchicalInstancedStaticMeshComponent.h are drop-in replacements for the 4.9 versions.


Hi ,

I just downloaded and executed the build you uploaded and I see the flickering in there. If you really don’t see any this is really strange and might only happen on specific hardware configurations? Since VSZ got the same bug it’s surely not only my PC.

The LOD flickering is indeed fixed, but if I just fly around with the camera and look down at the trees from above every ~1 to ~3 seconds even trees which don’t get scaled are invisible for one frame (or turn white, I don’t know). You really don’t get anything like this?

Hi ,

Further to your comment in the other thread about this also being a repro for the full-HISMC flickering in packaged builds. In a packaged 4.9 Release build I do see a lot of flickering but only for instances that have had their scale updated. This is the LOD bug. I do not see any flickering of the instances that are not being scaled.

With the LOD fix above applied I don’t see any flickering at all in the packaged build. Here’s my 4.9 build with the LOD fix applied (59MB). Do you see any flickering with it?



No, it’s rock solid but it could be my super fast machine. Given you only see this in cooked builds I’d say it’s something to do with the frame rate, so there must be a timing problem that occurs with specific frame rates.

I’ll try on a few other machines around the office.

OK, that was easy. I see the occasional flickering on my second PC that has an AMD 7970 video card. Not sure if it’s related to AMD cards or just a different machine spec.

Added a new ticket “UE-20457 Updated HISMCs occasionally flicker for one frame on some AMD GPU machines”

I’ll post back here when I have a solution.

Yep I see the same. I mean “occasionally” as in not every frame. It’s me who’ll be reading the ticket so I know what it is :slight_smile: I’ve asked someone here to try on a bunch of other machines to see if it ever occurs on Nvidia cards.

I get constant 30/31/32 fps in the build you uploaded.

The idea with the frame rate is nice, though I do not get the flickering in standalone but only in packaged, and the fps in standalone are mostly the same as in packaged I think.

My GPU is a Radeon HD 7850, so it’s not “super fast”.

Great! Thanks :slight_smile: I’m just not sure whether “occasionally” is right, since in the project I only scale instances once a second, and still there is flickering every 1-3 seconds, so if you would do something more often than once a second you might get flickering almost every frame.

Thanks for letting me know :slight_smile: Yeah you seem to be just lucky, if you can call it luck to be not able to test for a bug on your main machine while many other PCs experience the problem. The bug probably just want’s to hide from you because it does not want to get fixed :slight_smile:

It happens on a bunch of nvidia cards. I guess I’m just lucky!

I fixed the non-LOD whole-component flickering bug just now. It was caused by the occlusion query system using old data even though the HISMC tree had been rebuilt.

The fix is here. Again you can just replace the 4.9 HierarchicalInstancedStaticMesh.cpp with the one in the github commit and it’ll fix the bug for you.


Great to hear that you were able to fix it :slight_smile: Thanks a lot!

Hey , just wanted to ask you whether there is anything planned to remove the “Discarded foliage hierarchy of x elements build due to concurrent removal (0.0s)” output in the log? I already mentioned it a while ago here in the answerhub and Adam Davis entered it as UE-16224 but then said it’s working “as intended” since you should just never update HISMCs so often that this would be a problem in the log. Since I update them once a second I get one of these lines in the log every second, so the log gets spammed with these messages about HISMCs. Could you add something like a bool to tick in the HISMCs settings to disable this message in the log?

If someone plays my game for 3 hours then there will be more than 10000 lines with just this message in the log… Then reading the log is quite hard :slight_smile:

I’ll remove it for 4.10.

Awesome, thanks a lot! :slight_smile:

Hi , just wanted to say thanks for fixing this bug and thanks to Alcatraz as well for the repro. I somehow missed all of 's messages in the other thread which is why I didn’t come back with the requested information on that thread, apologies.

My project is still on 4.8, I will test this behavior using the Github fix once I migrate to 4.9. HISM is a lifesaver and the flickering was the only downside so really happy to hear it’s fixed!

I had flickering HISMs using UE5 EA and solved it by turning off virtual shadow maps in project settings.