KCM calculate on first frame and keep value trough animation

I am trying to apply UV’s from nearest point on object to prt loaded particles.
all works fine, except that the KCM is recalculating the UV’s on each frame with the particle’s new position.

So, my question is, if there is a way to somehow bake this calculated UV from first frame to the particles, without going back to pflow and recache them?

thanks

hmm…was thinking maybe it’s possible with the scriptoperator to load the position value of the first frame. I’d need the particle ID as function input for the script operator though…

…investigating… :slight_smile:

KCMs are by nature and definition History Independent.
So it is NOT possible to pass any data between frames, the data is always recalculated on every frame.

In Krakatoa 2 (which is not out yet), it is possible by creating two PRT Loaders - one with the first frame, one with all frames. Apply the UVs KCM to the first, use another KCM on the second to copy the UV channel by index from the single frame PRT Loader to the animated PRT Loader. This will only work if the particle count does not change between frames and the particle ORDER does not change either (if you had a lot of events in the original PFlow, this might not be true).

Otherwise, it might be better to assign the UV coordinates within the PFlow simulation using the native Mapping operator.
Note that Krakatoa 2 also adds a checkbox to the Krakatoa Geometry Lookup operator to only update once.
In general, perform any History Dependent stuff in PFlow and all independent per-frame calculations in Krakatoa.

all right, then I’ll do so.
cool stuff coming up in Krakatoa 2!! :slight_smile:

thanks bobo!