Set SimIndex to EventIndex
#1
Hi,
Is there a way to change particle SimIndex to the EventIndex (Order of entering the event)?
Thank you

Maybe I approached it wrong.
I am trying to morph particles from one object to another based on the objects' vertices numbers with SurfaceTest and FindTarget Operators.
IMAGE:: https://drive.google.com/file/d/17uMZbcX...sp=sharing

I use a script that I found with a FindTarget operator:

//Here is a sample script showing how to modify particles in this event:
for (int i = 0; i < eventParticleCount; i++) //this for-loop iterates through all particles in this event
{
int sInx = tf.GetSimIndex(i); //for each event particle, we fetch its simulation index
tf.SetCustomVector(sInx, "target1", obj001.GetVert(sInx));
tf.SetCustomVector(sInx, "target2", obj002.GetVert(sInx));
tf.SetCustomVector(sInx, "target3", obj003.GetVert(sInx));
tf.SetCustomVector(sInx, "target4", obj004.GetVert(sInx));
tf.SetCustomVector(sInx, "target5", obj005.GetVert(sInx));
}

But it sends particles based on SimIndex. Problem is that I want to change the order of particles to be sent based on the SurfaceTest Operator.
How can I do that?
  Reply


Messages In This Thread
Set SimIndex to EventIndex - by coresmith - 01-23-2022, 11:37 AM

Forum Jump: