VFX questions regarding initial spawning and lifetimes

Hello

  1. How do you set the particles to have an initial random position in a hemisphere rather than just a sphere?

  2. Is there any way to use a seed for the random generation of positions so you get the same result each time?

  3. Regarding lifetimes, is there anyway to set infinite lifetime, i want my particles to be static and never come to an end.

Hi @TheCelt ,

You can make a hemisphere by controlling the Arc value:

The VFX Graph is already using a seed, but it’s set by default to be random. If that’s not what you want, disable the Visual Effect component’s Reseed on play checkbox in the inspector and then the randomness of the effect will be the same every time you play it:

Yes, just don’t specify any lifetime in your graph:

Depending on what you want to do, you can also add lifetime, but then select the Update context and in the inspector disable Age particles (the age attribute won’t automatically change) or Reap particles (particles will age, but if their age exceeds their lifetime, they won’t be automatically killed).

If you do any of these, you probably would want to remove any over-lifetime logic in your graph (i.e. size over lifetime) as they will no longer give you the desired result.

Hope this helps!

6388038--711978--upload_2020-10-6_12-39-27.png
6388038--711987--upload_2020-10-6_12-41-30.png
6388038--711987--upload_2020-10-6_12-41-30.png
6388038--711990--upload_2020-10-6_12-43-15.png
6388038--711993--upload_2020-10-6_12-44-42.png

6 Likes

So I have a question on the opposite spectrum. I’m trying NOT to reseed after the lifetime ends. Reseed on play did the trick for play only. Age/Reap particles doesn’t let me have a lifetime. But I just want them to regenerate exactly how they are based on their particle ID sampled into perlin noise. I’m assuming when their life ends, the particle id regenerates again from 0-100 if I have capacity set to 100? Or do I have that wrong? I thought it would work with Periodic Burst the same way it does with Single Burst, but it’ll sample a different noise so I’m guessing the particle index is somehow changing. The image below is with constant spawn rate to better visualize the issue I’m having (on Unity 2021.2.18).Thanks!
8084456--1045409--upload_2022-4-28_11-42-31.png

Hi, this is not the case, particleID gets continuously incremented when a new particle gets born.

So if you have this setup:

You will get different results as the particleID will go beyond 100:

However, if you add a modulo operator, you will loop the ID number within the specified range:

Which as a result will give you the same values each time:

Depending on what you are trying to do, you can also use a different input from the particleID. For example, if the position is the same every time, you can just use that to sample the noise, without having to worry about what the particle ID is.

8086556--1045847--upload_2022-4-28_18-10-6.png
8086556--1045850--Unity_ImP9gjVAVy.gif
8086556--1045853--upload_2022-4-28_18-11-39.png
8086556--1045856--Unity_dZ7Tsr7hR7.gif

5 Likes

Thank you for the explanation, good to confirm the incrementing particle id. The mod definitely did the trick!

1 Like