tyFlow Forum
spawn towards nearest particle possible? - Printable Version

+- tyFlow Forum (https://forum.tyflow.com)
+-- Forum: tyFlow Discussion (https://forum.tyflow.com/forum-1.html)
+--- Forum: General Discussion (https://forum.tyflow.com/forum-2.html)
+--- Thread: spawn towards nearest particle possible? (/thread-684.html)



spawn towards nearest particle possible? - joe_coke - 05-23-2019

I've got 10000 particles scattered on a torus surface.  I want to grow splines to join the paricles, however i want to start from 1 particle (or some random ones) and i thought spawning via travel distance from this origin to its neighbours (based on a distance threshold).  Is this possible?  I intend to spawn from these neighbour particles outwards etc until the torus is covered.

I have tried flocking with rubbish results.


RE: spawn towards nearest particle possible? - joe_coke - 05-23-2019

Ok so i'm now trying to get a fake growth setup to work.  I figured i could birth 1 particle then spawn multiple offset a distance using the spread operator.  After that i spawned at a rate per sec and tested against a binding absolute distance to keep the particles apart and end up with a nice even (not symmetrical) cover of the surface.  Problem is the spawned particles jump position every frame, so i added a test against event time to freeze after they had found a valid position. alas, still plenty of position jumping.

https://www.dropbox.com/s/nsl0lat9en4cfw6/Screenshot%202019-05-23%2017.09.06.png?dl=0


RE: spawn towards nearest particle possible? - tyFlow - 05-24-2019

You can use groups and neighbor tests to simulate growth, and then use those same groups within a spline operator (set to neighbor mode) to bind only between the particles of the growing group.

Attached is an example scene for you to reference.


RE: spawn towards nearest particle possible? - joe_coke - 05-24-2019

that is such a simple solution, thanks for the scene.


RE: spawn towards nearest particle possible? - MonosP - 05-24-2019

That's awesome and thanks for the sample scene, I was about to ask a very similar question when birthing with voxels.


RE: spawn towards nearest particle possible? - joe_coke - 05-24-2019

now, if i wanted to take this further - as the splines snap on with the distance threshold and the paricles not moving.

Could i substitute the distance threshold for maybe a time threshold, so as particles become active in the group the spline can use the variable radius on age instead of length?


RE: spawn towards nearest particle possible? - joe_coke - 05-24-2019

Well i got a little something by adding an intermediate event with some variable time delay and a flocking force.

https://www.dropbox.com/s/qyxxoqrkurf4v08/Screenshot%202019-05-24%2017.45.49.png?dl=0