spline editor
Hi,
Is there a spline editor (ie pen tool in illustrator) in nodebox 3? I found a plugin for nodebox 1 but not for 3.
Thanks!
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by john on 23 Mar, 2018 01:58 AM
Sort of.
There is a freehand node. It works like a pen tool, but it creates a path made out of many tiny line segments, not a true spline.
To use it select the node then draw on the canvas. Whatever you draw will be preserved as a NodeBox path. You can add to the path or clear it and start over. You can then feed the path into a point node to see the individual points or into a resample node to modify the inflection points.
By using my fit_curve subnetwork (which requires a custom make_curve node) you can turn the freehand path into an actual spline. I have attached a very simple demo (see screenshot and zipped file).
Freehand feeds into a resample node to reduce the inflection points. That then feeds into my fit_curve node which uses the line segments of the resampled path to create a set of linked quadratic curves (similar to a b-spline). You can adjust the number of inflection points in the resample node and the "curviness" in the fit_curve node.
The end result is still not really like the pen tool in Illustrator. It's more awkward to use; you may have to fiddle with the inflection points and curviness before and after you draw the curve. You could improve my demo to provide finer control, but NodeBox will never be a drawing tool. In most cases it makes more sense to draw a curve in Illustrator, save it as an SVG, and import that into NodeBox.
Enjoy!
John
2 Posted by alex harding on 27 Mar, 2018 03:40 PM
Thanks for the reply!
This should be more than enough for my purposes.