THIS FORUM IS NO LONGER ACTIVE. PLEASE POST ANY NEW QUESTIONS OR DISCUSSION ON:
https://discourse.mcneel.com/c/grasshopper/kangaroo
The discussions here are preserved for reference, but new questions posted here are likely to go unanswered.
Kangaroo is a Live Physics engine for interactive simulation, optimization and form-finding directly within Grasshopper.
Hi Daniel,
I'm having my first go at transferring some old definitions to Kangaroo2 (trying to resist scripting as we will eventually be teaching Kangaroo2 I assume).
So far it's all going swimmingly. The only thing causing slight confusion is the "GoalFunction Outputs" of the "Solver" component and how this works with the "Show" component. I was assuming it worked similar to the old "Geometry" -> "GeometryOut" parameters.
However, as far as I can tell it outputs all geometries used for making goals in the order that the goal components are wired (vectors output as nulls). Is this correct?
Attached a basic example demonstrating the behaviour.
Best,
Anders
Daniel Piker
Hi Anders,
(Great work on the tower btw!)
The Output definitely needs a bit of work - the current way was only a temporary solution, and the plan has always been to give it a full make-over at some point.
I'd really value your input on what would be the most useful way to organize this.
As it is currently, the output from the solver is the the output of each of the Goals, in the order in which they were read in (though since the Goal input gets auto-flattened, I think this is not always exactly the same order in which the wires were connected if there are data trees involved. To have totally explicit control over the order it is still probably clearest to flatten and Merge the goals before input).
Some of the Goals (such as Length and RigidBody) that have an obvious geometric representation automatically produce an Output (lines and meshes respectively). The idea behind this was that people could start seeing geometry after connecting only 2 or 3 components.
Goals can also output other non-geometric information (for example, the mesh Planarize Goal outputs the current planarity measure of each face, and things like stress values could potentially be output in the same way).
Many Goals don't produce any output, and these are the cause of all the nulls in the Solver output parameter. I left them in, because culling them before output would mess up the ordering if people are expecting the indices to match those of the goal inputs.
The Show component produces a type of Goals which don't actually do anything, except maintain particle indices in order to reconstruct the geometry for output.
However, as I say this is all still open to change. Honestly a big reason for not tackling with this sooner is just that dealing with data trees is my absolute least favourite part of GH, especially converting them back and forth with arrays in code.
Perhaps a better way would be to bring back the Geometry input/output like in the old Kangaroo, so it preserves tree structure.
This could even be in addition to the current Output component, to allow for non geometric information to be passed as well.
Apr 29, 2015
Ángel Linares
Anchoring to this post. I had similar problems trying to understand the show component behaviour compared with the older Kangaroo versions :)
And what about replace the "Show" component by a per-component boolean input (or drop-down menu option) in the goals that produce clear geometry outputs?
Apr 30, 2015