Faster Explosions

john's Avatar

john

14 May, 2024 01:29 AM

While working on a recent project (signed direction) I made a breakthrough: a faster, cleaner way of exploding paths.

I explode paths (break them into individual curves and line segments) all the time using my explode node. For years I've searched for ways to make this node simpler and more efficient without success. But last week I finally saw a way!

And, initially, it looked like it might be MUCH faster, as much as SIX times faster. This could be revolutionary because many of my other nodes have an explode node inside them, including nodes like Clip, Occlude, and Sub_Path that bog down when put under strain.

It turns out, though, that my new explode node is only significantly faster when used on long, complicated paths. And it turns out that such paths are rare. The other nodes that use explode already organize things to avoid exploding long paths all at once, so when I tested them I found no significant speed gains at all. Days of testing for a disappointing result.

Since there is no significant speed gain, I don't feel it's worth the risk and bother of updating all those other nodes. But the new explode node does work perfectly well, does run faster in rare cases (and no slower the rest of the time), and is cleaner inside. So I am going to update it.

Also, in all my testing, I did find one other node that was slightly improved: even_sample. The main reason for this is that, in one subnetwork, is was exploding things twice when it only had to do so once. When I replaced the explode nodes and fixed that one problem, even_sample did run up to twice as fast when in "Curves Only" mode. So I am updating that one too.

Attached please find a demo with the newly updated versions of both of these nodes (see screenshot). You can start using them now, or wait until I include them in the next release of my library.

Meanwhile, if anyone out there has a project in which one of my library nodes seems to be taking too long, please post a note on the forum and let me know. I will add the new version of explode inside other nodes if I can find compelling use cases where doing so would make a noticeable difference.

Reply to this discussion

Internal reply

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

Attaching KB article:

»

Already uploaded files

  • new_explode_screenshot.png 504 KB
  • explode_and_even_sample_demo.ndbx.zip 22.5 KB

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

23 Jul, 2024 04:46 PM
22 Jul, 2024 07:50 AM
11 Jul, 2024 03:48 PM
28 Jun, 2024 01:51 PM
27 Jun, 2024 02:56 PM

 

27 Jun, 2024 01:57 PM
26 Jun, 2024 08:17 PM
26 Jun, 2024 11:35 AM
24 Jun, 2024 02:42 AM
24 Jun, 2024 12:46 AM
23 Jun, 2024 08:07 AM