Notifications
Clear all

[Closed] pflow and maxscript

Hi!
I have the following problem: I have a txt file which saves the particle positions per frame like:
Frame x:
pos_particlex
pos_particley

Frame y:
pos_particlex

Is there a possibility to read in this file in pflow, because I don’t want to set keyframes.
Thanks for your help
respectfully, cgneuling

4 Replies
 3ak

There is FileStream class in mxs. You can use it in script op and birth script op in pflow.

Hi!. Thanks for your answer. I can read in text files, and I have now read something about the birth script, but I don’t know exactly how it works. What I have understood is the following: I have to add particles to the container and I have to give them an age of 0, but how can I say that in frame 0 particle a shoul have the position (x,y,z) and in frame 1 particle a should have the position (x2,y2,z2) and so on?

 3ak

I’d store at least id and position in text file.
Then in every frame you parse your file and find what particles id are referenced and if there are new ids (not present in the scene in this frame) birth script will create them (and possibly place them using pos info). Another script op place every existing particle according to pos info in file. Or do it in one script op.

Hi!
Does this mean when after I birth all particles, I should write:
animate on
(
at time t particle_id.position = saved_pos
)
? but this would create keyframes at each frame. Is it possible to not create any keyframes?