Instanced in a Hierarchical Instanced Static Mesh components are showing the LOD 0 for one frame after being scaled if the correct LOD would be anything higher than 0.
I have created a gif to show you the problem:
The trees are instanced in a HISMC and are being scaled up a bit every 1 second. If I am close to the trees, so LOD 0 is shown, it looks fine. But if I am further away and LOD 1 or LOD 2 is active, after scaling for one frame LOD 0 is visible. You can’t always see it on the gif because it only has 15 fps, but the tree is flickering once a second, so always after scaling.
I was able to reproduce this with any mesh that has LODs, including static mesh components and instanced mesh components so it seems to be a bit more widespread than initially thought. I have entered a bug report, UE-16534 to be assessed by the development staff.
Edit: Entered wrong bug report number, this has been corrected.
Thanks! So you mean this also happens if I scale a regular Static Mesh Component?
It did with the mesh I was using for sure, I can’t say with certainty that it happens with all LOD meshes, however the specific mesh I was using had an LOD 0 and 1, the 0 was a sphere and the 1 was a square. Anytime the camera entered a distance where LOD 1 would be called it began flickering fairly quickly. This became worse when scaling.
They even flickered without scaling? How could such a bug not be noticed for so long time? This would basically affect anyone who is using LODs with meshes… Which is like almost everyone using UE4. I am quite sure this will not be fixed until 4.8 is out, would this bug be a candidate for being fixed in a hotfix? Would really like to have this flickering away before I can use 4.9
Thanks a lot!
It looks like the overall flickering may have been a result of the specific mesh I was using. I uploaded a new static mesh with LODs to the same function and it did not flicker at all in our latest internal 4.8 release for other mesh components outside of HISMC and I’ll be updating the bug report to reflect this information. However the flickering while unscaled is officially a problem with my mesh and not with the system.
Did it flicker in a HISMC in 4.8?
Working on testing that in a previous 4.8 build, the one I was using has a crash that I am currently filing a report for. I’ll let you know as soon as I have a chance to further test.
I have tested it myself now and unfortunately it does flicker with a HISMC in 4.8 the same way it did in 4.7.
I checked into the bug report and it looks like this has been backlogged for now as our resources are currently dedicated elsewhere. I have updated the bug report community interest section, which may improve the priority, however this is not guaranteed. At present I don’t have a timeframe of when it will be fixed.
Hi , thanks.
What exactly is the bug report for? Initially you have entered it as “all mesh components flicker”, then you corrected it to that they only flicker with my your custom mesh.
If it was only regarding your custom mesh I could understand that it’s backlogged, but with a HISMC it affects everyone who is scaling instances inside… Why it this backlogged? I guess you know that it looks really ugly to have such flickering in the game, shipping a game with this is not possible. If you don’t want developers to use HISMCs please mark them as experimental…
As you know from my other thread HISMC are really the only way for me to achieve what I need… Regular ISMC don’t have LODs which are essential for foliage
The bug report is for LOD flickering between LOD changes when a HISMC has their transform altered. It has only changed slightly from the original bug report, which reported constant flickering which was due to the mesh being used. I was still able to reproduce the LOD flickering effect when transforming the HISMC.
But wasn’t it marked as backlogged while you still had written there that it’s only a problem with your specific mesh?
No, I was able to catch and alter that error in the bug report before it had been assessed by the developers and noted this in the report. The backlog took place at a later time.
I have found another bug which is something like the same as this one, with the difference that it only occurs in packaged projects. In a packaged project the flickering after scaling occurs the same way as in the editor, but there is one more bug: After adding a new instance (or after scaling an existing one) sometimes all instances are flickering for one frame, and I can’t say it for sure but it looks as if the whole HISMC would be invisible for one frame , really does not look nice. I have played around with HISMCs in a new clean project and then found this bug, so if it helps I can just send you the project.
Thank you for the update, I have updated the bug report to reflect this new information.
Any update on this? I forgot to post it here, but if it helps, you can add this video to the bug report: https://www…com/watch?v=jpW9IZCd39M
There hasn’t been any update from the backlogged state. I did add the video to the bug report, however I honestly wouldn’t expect an update on this for quite some time as our resources are dedicated elsewhere. If additional developers begin reporting the same error I can bump the community interest, however there is no guarantee that this will bump the priority of the bug itself.
Thanks, that’s unfortunate… I have to wait for this bug being fixed before I’m able to release my game, but this will take some more months anyways. I could use regular Static Meshes, but then my performance is somewhere like 3fps HISMCs are really the only way to have good performance with foliage and still being able to interact with it. Maybe anyone else who has this problem creates a pull request to fix it.
This has been posted in other threads but posting here for completeness.
The fix didn’t make it into 4.9 but will be in 4.10. It 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.