Grasshopper 2

metadata · globals · loops · math · documentation

GH2 Main

Two different beasts

Grasshoppers 1 and 2 ship side by side in Rhino 9. GH1 is mature, with a large plug-in ecosystem and years’ worth of accumulated files and workflows, and still receives new features and fixes. GH2 is newer and has fewer plug-ins, but includes metadata, looping, globals and mathematical improvements as native features. GH2 can open GH1 files, and generally either host or upgrade the components in those files.

Following are some of the key new features of GH2.

GH2 GH1 Two Beasts

Metadata

Metadata lets any value carry its own information, such as a zone, a material, or a layer name, without the need for separate wires or parallel bookkeeping. Metadata can be visualized in the Rhino viewports using custom display rules, which can assign properties like colors or dash patterns to shapes with metadata. Baking is now metadata-aware; the relevant object attributes, such as layer or name, will be assigned to the shapes sent to the Rhino document.

GH2 Meta Data

Performance

Component iterations run in parallel across all available cores, resulting in faster solutions. GH2 has much better cancellation support and keeps the interface live while computations are happening in the background.

GH2 Performance

Documentation

Help images show actual example files, which can be opened by dragging the image onto the GH canvas. We aim to provide example files for every component which ships with GH2, as well as a glossary entry for every technical term used. GH2 provides documentation tools, allowing plug-in developers to seamlessly fold their own content into the help system.

GH2 Help

Mathematics

GH2 provides a broader mathematical foundation, including mature statistical and trigonometric tools, and rich support for scalar and vector fields. For example, angles, statistical distributions, and univariate functions are now native data types.

GH2 Math

Globals

The Shout-Listen pattern in GH2 allows for the wireless sharing of values within and between files, making it easier to split big files into smaller, more manageable ones, or to clean up wire spaghetti within one file. Listen objects can also be used to read data directly from 3dm or text files.

GH2 Globals

Looping

Looping is built into GH2; clusters can feed their results back into themselves, for a set number of iterations or until a given condition is met. This opens up a new class of iterative algorithms, such as growth patterns, relaxation and stepwise simulations, with no need for plugins.

GH2 Looping

Scripting

The script editor now supports the uncluttered Script mode consisting of pure statements, as well as the flexible SDK mode which allows the script to draw preview geometry, add options to the component panel, and run code at different stages in the process.

Like all standard components in GH2, scripts iterations run asynchronously and have full access to the metadata attached to every value.

GH2 Scripting

Interoperability

GH2 provides a basic level of interoperability with GH1. Components can be dragged or copy-pasted from GH1 into GH2, where they can either be hosted or auto-upgraded to the nearest GH2 equivalent. GH1 and GH2 can send data back and forth via the use of shared ghdata files, which both versions can read and write.

GH2 GH1

Resources