How does the property test for neighbours work?
#1
Ok, another one I don´t get...What does the property test for neighours actually do or not do?

Whats the value for, that you can enter for greater/less etc?

And whats the search radius do?

Or with an example, to illustrate how I would like it to work:

Event A is set to particle group 1 and sends out its particles to Event C.
Event B is set to particle group 2

the particles from both events fly around and have fun.

Event C has a property test for neighbours.
I´ll set it to 1 and less or equal and the search radius to 10 cm and send it out to Event D.

What I expect:

All Particles from group 1 should be sent out from Event C to Event D, once they are within 10 cm or less to particles from group 2 (Event B).

What I get:

None of that.

Is the neighbour test not intended for this scenario?

Please enlighten me, because this is something I would like to master...
  Reply
#2
The neighbor test returns the number of matching neighbors within the defined search radius.

So if your condition is 'less or equal', it will send out particles which have zero neighbors (0 <= 1) immediately. Is that what you want? Or the opposite? Set the condition to 'greater or equal' and particles won't be sent until a neighbor is found.
  Reply
#3
I did a similar thing recently to change the color of particles when it came close to its neighbors in a different group. Sounds exactly like what you are describing. I posted the max file in the forum thread called "Changing color based on neighbor count and time (solved)".
  Reply
#4
(05-07-2019, 07:11 PM)tyFlow Wrote: The neighbor test returns the number of matching neighbors within the defined search radius.

So if your condition is 'less or equal', it will send out particles which have zero neighbors (0 <= 1) immediately. Is that what you want? Or the opposite? Set the condition to 'greater or equal' and particles won't be sent until  a neighbor is found.

Hm, the opposite is basically what I want...
And if I´m getting that right, if I´m setting the value to lets say, particles won´t be sent out, unless they find 10 neighbours within the search radius, right? Now it sounds useful...Wink

Also I got it working, simply had the test in the wrong event because I´m an idiot...so I tried to test some particles that weren´t even born yet...doh.

All fine and dandy, super useful!

Starting to get the hang of the groups slowly...
  Reply


Forum Jump: