Kangaroo2 Tuning (new questions)

Hi,
All the things I found out till now - please confirm or correct if I am wrong:

  • Rhino8 has the latest Version of Kangaroo2 allready installed.
  • The information on Food4Rhino is old and doesn’t apply to the latest Version of Kangaroo2
  • The latest version of Kangaroo seems to use multi-threading/parallel computing

Problem:
The script does not perform smoothly on my machine.

Situation:
The definition I use snaps a number of points (OnMesh) on a mesh and let me move these points (Grab) with a sphere handle in the Rhino viewport. I use a Kangaroo2 (Show) component as well. I use a standard solver.

Thanks to Martin for helping me building it! (https://discourse.mcneel.com/t/how-to-stick-movable-points-permanently-to-a-mesh/202745/17)

What I have done so far:

  • I balanced the strength inputs of both goals and the range of (Grab).
  • I set the Threshold to 0.000001 (1e-6) and Tolerance to 0.2.
  • Mesh is very reduced (8000 faces)

File
points_on_mesh_tuned.gh (226.2 KB)

Questions

  • Is my hardware capable for that script to perform smoothly?
    ( Laptop i7-12-core 2,3Ghz (max3,3Ghz), 32gb ram, RTX-3070Ti Laptop 8gb ram, SSD)

  • Does grabbing the sphere handles slow the process significant down than just grabbing the points?

  • Do the changes I made make sense?

  • What else can I do to tune my Kangaroo2 to have a smoother performance?

  • Is the C#-compiled version (https://github.com/Dan-Piker/K2Goals) of the (OnMesh) goal allready installed?

If not, would it bring any advantages?

  • Same question I have about SpatialGrid/Rtrees for Collision from Daniel Piker

K2 is multi-threading, but single core speed matters.

K2 is a particle base simulator. You operate everything based on points. When you grab, you grab points, not spheres.

echosori/Kangaroo-examples-NEW: Forked from AltamiroAJ. This repo is updating by

OK, thank you.

I do not understand it totally:
In the viewport I grab a sphere geometry from GH that is connected to the points that snap to the mesh and input KG2goals.

I connected the sphere component to the O output of the KG2solver

Does KG2 calculate just the points in my input list (MeshCP to goals) or does it calculate each sphere as a lot of points?

With my extremely broken English…

Threshold: Consider it as a tug-of-war scenario. When the two opposing forces are of comparable magnitudes, the movement of the center of the rope is minimal. At this point, the solver will halt the calculation.

What do you need the spheres for?

多谢 Li Quan! You’re english is good and I can understand everything!
The explanation of Threshold and Tolerance cleared a lot…thanks!..but I still have to understand more about KG2.

Why Spheres?
The spheres are a kind of user interface to move the points on the mesh.

The spheres should act like a handle for the points. Rhino/GH displays the points as a small X. It’s kind of hard to see and hard to grab.

I want a big handle: a sphere.

I grab the sphere and it feels like I grab the point. → I move the sphere on the mesh and it feels like I move the point on the mesh.

What is the problem with zombie-gumball solution?
zombie_gumball_points_on_mesh.gh (226.1 KB)

1.Problem: Snap

The gumball.gh brings another problem. If I use the gumball I am able to move the gumballpoints away from the mesh.

The Zombie moves them back on the mesh.

But I want the handle to stick/snap always to the mesh. (Handle is in this case the gumball (It’s ok!..but better a sphere))

  1. Problem: Preview

The GH-gumball will be only visible in the preview, if I select it on the canvas (make it green).

In the general preview without the selection of a specific component the gumball is invisible.

Hi Martin,

I need the spheres as a handle to control the points which later as you know will be the input for a curve on the mesh.

The solver doesn’t do anything with the spheres. You’re moving points.

Are you using the spheres as a visual reference?

Yes!

The spheres are like an UI for the points.

But not just visual representation…as well a tactile helper.

If i grab a sphere, I’ll grab a point.

If this is what you are looking for, I got better thing.

Thats a very good solution! Thanks!

…but…is it possible to use a 3D symbol…eg. a sphere? :wink:

Have you tried the display symbol component?

I tried to connect a sphere to the DisplaySymbol/SymbolDisplay component…it did not work.

It seems the D input on the DisplaySymbol/SymbolDisplay component does only accept 2D shapes.

Look in the same tab there’s a component to choose from a selection of symbols

I find three symbol components in the tab:

  1. Symbol (advanced)
  2. Symbol (simple)
  3. Symbol Display

I connect 3.Symbol Display input P to output V from the Solver.
I connect 3.Symbol Display input D to output D from either 1. Symbol (advanced) or 2. Symbol simple Component.

  1. Symbol (advanced) and 2. Symbol (simple) both have an input X. If I right klick on that I can choose from a list of symbols.

If I connect a sphere to the X input it wont work. It just skips through the list of predefined symbols and displays one.

A sphere isn’t a symbol style.

Circle closed looks like a sphere.

:+1: got it! :slight_smile: