Position object property
#1
Hello,

I'm currently working on creating a cellular scene based off of the colorful image I've attached. I'm using tyflow to generate the green projections that connect the cells to each other, based off of a simplified version of the freiOtto example file.

I've made all the individual cells 'position objects' to birth the particles from, and then using a 'find target' (with all the individual cells again, set to 'closest target') to spawn the particles by travel and generate a spline. 

The issue I'm running into is that a lot of the time the closest object is the same position object that the particle was generated from, so the spawn trail ends up attaching to its original cell instead of a new cell. Is there a way to save the particular position object a particle is generated from and then test to make sure the target object is not the same?

It's not the worst issue to have but it does mean that I have to increase the birth number of particles a lot so that there are enough 'correct' projections visible.

Thank you so much for the help! Let me know if I can clarify anything.

-Alexia

I've also attached an earlier version of what my scene looks like, in blue are the generated splines.


Attached Files Thumbnail(s)
       
  Reply
#2
That's an interesting use-case. Unfortunately the Position Object operator doesn't have an option to save the scatter object index to a custom float, so you can't use clustering directly to prevent self-attachments (which is what you'd normally do here). I'll make a note to add that in the future.

Here's a workaround you could use. It requires a completely different setup, but should give you the result you want:

1) Use a Birth Object operator and add all the big bubble objects to it. You should now have as many particles as there are bubbles.
2) After Birth Object add a Custom Property operator and save Birth ID to a float channel
3) Add a Spawn operator after that, and choose parent shape surface as the position for the particles. Send those spawned particles out to a new event. Set the per-particle spawn count to a very large number so you get the density of smaller particles that you need. You may need to increase the Spawn operator limits as well.
4) In that new event, add a Particle Bind operator, set the search radius to however long you want the longest connection to be, enable clustering, choose the previous Birth ID channel you created and set the mode to "not equal". Now particles will bind to other particles whose birth ID is not equal to their own (ie, particles on other bubbles).
5) At this point, you'll still have a lot of particles left that didn't bind to anything, because spawned particles were created over the entire bubbles, not just between their crevices. So add a Property Test and test for bind count less or equal to zero, and delete those particles.
6) Finally add a Spline Paths operator and create paths between binds. You may also want to de-activate the spawned particles with a Particle Switch if you don't want their binds to be simulated.
  Reply
#3
Thank you so much for the workaround! I'll give it a shot Smile
  Reply


Forum Jump: