In recent version of rhinocommon, what is the best way to code mesh growth? I mean the system with mesh edges splitting after reaching some length. Previously people mostly used Plankton because of Half Edge stuff, and now? I heard about the thing like KPlankton, inside Kangaroo.
If by growth you mean something like this (my NVidia Quadros have no big sympathy for Rhino [does use OpenGL?]) :
then (if memory serves well) Daniel had posted similar stuff some time ago - but I can’t recall the thread name/date/in what Forum (this or the old one).
In any case (and unless some plug in is available) you’ll need code for that (mid to expert level). That said I have no idea what is available in R6/7 because I don’t use them.
Hey, unfortunately I can’t point you to some form of “best way”. But what I can tell you:
- KPlankton is a version of Plankton that is shipping with Kangaroo2, so it ships with Rhino 7.
- This is advantageous, since you can just reference
KangarooSolver.dll
and use KPlankton from there instead of having to get and install Plankton (or having your users get and install Plankton seperately). - As far as I know, there is no “native” half-edge datastructure in RhinoCommon (yet). Please do correct me if I’m wrong, would love to see this actually.
There is a tutorial series by @LongNguyen on youtube where Mesh Growth serves as an example. The course materials and examples should also still be available:
Hope this helps.
Plankton and KPlankton are probably the same thing with a different name.
There is no good way to code this in the Rhino environment because even if you use libraries that include dynamic remeshing (split and collapse edge remapping topology locally) or make your own dynamic mesh, as soon as the mesh grows a bit Rhino will become slow or freeze and having to convert it to rhino mesh doesn’t help either. I don’t know if there is already a library for GH that apart from dynamic remeshing supports parallelisation, but that’s what you need, that the local behaviour of the dynamic mesh (vertex updating, growth behaviour and retopology) can be carried over to different cores or the GPU.
You can use Plankton or create your own version of a mesh that allows local retopology. With Plankton or similar, you will only get fast results building on top of it but you will be restricted because they are not meshes designed for this purpose but have a more general purpose (half-edge meshes), with a custom one you can include the growth function or growth/cellular/membrane structures in the primitive behaviour of the mesh and that offers several design advantages, but it is time consuming as it is not something easy to program. Rhinocommon will only help you to visualise the result.
Here I made an n-gonal dynamic mesh from scratch and as you can see on the bottom right, the time is accelerated up to x4 at the end. Between being slow and very dependent on parameter variations (like particle systems) makes such generative systems very difficult to explore. But a lot of fun anyway.
Well in real life (unless CUDA is involved)… all King’s horses (and men, and cats, and dogs, and cores, and this and that ) …
Thank you guys!
Basically i know and used Long Nguyen tutorials, based on Plankton. So i am familiar with this aproach. I was thinking if there is any other way, maybe some new tools in rhinocommon. If Plankton is still the best aproach, than ok, works fine. I was thinking maybe something else
@PeterFotiadis Can you share the code from the last screenshot?
Have you replaced a for loop with a parallel for loop, or do you send different parts of the mesh to different cores and then recombine and resolve the seams?
No I’m afraid … but I’m sure that Daniel would provide - sooner or later - something good (as usual) on that matter.
Everything imaginable is used/tried (obviously thread safe) … that’s why I paraphrased Shakespeare/ Vonnegut
BTW: Of course there’s other ways (than a classic particle approach) to cut the mustard on that matter. For instance this (used for specific rnd rigid AEC trusses and the likes) uses Recursion on tetrahedra and delivers the goods in milliseconds.
Or this that is using the tetra grow for defining planes for on the fly Instance Definition placement etc etc.