Find Target / Particle ID to Vertex ID
#1
I would like to spawn particles on the exactly sorted vertices of an object (Birth Surface Operator, Vertex ID = Particle ID).
These particles are sent to the next target object as physX particles (Time Test Operator + Find Target Operator?).
The vertex IDs of the second object should act as targets for the particles with the corresponding IDs (Object Bind Operator?).

My question is if there is a way to assign particle IDs to target the corresponding vertex IDs of a specific object. - could something like that be realized with saving Custom Properties, or is there an even easier approach?
With Pflow I managed to realize such a setup, but couldn´t replicate it with TyFlow. 

Any hint would be awesome!
Thank you!
  Reply
#2
Hmm, you should be able to use a script operator to assign the proper custom properties.

In your iteration loop (with your target object added to the script operator in the first slot on the list), something like :

tf.SetCustomVector(sInx, "target", obj001.GetVert(sInx));

Then load that vector into the Find Target as the target position.
  Reply
#3
Thank you Tyson for that fast response!

I quickly tried your approach and it is working. The first test triggered more questions, but before going into detail I need to find more time to see if can solve some of these myself.
The first finding was pretty obvious. Aiming the particles at animated meshes seems tricky, as the vector set in the script is not updated but locked to the point in time as the particles are released to the next event - if I am not mistaken?
Is there a way to constantly look for the changed vertex positions of this object?
It would be awesome if the Find Target Operator would have vertex ID as Target Group.

Thank you again. I´ll make sure to provide a sample scene once I figure out more about it.
  Reply
#4
As long as "continuously update" is enabled in the Find Target, it should track the surface and/or custom channels you've enabled.

If you find the behavior is not working, you can send the scene to support@tyflow.com and I'll take a look.
  Reply
#5
I prepared a simple sample scene and uploaded it to the shared Google Drive:

https://drive.google.com/file/d/1b3DQBvi...5hMS70rHhc

  Reply


Forum Jump: