I'm working on a Geometry Nodes setup and need help calculating the Factor for the Sample Curve node.
The goal is to distribute points along multiple curves such that the longest curve gets the specified point count, and the shorter curves distribute points proportionally based on the same segment length as the longest curve.
I’ve managed to calculate the point count for each curve using the following steps:
- Find the length of the longest curve using the Attribute Statistic node.
- Divide the longest curve length by the desired point count to get the base segment length.
- Divide each curve’s length by the base segment length and use Ceil to get the point count for each curve.
Now, I need to calculate the Factor for the Sample Curve node to distribute these points correctly along each curve. How can I calculate this factor so that it ranges from 0 to 1 for each curve based on its length and point count?
I would also like to be able to "preview" how it would look like while the instances, scroll/move/flow along each spline. Here is a gif from my original geometry nodes setup which only work on 1 spline, which have turned into a nightmare to work on at this point 😅😂