I guess the "Trim paths" node trims these paths according to their Index number (in pink)?
Yes. If the paths/splines are part of a single curve object, then it is the order in which you created the splines.
If so - can I rearrange this order?
Not easily. One option is to separate the splines into their own curve objects (L and P combo) and then join them (CTRL+J) in the order you want.
I'd like the paths to be trimmed based on their X position. ... How would you go about that?
From Blender 4.1, you can use the Sort Elements node to sort the splines. The sorting weight can be either the start or the end point's X coordinate of each spline, which you get by sampling the splines with factor of 0.0
or 1.0
, respectively. You can use different factor if it makes sense for your use case. In edit mode, you can switch direction of individual segments/splines to control the sorting and animation flow.
See the animation results for factors of 0.0
and 1.0
(only difference is the order of splines 2 and 6).
For better control over the splines order, it would be wise to separate the splines into their own objects and put them into a new collection. You can then use the Collection Info and Realize Instances nodes to work with the splines inside the geometry nodes. With the Separate Children flag, the node will sort the splines by their curve object's name, which you can easily control.