Instanced static mesh smudging.

I am trying to do something similar to what mass entity does, but for space ships. Got up to 10k instanced meshes orbiting planets, real swarms.

However even with just 200 or so i get some weird smudging:

It gets really ugly with higher number of meshes. Always for second or two at beginning everything is clear, then this kicks in.

I turned off all blurr, antialiasing etc. No idea where to look for source of this.

It’s a bit hard to tell in the small image, but it’s almost as if it’s generating new instances each frame and not removing the old ones?

It looks like some blurr or emissive ghost images, or temporal AA. On bigger objects is less visible. But i tried to turn off everything in post process volume. I try to make same picture with just few meshes.

bigger pic:

Those pixel sized tiny bright green dots, it is same thing. They are left in picture even if i do not use unlit material, they are just much darker and harder to spot then.

And i just noticed, when i move camera they stay connected to screen space not in 3d space. Close up and with darker meshes this would be not as much visible, but when mesh is not much bigger than few pixels and each one of 1000 or so leaves trail, instead nice sun like on this picture i get green blob of ghosting trails.

And this is with smaller meshes and about 1/3rd of of desired amounts:

Green blob of meshes, with green halo from ghosting.

It looks very similar to a noted bug which has been mostly seen on foliage.

Does it stop happening if you turn off Nanite on those meshes?

They are not nanite, just instanced static meshes, that are small on screen and sometimes move fast.

Yet another pic, shows better:

Those meshes have no trail emmiters.

It does kind of look like emissive ghosting like you say - are you sure it still happens if you just use BaseColor rather than Emissive?

Same thing:

Material is white 4 vector connected to Base Color.

I’m out of ideas I’m afraid - that has to be one of the stranger bugs I’ve seen!

It is something from calculating light.

I made dark (black) metallic material. When it does not reflect anything there are no smudges, but in spots some meshes reflect directional light smudges appear.

Yes dark gloomy swarm of triangles over planet is menacing, but almost not visible.
I think it is time for niagara.

1 Like

Niagara does seem ideally suited to flocks/swarms. It’s not just a particle-system

Problem with niagara for my game is that i cannot kill “THIS ONE” particle (spaceship) i can kill whole emitter, so 1 emitter = 1 space ship.

And second problem is that instanced static meshes are fine with 10000 meshes moving around, niagara limit is around 900 particle systems.

1 Like

G2know, thanks! :smiley:

I want to say that in regards to:

“problem with niagara for my game is that i cannot kill “THIS ONE” particle (spaceship)”

I thought I, once upon a time, saw a tutorial where the guy was doing just that, picking particle X out of the niagara system. If I can find it again, I’ll post in case it becomes useful…

Also, why not one system per-swarm? I’m not super well versed in Niagara yet, but I imagine 10k particles in a system is doable and is not expensive?

At beginning of this project i tested simple emitter with just transparent dot.

Because of transparent material and how they are rendered, particle count was much lower then instanced meshes.

And since instanced meshes can be easily manipulated compared to naigara, i went for instanced static meshes (instead of mesh emmiters in niagara). But then this smudging does not want to go away. And i have very simple version of what mass entity does.

Btw. I tried Forward Rendering in unreal, it is much less smudging there, but if you know what you are looking for you can find it.

Update:

Friend made small blueprint that reproduces this bug. it is on google drive, together with clip.

Clip showing it:

Link to uasset, which is blueprint, that you drop to empty unreal project to reproduce this:

I just tried it here - setting AntiAliasing method to None, FXAA or MSAA gets rid of all ghosting for me. Also, turning collision off and shadows makes it run much faster…

1 Like

No idea how i could miss Anti-aliasing. :smiley:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.