Best way to do smoke trails?

I’m trying to do some smoke trails. One for a rocket weapon type thing, one for the exhaust of a thruster, another that’s part of a bigger explosion, etc. I’ve been using particle systems and the problem is that the trail just instantly disappears when the emitter goes off the screen.

I know about setting the bounds for an emitter, but that’s not the problem. For example, a rocket moves very quickly and I want the smoke to linger for a few seconds, even though the rocket is very far off screen.

Is there something other than a particle system that I should be using? All I can imagine is some kind of smoke puff actor that I spawn hundreds of to form a trail, which would be prohibitively expensive.

The slow motion scene you can download did lovely smoke trails using a mesh and materials.

If you’d rather not do some trickery with materials and planes to fake the effect, you could set up another emitter that instead emits CPU sprites instead of GPU sprites. Make it emit larger smoke particles and scale down the spawn rate, that way you could have a thick ploom coming out of the rocket and a thinner trail behind it (scaling the particles up makes it appear thicker).

I presume you’re using GPU sprites as far as I know only those cull when the emitter bounds are off-screen. CPU sprites to my knowledge don’t have this, and instead have a tight rendering and spawn limit implied to maintain performance. You could also just set fixed bounds on the GPU sprites so instead of the bounds being on the emitter actor only it’s around the entire particle system (so so long as a single particle is on-screen, it should render). Though this results in the particles being drawn all the time unless the entire bounds is off-screen, so if you have an expensive emitter (loads of overdraw, or a complex material) it will still be drawn.

Ribbons are arguably the most efficient way, and generally look the best. Sprites are just too inefficient for something of reasonable scale, and their rendering cost also depends on the angle you view them from so they’re relatively inconsistent. Combined with small amounts of regular camera-facing sprites, ribbons can look pretty **** good. I use them for this for example, you can see a few artifacts there but honestly I haven’t put any effort into making it look good, so there’s a lot I can do about that.

Ribbons can be a pain to work with if you don’t use them often, but the Effects Content Example has a good base for Ribbon particles using World-Aligned UV’s you can copy from. It’s also worth knowing that ribbons also have two sets of UV’s, one which stretches across the entire ribbon length, and another which stretches over the ‘segments’ individually - which can be used for all sorts of trickery.

EDIT: Oh also look into the ‘Spawn Per Unit’ module, which emits particles based on how far the object has moved in World-space, essentially preventing you from having lots of overlap where the object slows down, and you get equal density the entire length of the ribbon regardless of the objects speed.

I think that they do. Unless I’m doing something wrong, I see the same behavior with both CPU and GPU sprites (in 4.8).

In general, though, why would the engine just immediately destroy all sprites when the emitter leaves the screen? Having something suddenly “pop” in or out of the scene is not ever a good thing, right? Why wouldn’t the emitter just stop emitting when it leaves the screen? Sure, you get a little performance boost by suddenly destroying all those sprites, but they were already on the screen, so you were apparently OK with the performance cost while the emitter was on the screen. Why would it suddenly be too much of a performance hit just because the emitter left the screen? Sorry, just seems like an odd design choice.

TheJamsh, those ribbons look really nice… How are you getting them to stay visible when the rocket leaves the screen?

I just found a solution. Not sure yet how much of a performance hit it will be… But you can just manually set the emitter’s bounds to be huge. You might still see a sprite pop in/out occasionally, but it’s a lot better. It’s immensely better than what I just tried, which was a new actor for every puff of smoke in the trail, ha! Performance would drop from ~160 FPS to ~40 FPS whenever I fired rockets. :slight_smile: