Issue with moving particles and Motion Blur in PostProcessStack

I’m currently having issues implementing the PostProcessingStack in our game, particularly with instances of particle systems on moving objects. Almost all of the particles in our game are opaque meshes (ie. not alpha billboards) using Shuriken.

Most particles work fine, but several particle effects that we have parented to other Transforms are displaying incorrectly.

What the particles look like with no Motion Blur, with Blur and with the Motion Vector arrows:

The motion vector debug view is particularly interesting, the arrows are wildly different and all seem to be pointing towards the world origin (The giant orange drill sits roughly at 0,0,0).

I’d usually just turn off the motion vectors if this was a regular mesh, but since it’s a Shuriken particle system I can’t see a way to actually access the Mesh Renderer.

This is with the latest build (Beta 4), and in Unity 5.5.1p3 in Editor and builds on Windows (untested on OSX/Linux). We’re also seeing the problem on console platforms. I’m using Deferred rendering with FXAA, Bloom, Grain and Vignette, although changing the other settings don’t seem to have any impact on this issue.

Anyone have any ideas how I can work around this?

Hey!

So, you have uncovered a couple of problems :slight_smile:

  1. We have not added the motion vector selection drop-down to the Particle System Renderer Inspector. I will fix that, but of course this doesn’t help you right now.

Right now, your only option is to set the value from script: Unity - Scripting API: Renderer.motionVectorGenerationMode

Add something like this to a Start or Awake function of a script attached to your Particle System:

ParticleSystemRenderer renderer = GetComponent<ParticleSystemRenderer>();
renderer.motionVectorGenerationMode = MotionVectorGenerationMode.Camera;
  1. We don’t support per-particle motion vectors. What I think you are seeing, is per-object (i.e. camera + transform).

If you are able to write your own shaders, you can try to implement this yourself. In Unity 5.5, you are able to send custom particle data to the shader (See Custom Vertex Streams in the Renderer Module). If you send the particle velocities, you could use them in a motion generation pass.

Note, that for perfect motion vectors, you would also have to use the rotational speed (which I think we only exposed to shaders in 5.6) and also changing particle size (which we currently have no way of tracking). So you would still expect to see some issues (eg ghosting) if trying to write motion vectors for particles with changing size/rotational speed.

Here is a doc with an example of how to use the Custom Vertex Streams feature, but we don’t currently have any examples for using the feature to generate per particle motion vectors: Unity - Manual: Particle System vertex streams and Standard Shader support

Hope it helps!

1 Like

Awesome, that’s a huge help. I ended up just using that script snippet on the affected particle systems, we can probably live without the per-particle motion blur in our case.

1 Like

I’m having issue with this too. In 2018.2.0f2

I’ve tried all motion vector options in the drop down. same ressult. This is a particle system with a tiled texture attached to a falling building.

3619798--294658--upload_2018-8-30_0-8-6.png

postprocesing stack v2

aside: stats are devastating since I moved all shaders to gpu instancing.

Having this issue in 2019.2+.

same problem

I had the same problem when I tried to make a muzzle flash. I’m not sure if this is a solution, but setting the motion vector to force no motion fixed it for me.

2 Likes

Oh My God thank you!

Same Issue

WOW! I have been stuck trying to figure out what was going on for MONTHS. Motion Vector: Force No Motion solved everything. Thank you!

Resurrecting this for 2021.3 URP 12.1.6. No drop down and wonky motion vectors.

11 Years later and I’m stoked this answered my Q - Motion Vector: Force No Motion and suddenly my laser firing looks as desired!

1 Like

Solved it for me!

Anyone knows if you can force no motion vectors to something drawn with Graphics.DrawMeshInstance ?