Wish: The GH Play Button - Time-based Simulations


My wish would be a Play button in GH, that then starts an iterative counter. This would allow GH to better deal with time-based or iterative simulations. Various GH plugins already use their own iterators, like Kangaroo, Quelea, ESO-BESO simulations, Anemone etc. If something like this was inbuilt, it would make it easier to understand and easier to modify and work with. Strange cables going from the right of the canvas back to the left could be eliminated. Images or videos, possibly rendered, could be saved automatically, camera movement could be controlled through GH. Or maybe just one variable changes over time and shows how a model can morph dynamically.

Like this, GH could very easily do all the things Processing now does. It could become something like the amazing ICE-tree of Softimage that got murdered by Autodesk. And it wouldn’t have to be too much of a programming effort, for the start just a counter with a frame count output, variables that can be changed from frame to frame, and a beautiful Play button at the top of the screen. The rest can come later.

Thank you very much!


What is the relation between play button and the canvas?

Usually, cables on the canvas go from left to right. But with some loop plug-ins, the cables have to go back from the right to the left as they become the input for the next iteration.

But you want play button for example to animate a camera what is the relation with wires or loop?
if you want animate anything you can do it with timer and counter which are available,
or you mean anything else with animation?

GH already handle those stuff nicely.

A definition can use two iterative part or plugins with different speed, in an asynchronous way.
A global timer or “play button” will probably be ignored by many of those plugins that use iteration.

I can start and then stop kangaroo and then use the result to loop in anemone… with a global on/off it would be impossible.

Maybe i did not understand what you meant, but it seems eveything you described is already possible in current GH, and in a nice way.

Have you used the “Animate…” option in sliders?
Or the global “Lock solver”.

Animation-specific plugins have their own tools to animate their stuff.

What if i want to “start” my animated rendering but not all the others iterative part of my solution?

If you are trying to script a time-based simulation, GH will not be your tool of choice. You will use Processing or Houdini or Maya or so. Of course it would be possible in GH, but other platforms are significantly more convenient. If all you want to do is to use plugins that other people have written, then sure, GH as it is is good enough for you.

I believe there are deeper reasons why grasshopper shouldn’t be compared or related with houdini or other softwares.
Like, deep hardcoded parallelism (even on gpu) vs flexibility…

Time-based simulation? Using a timer or applying a play button hasn’t anything to do with simulation. Doing simple Euler integration, which is what you do if you move something in a anemone loop, is not even accurate. Grasshopper is a visual scripting platform to automate CAD processes. This is a pretty straight-forward concept, you build a shape by algorithms and get data out. Appling a physical model, like Kangaroo allows, is not necessarly an accurate physics simulation, its rather applying forces to a model, adding some constraints and modify a shape by this. If you looking for a node editor for this you rather choose Matlab Simulink. Houdini is not even a true CAD nor a Simulation System, so again its comparing apples with oranges.

Your post is confusing. The plugins you mention are iterative. They don’t really depend on time, but on iterations. Even if they use something called time or delta time, it’s just a parameter to scale how fast things change (within each step, not between steps), but they are not subject to a time dimension like a clock, when a step ends it can start the next one, regardless of how long it takes. Are not processes that jump every some milliseconds as happens with the draw() method in processing, when one ends, the next begins. So in GH you have to recompute the definition or part of it in every “time jump” or iteration, which is what Anemona does or you can do with the [Timer]. I think for GH2 there is an intention to include a native loop, if that is what you mean. Everything else you suggest seems to me to be a misunderstanding of how things work or can already be done with GH. Even the play button, you can set it in the Remote Control Panel. If you are referring to a frame system, as in video editors, then that is a good suggestion.