I'm interested in creating a particle effect where one particle gets ‘infected’ (goes red) and the infection spreads to it's neighbouring particles.
In the uploaded file any particle within a certain distance to another gets infected. And when it's infected it activated the Pop Interact which sucks other particles towards it. It's half way to what I want.
What I really want is if the two particles are within a certain distance AND one of the particles is infected they both get infected.
I'm scratching my head a bit because I'm not sure what process I'd use to do this. Any pointers on a direction would be appreciated but go easy because I'm still very much learning.
Virus Spread/Infection/Proximity POPs
3316 1 1- Simon Russell
- Member
- 164 posts
- Joined: Feb. 2014
- Offline
- goldleaf
- Staff
- 4159 posts
- Joined: Sept. 2007
- Offline
One idea, have an integer attribute that tells if a point is infected or not (i.e. i@infected = 0, then change that to 1 whenever they're infected.
Then, since POP Proximilty gives you the nearest point id (@nearest), you can look up the nearest point's infected status in a POP Wrangle (after the Proximity, but before the POP Group), with something like this:
@infected = point(0,“infected”,@nearest);
And adjust your POP Group's expression like this
ingroup = (@nearestdist < 0.01) * @infected ;
Hope that helps!
Then, since POP Proximilty gives you the nearest point id (@nearest), you can look up the nearest point's infected status in a POP Wrangle (after the Proximity, but before the POP Group), with something like this:
@infected = point(0,“infected”,@nearest);
And adjust your POP Group's expression like this
ingroup = (@nearestdist < 0.01) * @infected ;
Hope that helps!
I'm o.d.d.
-
- Quick Links