Is there a way to manually trigger particle creation in the Particle SOP?
I’d like to have a particle system where particles get added in response to events.
It would be really nice to have a Python method like particles.spawnParticle(position=…, velocity=…, etc)
The closest approximation that I have involves using an Event CHOP to build a set of points which are fed into the Particle SOP as the particle source, but that doesn’t control when the particles are created or how many particles are spawned from each source point.
Depending what your end goal is, an Event CHOP based particle system might be the way to go. Skip the Particle SOP altogether, and instance geometry based on the Event CHOP channels (probably with a few Lookup CHOPs driven by ADSR)
If you want to use Particle SOP specifically, you could try modulating the Birth parameter. Have it rest at 0, then when you want to “spawn” a bunch of particles you would momentarily increase the birth count as needed. Unfortunately it is births per second, not simultaneous births. Maybe a large enough value pulse will do the trick. I haven’t tried it yet, but I guess it would be spawnCount*frameRate pulsed for a single frame. In theory, at 60fps, if you set birth to 60, it would distribute 60 births over 1 second, thus 1 birth per frame. I imagine this would be good for spawning larger “puffs” of particles on each event trigger, but I don’t know if it would be precise enough for adding exactly 1 new particle per event trigger in a realtime application.
I’m currently using an Event CHOP to manage the spawn points. I had wanted to be able to use the turbulence and collision features of the Particle SOP, but there might be ways to approximate those with the Event CHOP.
I have the number of spawn points coming from the Event CHOP controlling the birth rate. It isn’t exact, but it’s at least something.
So I finally tried the method that I had (blindly) suggested for pulsing the Particle SOP birth… and it works! Here’s a video explaining the setup: youtube.com/watch?v=bO2HNy_wbJc
I ended up going with a similar approach, with less precision and more focus on modulating the rate of spawning.
Maybe i’m stupid, but when i copy the parameter [root.time.inc] in the multiply, it pastes 0.16666 not 60 like your example.
I don’t know why!
Thanks in advance!
You might pasted the whole expression 1/root.time.rate
You only want to copy root.time.rate