Can anyone please help me solve this flickering issue?

I made these 2 posts that are unsolved so far:

They are related. Basically the first post is me trying an unconventional solution for the problem of the meshes disappearing when moving them in the World Position Offset (related to bounds).

The meshes disappearing has no solution, so please dont bother with that.
But the other problem of the flickering is keeping me stuck on my project and i cant advance.

Basically:
Im moving units on the WPO in the map. And when i move them, they eventually get out of their bounds and disappear.
To correct this i update their actual position to the current moving WPO position. And reset the WPO to 0. So they move mostly on the WPO, and sometimes move just 1 time to the position (to correct the bounds).

However, this is causing a little flickering/white flash, when correcting the position.
Its 100% graphical. Because if i zoom in you can see the position updates 100% correctly, and there is no flash. It only happens when you are far away.

Please, tell me if there’s a solution for this. Any solution is welcomed.
Video of the problem:

Project file:

Please, help me so i can resume my work.

Hey @SophiaWolfie

the flashing always happens when

this part gets executed. This creates a hiccup in your code whenever FrameCounter>200. Set it to 1 just for testing and see what happens.

Thank you for taking a look at my project. I really appreciate it.

Sorry, this is a complicated and very specific problem so its easy to misinterpret things.

Those checks every tick are on purpose. If you set it to 1. Then it will reset the WPO and update the position of the HISM every 1 frame.

So its set so that it updates every 200 frames. All other times its moving the HISM using the WPO alone.

There’s no hiccups. There’s just the white flash when updating the position every 200 frames.

Sorry if i wasnt clear. Could you please see if there’s anything that can be done to fix the white flash?

Hey @SophiaWolfie
So MotionBlur and Anti-Aliasing are causing this. And you can stop your soldiers from vanishing by increasing the BoundsExtension:

I don’t know how to solve the Anti-Aliasing problem. Maybe using TemporalAA and play around with CurrentFrameWeight and the AASamples could also solve the issue?

Here is nearly the same project as yours without the bugs VATMovement.zip (16.9 MB) could you have a look?

1 Like

Sadly i already tried increasing the bounds because it was suggested to me a few times. At first it seemed to solve the problem, but its terrible for performance. And since im moving the hism in the wpo to improve performance, then this solution becomes worse than the problem.

However, i found an alternative solution. That is to not update the HISM component as a whole, but update each instance to the current WPO position, and then reset the WPO position. This prevents the flash bug.
Its a bit worse and messier solution because you must account for all instances positions individually. But at least works.

Another solution is to disable the frustum culling as a whole. And then hide the visibility for each HISM separately when they are not on camera.
This would be by far the best and easiest.
But it seems the engine does not allow to disable frustum culling.
I will make some posts asking for this.
If im able to disable frustum culling, then i dont have to update the hism position and reset the WPO.

Thank you for the help so far.

Sorry. When i opened the file first a week ago, i thought your solution only included increasing the bounds.

But i doublechecked today and noticed the bounds are just increased by 500 which is not a lot and it wont affect performance as much.

So it seems you fixed the problem by changing the anti-aliasing and the motionblur.
The unit is still updating the position it seems and restoring the wpo which is what i wanted. So thats working 100%.
Could you please tell me where exactly and how exactly did you fix it?
Thanks so much.

1 Like

Hey @SophiaWolfie

when you go to Edit=> Project Settings, look for the Rendering section on the left side. Here under DefaultSettings you find these options:

Maybe you can even lower the bounds. They are in the static mesh SM_Spearman, not in the blueprint (as shown above).

This method will, well, give you aliasing. I currently have no other solution for you :confused:

1 Like

Thanks again @L1z4rD89 . But i see not much of a difference in disabling motion blur and AA.
Plus if im not mistaken it will improve performance? Or not really? I have that feeling because i remember to turn it off to improve performance in games.

There’s also a second solution that i found after a week of beating my head against the wall:

The problem doesnt happen if instead of restoring the HISM itself as a whole, you restore each instance to its corresponding WPO offset, then reset the offset.

Doing so, will not cause the flickering. I found it by coincidence.
This technique allows the anti-aliasing and motion blur.
But is 10 times more complicated to implement. And you can see it gets hard really fast. Math_lady.jpg.

Basically, HISM itself never moves, stays always on its first location where its spawned.
This means that when rotating the batallion, it becomes very complicated.

Because you must rotate it relative to the box or actor in the updated position, not the HISM. So it needs the make relative node and the compose transforms.

Now i’m undecided between your solution, that might be better because its simpler and without motion blur and anti-aliasing it might be even better because the priority of my game is performance.

The other solution is complicated but allows those.