Sweep for trailPOP

I’ve tried to build a sweep for the Trail POP, and I’m wondering if there a better way to do it, since my solution seems unnecessarily complex (file attached).

So I have a few questions and observations:

  1. Is there a way to get the Point Id as an attribute without using GLSL? I’ve noticed in the Lookup POPs there’s <_PointI>, but it doesn’t seem to be a selectable attribute in other POPs

  2. The trailPOP seems to create points in a sequence (1st input point’s 1st trail point, then 2nd input point’s 1st trail point, and so on), so there’s a lot of sorting points around

  3. The trailPOP’s output doesn’t have a constant number of points between frames, is this intended behavior?

  4. This wouldn’t work if the source of the trail would be a particle system with dying particles (the SkinPOP would need a ‘by attribute’ option).

  5. I’ve tried to colour the Annotations to make the patch look nicer but coloring the nodes is broken (it’s either red or no color).

trailSweep_POP_test.toe (15.4 KB)

In the meantime I’ve realised the direction vector could be passed on as a velocity before the trail, making the patch much lighter.
So I guess the TrailPOP is highly dependent on framerate being consistent, so I’ve got my answers to obervations 2) and 3). Still curious about accessing the Point Id though.
trailSweep_POP_test_V.toe (14.4 KB)

Hello @AuralEye

This has come up a few times, so we’ll aim to make it easier, we do have a couple RFE logged for that.
In the mean time, a slightly easier way is to use a line divide to resample each trail (which you can do by Id for a particle system) to the same number of points.

You can use the Line metrics POP to get a tangent vector - since the copy POP then uses an up vector the orientation can flip though - something we want to improve in line metrics.
In the case of a trail I think if you build the trail manually you could update a up and tangent vector that don’t flip. maybe something we could add on the trail POP as well as it would be cheaper than having to make sure orientation is consistent over an existing curve.

See How to skin each trail individually? for a longer discussion

Otherwise regarding your questions

You can use a Math POP (or a few others) to write _PointI to the attribute of your choice.

so if you output rows connectivity (for constant number of input points) or use match by attribute you’ll get line strips and you can then use convert POP Reorder points by vertex order.
with the line divide POP trick you end up with points ordered along the line strips

I think only if you drop frames and that should be corrected by Fill Missed Frames toggle, let me know if that’s not what you’re seeing, a video showing the problem would help then.

Yeah, we have it an RFE.

I think that was reported and fixed but I’ll confirm.
Edit: confirming this was fixed internally.

Thank you for the feedback let us know if you have more questions!

1 Like