0 like 0 dislike
If you change the speed of your simulation with your spawner metric set to time, more or less particles will be created... Distance does not seem to work for me, no matter how high/low I set the spawn Interval, it creates 0 particles.

Is there any way to multiply this by dt?
asked by gtapperdesign (1k points)

2 Answers

0 like 0 dislike
Best answer

So, I checked the effect, and it's not a bug.

it's because you manually recompute the position each frame _after_ the trail evolver.

Quick fix :

just drag/drop your script evolver before (above) the trail evolver, for your two trails.


Why it behaves that way:

For reference, here's a screenshot of the setup:

The evolve script:

The particle Position is recorded at the start of the frame, then when the trail evolver runs, it will spawn between the current value of "Position", and the previous position recorded at the frame start.

The only thing that can change "Position" between the frame start and the trail evolver is the physics evolver.

but it doesn't move the particle, because there's no accel, no velocity, nothing (so it's basically a totally useless physics evolver, you can delete it)

so, what happens:

- in "Time" mode, if you look at the particle count here:

you'll see that it stays identical no matter the simulation speed or the framerate.

However, due to the way the trail is setup, as the position of the particle only changes after the trail, from the trail's point of view, the particle hasn't moved between the start of the frame and the trail.

therefore it spawns all the particles that should be spawned that frame at the same exact spot: the place the parent particle was at the start of the frame.

then, once the trail has spawned all the child particles at the same spot, the script evolver kicks in and moves the particle someplace else.

Here's a highlight of what appears to be a "single" particle, which is in fact a whole lot of particles (screens @ 15fps):


when the framerate is high enough, the number of particles spawned per frame is one or less, and you don't see that clumping anymore.

Here's the same thing with the script moved before the trail (still @ 15fps) :

Then, if you switch to the 'Distance' metric, obviously as, from the trail's point of view, the particle hasn't moved, it spawns nothing :)



answered by Julien (32.2k points)
0 like 0 dislike

Hi Greg,

both should work perfectly.

'Time' uses the actual dt as a spawn metric each frame (and accumulates it across frames to get precise spawns no matter what the framerate is), same with the distance metric, it computes the move distance of the particle each frame.

what version of popcorn are you using? 1.9.2 ?

when you say more particles are spawned when you increase the speed of the sim, do you mean when you increase the sim speed slider in the top toolbar of the viewport?

can you try changing the max framerate (button #11 here: http://wiki.popcornfx.com/index.php/Particle_editor_190#Top_toolbar ) from 'no limit' to, say, 30 or 15 fps? the number of trail particles should be the same no matter what the framerate is.

Could you export your effect in a .pkkg and send it to us on the support mail (or post a link here to a dropbox or whatever), so we can take a look and make sure there isn't something fishy going on.

Thanks :)

answered by Julien (32.2k points)