Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question What happens when "Particle Per Strip Count" on a particle strip is reached?

Discussion in 'Visual Effect Graph' started by kai303, Jan 25, 2021.

  1. kai303

    kai303

    Joined:
    Jun 9, 2016
    Posts:
    21
    Hi, I played around with particle strips lately, but I still have a fundamental question.

    The number of strips (per system) is defined by Strip Capacity, whereas the maximum number of particles inside each of these strips is defined by Particle Per Strip Count. If I don't want to use a single burst to fill a strip with all the particles at once, I can also add particles over time by using the Strip Index. If the particle count of a given strip is reached, I can no longer add particles to the strip. All new particles will be discarded. Is that right?
    In order to add new particles to a strip that already reached its maximum particle count, I have to kill some of the previous particles, either by giving them a lifetime, or by killing them (Set Alive = false).
    If that is true, I wonder what happens exactly, if I add new particles afterwards.
    So given a strip with a "Particle Per Strip Count" of 3 that is already populated with 3 particles:
    123
    what happens, when particle 2 dies before the other ones and I add a new particle 4.
    Will the order of the particles then be
    134, because new particles will always be added at the end of the strip, or will the new particle 4 get the free spot of the dead particle 2 and the order will be 143 ?
    Is the "Output particle strip quad" working similar to a LineRenderer, where the generated faces will always face the camera plane?
     
  2. kai303

    kai303

    Joined:
    Jun 9, 2016
    Posts:
    21
    So, during the day I was able to find the answer. Just if somebody stumbles upon this thread:

    New Particles will always be added at the end - even In the situation that I described where the strip is full, then one particle in the middle of the strip dies and new add a new particle to the strip.
    If the Particle Per Strip Count is reached, any new particles will be totally discarded.
    And yeah, the particle strip quad looks similar to a LineRenderer.
     
  3. andybak

    andybak

    Joined:
    Jan 14, 2017
    Posts:
    559
    @kai303 - you said

    > New Particles will always be added at the end - even In the situation that I described where the strip is full

    and

    > If the Particle Per Strip Count is reached, any new particles will be totally discarded.

    I think I must be misunderstanding you as these two statements seem to contradict each other?
     
  4. kai303

    kai303

    Joined:
    Jun 9, 2016
    Posts:
    21
    Yes sorry, I see that my short answer was kind of confusing. So I will try to give a more precise explanation.

    Case 1 - The strip is full, so it has exactly "Particle Per Strip Count" particles that are alive. If you try to add another particle, then it will be discarded.

    Case 2 - The strip is full but after a while one of its particle dies(!). So there's now new room for another new particle to be spawned in the strip. If you add that particle, it will always be added at the end of the strip - even if the particle that died was not at the end of the strip. That totally makes sense, because you usually want to add particles at the end of the strip, but I was not sure if this was really the case, so I tested it.
     
    daneobyrd and andybak like this.