Distance along curve (curve u) attribute for geometry nodes
I'm proposing that, either through a checkbox on the Curve Resample Node or with a standalone node, an attribute be added that defines the distance of a point on a curve along said curve between 0 and 1. This is already possible in Houdini, where the Curve Resample SOP gives the option to generate a 'curveu' attribute. This attribute would be very useful for controlling properties of instances that have been scattered on a curve based on this 'curveu' attribute. A simple sketch below shows how an attribute, r, could be mapped based on the distance, d, along a curve. I have little programming experience so I can't propose exactly how this would be implemented but given that Blender already has a Curve Length node, it should be quite simple to calculate the length between the 'start' point and each of the rest of the points, compare with the overall length and then map the values between 0 and 1, or something similar. I believe the addition of this attribute would greatly improve the capability of curve geometry nodes and their use in procedural modelling.
2 Comments
This is implemented with the "Curve Parameter" node in 3.0 alpha.
Great!