Replace Shape Geometry
#3
Hey Tyson. Thanks for your answer.

I´ve tried to store the Shape ID and use it in the Birth Flow shape operator. It didn´t work. Shape distribution was not the same.
Figured out that there is an "off by 1" bug.

With this script it is working.

public void simulationStep()
{    
    

    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
        var shapeID = tf.GetCustomFloat(sInx, "shape");
        shapeID = shapeID +1;
        tf.SetCustomFloat(sInx, "shape",shapeID);
    }    
    

Is there a way to store the Shape ID in TyCache and use it later with BirthFlow?

Thank you.
  Reply


Messages In This Thread
Replace Shape Geometry - by Hamsel - 08-09-2019, 02:58 PM
RE: Replace Shape Geometry - by tyFlow - 08-09-2019, 11:47 PM
RE: Replace Shape Geometry - by Hamsel - 09-12-2019, 01:13 PM
RE: Replace Shape Geometry - by tyFlow - 09-12-2019, 02:48 PM

Forum Jump: