spline editor

alex harding's Avatar

alex harding

22 Mar, 2018 09:43 PM

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!

  1. Support Staff 1 Posted by john on 23 Mar, 2018 01:58 AM

    john's Avatar

    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. 2 Posted by alex harding on 27 Mar, 2018 03:40 PM

    alex harding's Avatar

    Thanks for the reply!

    This should be more than enough for my purposes.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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

Recent Discussions

19 Jun, 2024 12:57 PM
19 Jun, 2024 09:35 AM
15 Jun, 2024 01:44 PM
08 Jun, 2024 09:05 AM
08 Jun, 2024 09:00 AM