POP particles effector

Hi all,

I am building a simple particle interaction system and decided to go the POP way.

For now i have a point generator tu build the particles and instancing a sphere at point positions. I make them move using a noise TOP.

Now i would like to interact with the particles using a device or webcam like spread the particles using the hands. My idea would be use a sphere at hand position and make it push particles back like an effector. I usually use SOPs for that matter but i can’t see a way in the POP world.

I don’t want particles to be spawned, i need interaction with floating particles

Attached the project so far.

Any advice ?

pop_particles.tox (1.9 KB)

A good start is looking at the examples on how to use forces with particles under Help- > Operator Snippets → POP → Particle POP and then also check the snippets for the Force Radial POP

Thanks. I already had a look at Force Radial but couldn’t make it to have any effects on generated particles. It seems to be working only when using Particle POP. Though i don’t want particles to be spawned and have a life duration, i just need to interact with a fixed particle amount that just live there, hence using Point Generator. But i can’t find a way to interact with them using a local effector.

The Force Radial POP itself doesn’t actually directly move the points around. It creates or modifies the PartForce attribute which is then typically used by the Particle POP (in a particle feedback loop) to affect the velocity of each point in the particle system.

You might be able to figure out how to use that PartForce attribute yourself to move the points around using like Math POPs or something, but I don’t know for sure. There also is probably a way to get the Particle POP to not continuously create new particles and just keep working on the initial ones, but you’re going to need to do some digging / experimenting yourself to find out more.

Yeah if you don’t want to spawn new points with a lifecycle, you probably don’t need to get into the Particle POP. It does unlock some velocity/force/drag shortcuts, but you probably don’t need that for your use-case.

The Field POP is pretty handy for making spherical effects. Here in the attached file, I’m using it to establish a weight of repulsion, and a Transform POP to do the repulsion (via scale from a pivot set to the centre of the field).

Since the Field POP doesn’t look like anything, I find it’s helpful to render some test geometry so you can see where the field should be.

The field is creating a weight, with a falloff, from 1 to 0, the farther it is from the centre of the sphere. This weight is set as a multiplier on the effect of the Transform (via its Weight Attribute setting).

Have a good read through the docs and the op snippets, because some things in it like the transition range and alignment aren’t the most obvious. Also the POP Viewer from the palette can be handy for seeing weights, or POP to DAT.

If you can sort out getting hands to control the field positions via Mediapipe or similar, that seems like it would do what you’re after.

pop_particles_field_repulsor.tox (2.6 KB)

Hi,

Thanks a lot. Not quite there yet but it definitely adds some tips to my knowledge ! Not sur i understand the role of the pivot scale and transform but i’ll have a closer look to it.

Actually i need to add some sort of velocity/force/drag so the particles keep moving randomly but pushed away to a farther position. I added a feedback (not sure it works the same as i am used to with TOPs though). It sort of work but they stay still as if the pop noise had no effect.

I’ll have a closer look and i should see some solutions emerging.

For points, scale will move them to a new location relative to the pivot point.

If you just toss a sphere of points into a Transform POP with scale, and don’t adjust the pivot (left at the origin 0,0,0), every point will just have its coordinates multiplied by that amount. If the sphere is also centred on the origin, it will grow evenly in all directions. If you move the pivot to the very bottom edge of the sphere, it will still wind up being the same size, but will grow upwards rather than evenly in all directions. If you set the pivot way outside of the sphere, scaling up will also move the sphere away from the pivot. You can think of scale as a multiple of the distance from the pivot.

So with my example, I’m setting the pivot to the centre of the field so that the points move away from the centre of the field. Scaling naturally has a larger effect on position the farther the point is away from the pivot, so the weight & its transition falloff help counteract that. Being farther away means scale has more impact, but with this setup, farther away has less weight, so reduces the impact.

If you do want your own velocity implementation, Feedback POP is the right way to do it. You’d do something like this:

  • Point Generator POP to start
  • Connects to Attribute POP, creating a new custom Float 3 attribute called Velocity, set to 0,0,0. (No initial velocity).
  • Connects to Feedback POP, targeting the Null POP at the end.
  • Change velocity somehow. Maybe with a Noise POP. On its Output page, Add Noise to Velocity (instead of default P) and output to Velocity.
  • Use the Velocity to update P. Some ways to do that:
    • Math Combine POP, with Operation A + B, adding P + Velocity with the results going to P. Doing any math on P will make points move.
    • Transform POP, using the Mapping page, with Element set to Velocity, Target Parameter set to t (Translate), and Combine Operation set to Set. This overrides the Translate portion of the transform with whatever’s in Velocity.
  • Add a Null POP to be the anchor of the end of the feedback loop, and set it as the Feedback POP’s Target POP.

Note that this will make the velocity be an amount of change to the points’ positions every frame, and so is subject to framerate changes & fluctuations. If you want velocity to be a movement of units per second, you’d need to do some extra math using a time delta from frame to frame.

The most likely reason you weren’t seeing your noise do anything in your feedback is if it’s connected upstream of the Feedback POP. Feedback (whether TOP or POP) takes its upstream OP as the momentary starting conditions, and then changes from there need to be in between the feedback OP and its target OP. To have it acknowledge anything happening upstream, that needs to somehow influence an op within the loop, or you need to restart the feedback.

If you just want a bit of noise applied after everything else, you could put it after the feedback loop ends.

oh wow ! that’s what i call a comprehensive and full of useful information answer !

I will dig into all those great suggestions and try to work something out of it !

Thanks a lot for all the details and your time.

Hi,

Nearly there (i think)…

I have added some POP processing for velocity/acceleration/drag features. Seems to be working though i am limited to positive movements : all affected particles move move to the top right corner.

I think this has to do with acceleration being always positive. I think i need to compute some vector direction relative to field movement to repel particles away from the field according to its moving direction. Seems to be the case when using the field with its “default” values but i loose that when i add velocity/acceleration process

This is where i remain stuck…

Any help ?

POP_effector.tox (3.7 KB)

Hi,

Digging this up. I can’t find a solution.

How would you push particles away ? How would you compute a direction vector from the field movement for instance (this is the solution i can think of) ?

thanks