Destructible Mesh can't get hit by trace in the frame it's spawned

I’m doing this:

http://puu.sh/isMAK/b2018b5c08.png

With the Actor I spawn being an actor which just has one destructible mesh component.

In 4.7 the trace hit’s the DM, while it does not in 4.8. Tracing in a later frame also works in 4.8.

I know DM bugs are backlogged and so on, so it would be nice if at least no new bugs would get added :confused:

Hello John -

I have tested this issue internally and can confirm that I was able to reproduce the it. I have entered a bug report, for reference UE-17309, and will keep you informed as we investigate a solution.

Thank You for your report -

Eric Ketchum

Hi Eric, I want to add that the destructible mesh also seems to be invisible for one frame after being spawned. I have a regular mesh which I “convert” to a destructible mesh (destroy the regular mesh and spawn a destructible mesh with the same transform) and I see it flickering, so one frame there is “nothing”. In 4.7 it did not flicker, so the DM was visible in the frame it was spawned. I would like to have it smooth so the player does not even notice I changed the mesh to be a destructible.

Is there any update on this?

Hello -

Currently, UE-17309 is backlogged and while we are still investigating a solution an immediate fix for this issue is not forthcoming soon. As soon as I know any more I will post back here.

Thank You

Eric Ketchum

Hey Eric, could this commit have fixed the bug? :slight_smile:
https://github.com/EpicGames/UnrealEngine/commit/6da256d2de16c85173be59feb8fafb1e192c1fb3

Hi John -

This was a fix for flickering materials on Fractured Meshes after they were fractured, even so I did do a quick test just to test and can confirm that the issue still stands and this commit does not fix the trace issue.

Thank You

Eric Ketchum

Hey Eric, any new on it? I mostly care about the flickering issue, not the trace one. The trace one is annoying but my workaround is working fine (just doing it next frame) but the flickering one is making the game really, really ugly. I could not ship the game like this. So any updates on it?
I really hoped it would finally be fixed in 4.9, but unfortunately it’s still in 4.9.2.

Hi John -

Unfortunately UE-17309 is currently listed as backlogged. I have updated the community interest for you.

Thank You

Eric Ketchum

High Eric, UE-17309 is for the tracing and not for the flickering, right? I asked about the flickering one. I can understand that the tracing one is backlogged since it’s really not too important and can easily be workarounded by just tracing one frame after the DM was spawned.

The flickering one can’t be workarounded and makes shipping a game with it in it quite impossible since it looks quite terrible, it absolutely breaks the immersion.

Apologies. The Commit you referenced earlier and I will post again below is the correction for the flickering issue.

https://github.com/EpicGames/UnrealEngine/commit/6da256d2de16c85173be59feb8fafb1e192c1fb3

Eric Ketchum

Ah, thanks, nice to hear :slight_smile:

It was added to the master branch in July, we now have September, in between there was released 4.8 and also 4.9 and the fix was not included in any of them nor in any hotfix? Could you see a reason why not if it just has to be merged?

Hi John -

That commit is in 4.9.0 and upwards. Can you provide a sample project showing the behavior if you are still seeing it in 4.9?

Thank You

Eric Ketchum

So you were not able to reproduce it?

At the moment Rudy Triplett and also Adam Davis have the project I’m working on (they investigated other bugs) so you could just ask one of them about it and I would tell you what you would need to do to see the flickering. Would that be fine?

Hi John -

I received the project from Rudy and am ready for your reproduction steps.

Thank You

Eric Ketchum

John -

The flickering is something I can see in your project, but it is not a bug but an unfortunate side effect. When changing from any asset to another asset there is always a one frame lag, this is unavoidable as the asset takes a single frame to render. The engine tries to shorten this as much as possible by using one frame only to both destroy the old mesh and render the new mesh. This one frame (particularly at games with lower frame rates) can be perceived as a flickering.

The million dollar question though is what can we do about it. There are a few things that you can try to help eliminate the human perception of the switch. First would be to draw a trace from the catapult to it’s hit location and change the asset before the hit occurs. The switch is more noticeable when your eyes are drawn to it by the catapult’s projectile and explosion. And speaking of explosion you could also increase the explosion effect, not necessarily by increasing your hit effect’s overall scale, but by adding in a dust/cloud reaction to your hit effect from the wall. This would serve to mask some of the change, obviously the thicker or more opaque would be a better term the effect is the less you will see the wall switch.

Thank You -

Eric Ketchum

Hi Eric, thanks for your suggestions, but I don’t think this is just an “unfortunate side effect”. The flickering was not there in 4.7, it was introduced in 4.8. Also, if I just destroy a regular mesh and spawn a regular mesh in the same frame, there is no flickering, it only occurs on destructible meshes, so it’s a bug which only occurs on destructible meshes and was introduced in 4.8, together with the bug that the destructible mesh can also not get hit by a trace in the first frame, which makes sense because both bugs are basically the same, since 4.8 the destructible mesh just does not exist for one frame, so we can’t see it and the engine also can’t hit it by a trace.

I wonder why you say “When changing from any asset to another asset there is always a one frame lag”? Have you tried this with regular meshes? There is never a “one frame lag” and there surely should not be any one frame lag, if there would be then this would be a bug.

Hi John,

Eric wanted me to take a look at this as well. Using the methods he’s described above would be the best solution that we know of. If you’re convinced this was working in 4.7 vs now 4.9 can you provide a simple example that can reproduce this and then I can convert to 4.9 for comparison.

When switching or spawning in a DM there is a single frame that it’s not visible. This has always been the case that I’m aware of, so the flash that you’re seeing is this switch that is happening, which is not considered a bug.

I’m happy to continue looking into this, but if you have a clear repro that worked in 4.7 and is now broken in 4.9 I can look further. Keep in mind that negligible changes are bound to happen when there is a difference of a year between builds. If a ticket is entered it would likely be backlogged. I’m still happy to look into though.

Let me know.