Distance Threshold Cplusplus CHOP (plexus-like effects)

Hi,

This is the cpluscplus CHOP which allowed me to do the connecting lines effect in vimeo.com/71549715

Binary with example : github.com/vinz9/DistThresholdCHOP/releases/
Source Code : github.com/vinz9/DistThresholdCHOP/

There are x86 and x64 dlls and example files for Touch077 and Touch088 x64, I was a bit lazy to convert the GLSL shader from 088 version to make it work in 077 so it’s using another slower cpu based method in 077, feel free to convert the shader from the 088 file!

And I don’t think you can load .dll in the free (FTE) version of 077.

I didn’t spent much time on this so it’s a bit rough but it sort of works, and it may help those who want to get started with c++ in Touch.

Cheers
Vincent

Sweet, when I first checked out Plexus this past winter I thought “Oh I’ve got to build this in Touch” Stoked to check out what you’ve done. I started getting into a little C++ last winter, maybe I’ll be able to add some functionality to this and the Bullet chop when I have some time at the end of the summer.

thanks for components
Keith

I have made some enhancements to the DistThresholdCHOP.
It now supports specifying both a minimum and maximum threshold, and an alternate mode where it finds connections from one set of points to another set of points, optionally limiting the number of connections from each source point (though there might still be some bugs with that part).

It is available on github here: https://github.com/t3kt/DistThresholdCHOP.

Cool! I’ll check it out. I made some as well in the same vein as yours but it was in a rush for a project so I didn’t take the time to update the repository… :blush:

Super cool! Can’t seem to get the connection number limit to work here on my end. Were you ever able to sort that out?

I eventually rewrote it here: https://github.com/t3kt/threshold, which uses shared code that can work either in a TD C++ chop or in openFrameworks-based C++ applications.
There are still some bugs though. If you want to fork the repo and fix things, you can submit pull requests and I’ll merge your changes into the main repo. Otherwise you should be able to report issues in the repo (probably in the “threshold” one, rather than the older “DistThresholdCHOP” repo), I’ll try to get around to it when I have time.
The debugging process with C++ OPs is rather cumbersome, so at this point I’m leaning towards doing it in a GLSL geometry shader of some sort, though I’m still figuring out how that would work. I also put together a really basic version of it in a ScriptSOP, though it’s way too slow to use for anything big.

Hey tetkin, it looks like a wonderful project. However I opened with my 099 and it kept saying .dll import fail. I checked the path and looks everything is correct. Do you know the reason?

File an issue on Github and I’ll take a look https://github.com/t3kt/threshold/issues.
Include as much info as you have such as OS version, TD build number, 32 vs 64-bit, details of error messages, etc.

This took me so much further with my current project - Thanks so much for sharing :slight_smile: :nerd:

I have an issue with loading the DLL.

See my previous reply:

Guys make sure you have a commercial licence, it`s required for cplusplusCHOP

(Works for me on windows 11 99 build 107000)

  • I should add a big thanks for sharing this :slight_smile: looks great.

Vincent’s example runs without any problems. Thank you for sharing!

I just have a framerate issue when trying to increase the max distance and decrease the max number of lines.

Probably with a complex geometry this is too hard to calculate? Any ideas how to cheat it?

Aside from reducing the number of input points, I don’t think there’s a good way to get around it.
It’s probably possible to reimplement this whole thing using a compute shader but I haven’t gotten that working yet.

Hi ! Sorry to necrobump this thread but i’m trying to test this custom chop and no lines appear. I grabbed the latest version on github and am using touch 2020.24520. Could this be the update broke something ?

Hello, there were some changes to the instancing, you have to change the instance count mode on lines geo to manual and put op(‘linesChop’).numSamples, the automatic doesn’t work anymore in this case since the instancing attributes are not used (the shader moves the lines in the right place using samplerbuffers).

1 Like

Thanks a lot ! It works now.

1 Like