I have a set of points with an attribute ‘LineIndex’ that describes which line it belongs to. Now I want to create (copy) linestrips and connect all those points. The linestrips have a variable length however (some have 5 points, some 300). Is there a way to achieve this?
Only way I’m thinking is to create all possible linestrips with the maximum amount of points and only use the ones needed, but this gives quite an overhead.
Any ideas ?
Hello @timgerritsen
You could use a Topology POP and feed in the line strips information to create the primitives. You will probably need GLSL POPs to prepare the linestrip information.
In GLSL/GLSLPOPs_Update.toe in the samples, in LineStrips, there’s an example showing how this can be done.
Here is one more way plus 2 related techniques. Yes we need a new option in Line Break POP to make this easy. And better ways to get attributes of other points when doing math.
“then in Math Mix compare LineIndex to priorlineindex - 0 or 1.
which is what Line Break POP needs.”
just want to clarify this is exactly what Line Break already does when using “By Distance Threshold” which is the example I shared, no need for math mix
We’re using a 1d integer attribute, so Distance > 0.5 just means a different integer value
we can make it a bit more straightforward, replace “by Distance Threshold” toggle with a menu, second entry “by attribute”, and disable Distance Threshold in that case.