AWS Thinkbox Discussion Forums

Nth Nearest Particle?

Ok, so I am using NearestParticle, but how do I find the SECOND closest particle? Possible?

  • Chad

Added to the wish list.

Yeah, I was trying to make a Delaunay pattern based on another particle system as the seeds and quickly hit this wall.

Though I suspect with your MRay example with the TraceRay and Omni001, you can see where doing any iteration at all would be useful.

I’ll look at adding a node for that. In the mean time, you can use two ParticleSumCount nodes to calculate this. Have one sum the first N particles, and the other sum the first N-1 and then subtract their results. Make sure the falloffPower is set to 0 though (so that its a straight up sum instead of weighted sum).

Privacy | Site terms | Cookie preferences