BLOG > PLUGINS

ShapeDiver Now Supports Kangaroo 2 Plugin

June 17, 2019 by ShapeDiver

One of the most exciting additions to Grasshopper 1.0 is the inclusion of the Kangaroo plugin as a set of native Grasshopper components. By popular demand, we are happy to bring Kangaroo 2 to ShapeDiver today! Read more below about this powerful plugin, and importantly about the precautions to take when using Kangaroo with ShapeDiver.

What Is Kangaroo?

Kangaroo is a physics engine for interactive simulation, form-finding, optimization and constraint solving inside Grasshopper. With a background in architectural design and a laser focus on state-of-the-art research, Kangaroo's creator Daniel Piker has brought an immensely powerful set of tools to Grasshopper. Optimization routines that usually require strong development skills and mathematical training are now available to parametric designers.

One noticeable feature of the Kangaroo plugin is its ability to perform live optimization and display iteration results while the algorithm progresses. Indeed during the optimization, the standard Kangaroo solver continually recomputes successive solutions until it converges:

standard solver of the kangaroo plugin

This behaviour of Kangaroo is unfortunately not compatible with ShapeDiver. Due to its nature, the ShapeDiver viewer does not stream real-time information from Rhino. The viewer communicates with servers by sending a request and waiting for an answer from Grasshopper. In other words, a bijective relationship between a set of parameters and the resulting geometry is kept at all times.

For this reason, we have been cautious to start supporting the plugin. Fortunately, Kangaroo 2 provides several types of solvers with variable characteristics. Among them, one solver is the key to using Kangaroo with ShapeDiver...

The Zombie Solver

When using the Zombie Solver, optimization steps before the solver converges do not trigger and display new solutions in Grasshopper. This solver instead produces a single solution after the algorithm has stopped, while intermediate optimization steps perform inside the component. As a consequence, the Zombie solver behaves very much like a standard Grasshopper component, which is good news for ShapeDiver compatibility!

Instead of displaying intermediate results, the zombie solver has one more input parameter: a maximum number of steps to run during the optimization. The component stops then if it has not reached a goal within the defined tolerances. This additional parameter is useful in two cases:

  • By connecting a slider to it, one can witness the progression and get a glimpse at the behaviour of the optimization algorithm, somewhat like the standard solver does on its own.

  • More importantly, in the context of online configurators, it is possible to enforce a smaller number of iterations during the configuration process, before raising this limit when more precise data or geometry needs to be exported from the viewer.

zombie solver of the kangaroo plugin

An Example: Planar Quad Panels

This simple example addresses a common rationalization problem when designing free-form architecture with Rhino. Starting from a quad mesh that represents a facade, the goal is to ensure that as many panels in the facade as possible can be manufactured with planar elements (glass or metal panels, for example). Using Kangaroo, we enforce the planar constraint for all panels in the surface, while fixing the floor points to prevent them from drifting away. We also keep a constraint for the overall smoothness of the surface, in order to obtain a visually satisfying result.

In the model below, the color coding shows the level of planarity. Panels in green are considered planar according to the input tolerances. The initial surface clearly shows many non-planar panels. After enabling the Kangaroo solver, more panels become planar. With a few hundred iterations, the whole surface becomes planar and the goal is achieved.

Download the example model.

A Few Limitations

As explained in the previous section, all solvers except the Zombie Solver operate in a way that is not compatible with ShapeDiver's technology. On top of them, two other components do not make sense in the context of online applications, and therefore are not supported on ShapeDiver:

  • The 'Grab' component which lets you grab particles in the Rhino viewport.

  • The 'DotDisplay' component which displays points as round dots in the Rhino viewport.

These limitations are easily explained by the fact that the Rhino viewport is replaced on ShapeDiver with an online viewer.

It should also be noted that Kangaroo is often computationally intensive. Therefore many complex algorithms will face the computation time limit that comes with Free (up to 5 seconds) and PRO (up to 10 seconds) ShapeDiver accounts. You can read a few tips here about how to optimize your definitions before uploading them.

Finally, ShapeDiver supports Kangaroo 2 up to the current release 2.6.0. In particular, no version of Kangaroo 1 is supported for model upload.

Feel free to start uploading models using Kangaroo today and post any questions or issues on the forum!

More posts