Hair & Fur 2 PRT write ID channel

Is it possible to have the particle stream script HairAndFur2PRT write a prt particle ID channel? I was playing with the pflow PRT Birth/Update and got the no ID channel warning, of course I am not sure how it would work if it had it but just a thought.

Well, the ID channel is needed to ensure the birth and death of particles. As the PFlow Operators tell you in that message, if you don’t have an ID channel, the ORDER (Index) of the particles will be used instead. I assume that a snapshot of hair splines over time will produce the same number and same order of particles (I am quite sure it would, as long as the number of hairs and segments does not change over time), so it should work without. Alternatively, an ID channel could be written to the PRT file (I will take a look at the code to see what changes have to be made), or you could use the Index input channel to output to the ID channel using a KCM on top of the PRT Loader used by the PFlow - I think that will make it shut up :wink:

Yep , thanks Bobo, that worked like a charm!

-John

About the particle motion translation it works now, for some reason I had to remove the PRT birth/Update and replace them with a fresh operator. PFlow seems to be holding on to the first PRT that was loaded into each of the operators. Removing and replacing seems to fix the issue.

I created a quick Hair sim, saved to PRT and contrary to my previous statement, the count between frames is NOT the same when simulated with dynamics. This is because the number of particles per strand is not constant but dependent on the length of the hair. In other words, as the hairs are moving due to dynamics, their length changes and no two consecutive frames have the same particle count.

It would require a rewrite of the script to create a constant particle number per hair strand to solve this.

May I ask why you are trying to load the PRTs into PFlow in the first place?

Just FYI, I was able to get it to work just fine, using the index to ID trick you mentioned. So the workaround is just fine. The particle count does change slightly (as you mentioned), currently it starts at 256623 and fluctuates ± apprx 500 particles, so it is handling it OK as far as I can tell, I don’t think it minds too much that it is changing and I don’t think it would even be noticeable. So really, problem solved :slight_smile:

Well basically, I was experimenting with some particle spawning and thought it could be an interesting way to emit fume from the dynamic strands, i am curious what it might look like. I was thinking of a dynamic birth object with growing hair and spawning from the strands and repiping fumefx follow back through after the initial spawn+fume pass was simulated.