Smoother particle trails in Unity

Hi there. I’ve been using particle trails for some time now and no matter how much I tweak the ‘minimum vertex distance’ and ‘texture mode’ under the Trails module, I often get this result:


It seems to happen no matter what kind of texture I’m using. Due to technical restrictions, I can’t use PostProcess glow/bloom, so glows have to be baked into the texture, and this seems to be the main culprit in terms of geometry stacking and ugly overdraw when the trails bend at extreme angles. Any tips?

1 Like

Use rounded textures without big side glow
If you change size by curve in trails, it can cause bugs like in your screen. Don’t use size curve in the trails tab, change size in the picture.
If you need smaller trail distance, you can set simulation speed bigger and other values lower.
You can also use your own mesh with your custom shder to simulate trails.

1 Like

Thanks for the feedback. I turned off trail size curves and it smoothed out the texture a lot more, but I absolutely need big glows baked into the texture, since I’m not using Bloom for this project, as I mentioned.

I realised the only option left is to animate particle sizes over lifetime and have the trails inherit that. Shame I have to do without the ‘width over trail’ curve though… I guess I could try baking a tapered shape into the trail texture.

You can redraw your texture instead of using “width over trail”, effect will be the same, but line will be straight, without “stairs”.

1 Like

Thanks for the suggestions! This worked extremely well :slight_smile:

Thanks for the tips @Hovl that’s very cool !

I suppose you are referring to the Particle Trails? my solution below does not cover those but it could theoretically work for particles aswell. I only used this solution for projectile, fireworks and speedstreak type things. I will write it anyway since it might help someone else.

The alternative solution to using the Trail Renderer is the Line Renderer. It can be implemented by tracking a transform in script and storing positions each frame, then set the points in a Line Renderer. The benefit here is that you can create more points by interpolating between the stored positions and then get a smoother path as a result.
I’ve used iTween for this purpose and it worked really well for me. Then the trail can even be used in Local Space :slight_smile:
You can also write your own Camera facing mesh generator when you got the points generated to make something that matches your needs

As I know, we can only control the path using iTween, but we can’t use 2 trail points to control the angle, right?

Right. If you want better control of the mesh, your best bet is to ditch the Line Renderer and construct the mesh yourself from the iTween path. Then you can do fun stuff like twisting and such

Like this

1 Like

Not really, because that mesh is not generated during runtime

Ah yes, I remember seeing that some time ago… That could work for my current scenario, but I tend to prefer runtime-generated geo over premade meshes, because of the flexibility it allows. Great reference though!