Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Particle system in 2018.2 is very slow

Discussion in 'Physics' started by laurentlavigne, Sep 6, 2018.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    1,999
    In the past I used the particle system to display tons of meshes and it was fast.
    In the boid demo I wanted to use the particle system to replace the ECS, I thought it'd be easier, slap a few repulsorts here and there.
    But rendering just 50K fishes goes down to 0.1 FPS! no force, nothing.
    It seems odd to me that the particle system, which is multi threaded and lives purely in c++ land would be that much slower than ECS
    So I'm wondering if there is a regression in PS perfs.
     
  2. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    This could be a lot of things...

    What's your target device? Are you working on a Mac?

    Do you have the particle systems selected and particle editor opening when playing and getting this slow performance?

    Are you changing the colours of the particles over time?

    Is physics on the particles?
     
  3. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    btw, generally speaking, yes... the particles are FAST. Shockingly so, in some lean setups.

    There's no way it should be below 60fps on a production machine with 50k particles, without something being "wrong" about how you're doing something.
     
  4. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    1,999
    sim without displaying the fish mesh = super fast so it's not the physics or the particle sim.
    switch to mesh render, plop in the fish mesh from the boid demo = 0.1 fps
     
  5. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    sorry, don't know what this is.
     
  6. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    793
    Until recently, mesh particle rendering was always slow, because it didn't use GPU Instancing. This changed in Unity 2018.1. Use the Standard Particle Shader, with instancing support built-in, and it should be fast. Otherwise, the complexity of the fish mesh would have a massive impact on performance. If it's 2 tri's, probably not so bad, if it's 200 tri's, bye-bye framerate!

    That all said, if you think you found a performance regression for something that was faster in old unity, we are always happy to look at an example project if you can submit a bug report.
     
    Last edited: Sep 13, 2018
    karl_jones likes this.
  7. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    1,999
    The fish is from the ECS boid demo, it's around 100 tri I'd say, you can try.
    What makes no sense is that 50K fish is super fast with ECS and very slow when rendered by the particle syste, using the same material.
    The reason why it shouldn't be is particle is all engine side and as I pointed out the sim is insignificant in this, I'd think particle render is at least as fast as ECS using meshinstancerenderer.