SpaceParticles / Remove particles out of frustum

I’m currently trying to emulate some kind of space particle effect.

Eg.

Basically this can be easily be donw with a particle emmiter, however I would have ton’s of particles behind the camera (the speed is not fixed, eg the use could also idle.
So I need a more intelligent way to despawn particles.
First of all is this possible with the current particle emmiter at all?

Eg. Despawn out of frustum particles, and particles more than X meteres away (backward flying) should do the trick.

1 Like

@MoffKalast how do we do it?

Personally, I’d do this is a shader effect. A line mesh with a bunch of single point lines randomly placed about… where the length is set to the movement vector (and zero length = don’t show them).

…then just move offset them with the world position and anything behind put in front again. Up to you whether you want to randomize the points again with a noise texture or something but it may not be necessary with enough particles and a large enough “field”.

It’s the same way snow and rain effects are commonly done.

I achieved this effect using a large number of geometries (no particles) in TestBindControl. Not saying that’s the best way to do it.

Video:

Source code:

Particle emitter in a kind of crappy way. I’m really open to alternatives to replace it actually.

Edit: Actually iirc there are two systems, once is particle emitter based for sublight movement, and another is a bunch of quads moved along for warp.

I did it for my game using post shader :slight_smile: