All my trees (HISM) flash when removing one Instance during runtime, please help, GIF included

Hey, I have HISMs for my trees and when I remove one tree by Line Trace Hit all the other Instances flash for a moment. Has anybody seen something similar?
Here is an example:
2023_03_23_19_20_54

This is how I remove the Instance:

Any help would be much appreciated.

Jul

Hi julschau,

what version of the engine?

Hey, it’s 5.1.1

I haven’t been able to reproduce the flicker - I’ve tried all types of trees, nanite and non-nanite - both HISM and ISM but nothing.

Are there any other settings you’ve change that may impact it?

Can you test on in a new project with just the trees and your code to hide them and see if it happens there?

hey so I just tried the same HISM with some nanite rocks and there was no problem, so it had to be something tree/foliage related. There is a speedtree node in the leaves material:

When I disconnect the WPO the problem goes away. But then theres of course no wind effect. In the Speedtree node I switched the WindType from BestPlus to Best.

Screenshot 2023-03-23 222107

This fixes the flashing problem and the wind effect is still good. But the wind effect/WPO position seems to reset on all trees in the moment I remove an instance. So it’s better but still not totally fixed as seen here:

2023_03_23_22_35_23

Is there anything about speed tree wind / WPO that I can change so that it doesn’t reset?

Thanks!

1 Like

Interesting! I tried with some simple wind WPO and there doesn’t seem to be any resetting with that - perhaps there is something in your wind system that references a “start time” for the animation that gets reset - you may be able to change it to something that doesn’t reset…

It’s possible it’s using PerInstanceCustomData and maybe when an instance is removed from the HISM, that data is not swapped with the last instance like it should? You could test that by using an ISM rather than an HISM…

Ha, since looking into HISM and Speed Tree wind I found an answer right here in the forums: SpeedTree wind resets when adding instances to HISM Component at runtime

So I just stuck the 5 Pine tree assets into the map with scale 0 as static meshes and voila the wind just continues without a hitch.

2023_03_24_00_52_30

Thanks for pointing me the right direction!

1 Like