For many use cases it is necessary to instance geometry along a curve, for things like rock paths, roads, etc. In those situations the following information is needed:
- Scale (sometimes)
- Alternatively a transform matrix could be used directly, but that isn't currently possible in geometry nodes, since the information is stored as attributes.
Currently in geometry nodes you can generate instances on any point data. That includes point clouds, meshes, and curve control points.
With their evaluated tangent and normal information, curves have the unique ability to adjust these parameters very efficiently (quick changes can have big results on many instances).
However, curve control points do not have the required tangent, normal, (and therefore rotation) information for instancing.
To retrieve that information, evaluating the curve is necessary. This can create tangent, normal, and rotation information.
The question is where to store this information:
- On curves, this is derived information, meaning changing the curve would "logically" change this data (not necessarily in practice).
- On point clouds, this data is simply a flat list. In other words, there is no correspondence between it and the original points.
Generate a new point cloud
This method would not modify the curve but create point cloud data instead, copying over all of the curve attributes to the result.
More operations like "resampling" could be in the same node.
- Simplicity: Separation of data logically (point clouds are "points" more directly than curve splines
- No confusion about derived data (the curve is no longer around)
- Complexity: There is no essential need to create a point cloud to do instancing. This is evident with how we handle meshes, where you can easily do instancing on points (even faces in the old system)
- Performance: Copying attributes around during evaluation is not at all trivial
- Arbitrary: Does not use the fact that attributes are stored on geometry to our advantage. In this case the point cloud is just an "array container"
- Code: The required code is harder to maintain, more confusing, and requires more duplication
- If there are more operations in this node, they are duplicated from operations that keep the curve a curve.
This method takes advantage of the 1 to 1 correspondence of evaluated points and control points on poly splines.
All Bezier and NURB splines are converted to poly splines, and three attributes are added: tangent, normal, and rotation.
- Use curves to our advantage: We can adjust the resulting attributes using methods unique to curves with the maintained "topology" information.
- Performance: In many cases only three attributes need to be added. The operation is much simpler. And the data can be used later for other curve-related things.
- Standard: Sverchok and AN both have similar nodes
- Simplicity: There is no unnecessary change of data type
- Complexity: Exposes users to the different spline types when they might not have known about it before.
- Subsequent curve operations maintain these attributes, even they they are derived