Solidify
Solidify is a node which converts a path into an arbitrarily thick fillable shape. It can convert a line into a rectangle, or a rectangle into a square donut. It will take open or closed paths, and can handle paths with contours.
It only works on the straight edges of the path. If you feed it a path with curved segments, it will treat those segments as straight edges connecting the endpoints of the curve. However, you can gain more control over the final output by first resampling the curved path.
Solidify takes two parameters:
- Path. The path you want to solidify.
- Thickness. The desired thickness of the path. This is similar to the strokeWidth of a colorized path.
If you feed it a path with up to six contours, like a lower case a, it will return a single path which will typically contain twice as many contours. For example, a percentage sign, which in most fonts contains 5 contours, will convert to an outline of a percentage sign consisting of a single path with 10 contours.
If you feed it a path with many contours, like a textpath of a long sentence, it will return an output which looks exactly the same but which consists of one path for each contour in the original path. This is normally not a problem, but for more control you can use my charpath node instead of textpath, which will the return one path for each character in the string.
Solidify is great for making outline fonts. It also allows you to apply gradients to what would normally be the stroke of a path.
The demo (see screenshot) shows a solidified text path and the outline of a rectangle, both with gradients applied.
I first apply the output of charpath for the string ABC which produces 3 paths, some with curves and contours. I use solidify to create outline characters with a thickness of 6. Because these outlines are now fillable, I can apply a gradient to them (a different gradient for each character). I also add an outline of the outline by colorizing the thickened paths with a transparent fill and strokeWidth of 2; again each character is outlined in a different color (zoom in to see this more clearly).
Because solidify ignores curves, the B and C character paths look a bit lumpy. You can improve this by feeding my resamp_curv node into solidify instead. This will require a tad more processing time, but will result in smoother looking outlines.
The second part of the demo uses two more solidify nodes. First, I use solidity2 to turn a straight line into a rectangle (tilted at a 6 degree angle) with a height (thickness) of 80. Then I use solidify3 to turn that rectangle into a rectangle outline with a thickness of 40. Finally I apply a gradient to the outline add a violet stroke to that outline.
For wacky fun crank up the thickness of solidify1 to 1000 to see the letters devolve into strange geometric patterns.
I've been meaning to make this node for YEARS. I wish I could handle Bézier curves, but that's really hard to do in a way which handles all possible cases. But this simplified version of solidify should work well for most situations and allows for some nice effects.
Enjoy!
-
solidify_screenshot.png
552 KB
- solidify_demo.ndbx.zip 262 KB
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