Page MenuHome

Geometry Nodes: Add Curve Parameter Node
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Sep 17 2021, 8:18 PM.

Details

Summary

This commit adds a field input node that outputs the fraction of the
total length of the spline on each control point. This is useful for
anything that involves varying a value depending on how far along
the spline it is.

It also works when evaluated on the spline domain, where it outputs
the fraction of the total length of all of the splines at the start.

The operation isn't as well defined for NURB splines for the reasons
noted in the code comment. That can be said explicitly in the docs.

Diff Detail

Repository
rB Blender
Branch
geometry-nodes-curve-parameter (branched from master)
Build Status
Buildable 17110
Build 17110: arc lint + arc unit

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Sep 17 2021, 8:18 PM
Hans Goudey (HooglyBoogly) created this revision.

I wonder if this node should eventually have an additional length output. And eventually maybe an overall parameter/length across all splines. For now this is fine.

I'm also considering adding a Factor output to the Index node, which would be quite similar. Essentially, I'm fine adding multiple outputs to these nodes when they actually encode the same value in a slightly different way.
Was just wondering, if the Index node should output the point index in the current spline or overall index. Or if that should be a separate node. A Spline Index node might be nice either way.

This revision is now accepted and ready to land.Sep 21 2021, 7:18 PM

I like the idea of having a length output here too. I'll call the current output "Factor" to distinguish it from that.

I think the index node should probably be flattened, so a spline index node would be useful for the index in the spline.

This revision was automatically updated to reflect the committed changes.

Can this please be in the "Input" Menu. would be more organized

We're going to have lots of nodes that could be in the input category for various builtin attributes, etc. I'm not sure putting all of them in the input category is an obvious improvement.
We have a task to go over the nodes menu and make sure all of it makes sense before turning fields on in master, so that may change in the future, not sure.

Ok. Thanks for your greate Work!!!!

For the output both 'parameter' and 'factor' are not very descriptive, I believe 'fraction' is a more descriptive and also more correct term to use?