You are on page 1of 31

Plugins for Grasshopper 3D

ADD - An introduction to parametric modelling


using Grasshopper plug-ins for Rhino3D
04/12/2019

By Mahmud Tantoush
PhD candidate and researcher
at CPU-Lab
Lesson breakdown
• Introduction
- Recap on Grasshopper 3D?
• Grasshopper plugin
- Introduction to Ladybug
- Introduction to environmental analysis
- Introduction to Galapagos
- Introduction to Genetic algorithms
• Expanding Grasshopper tools?
- Combining the functions of different plugins
- Installing plugins
• Grasshopper 3D plugin tutorials
- Importing EPW files
- Radiation analysis
- parametric objects
- linking Ladybug to Galapagos
- Running Galapagos
• Questions and answers

2 GRASSHOPPER 3D PLUGINS
04/12/2019
Grasshopper plugins
Recap on Grasshopper 3D
Introduction I Grasshopper 3D plugins I tutorial I Q&A
What is Grasshopper 3D ?

4 GRASSHOPPER 3D PLUGINS
04/12/2019
Introduction I Grasshopper 3D plugins I tutorial I Q&A
What we did in
the last session

Two weeks ago you learnt


how to use grasshopper.
We designed and coded
the parameters of a
parametric tower.

Today we will learn how


to install plug-ins for
grasshopper to expand
grasshoppers capabilities.

5 GRASSHOPPER 3D PLUGINS
04/12/2019
Ladybug plugin
We will be using these two plugins today to understand how we
can use plugins for grasshopper. Ladybug is used for environmental
analysis
Introduction I Grasshopper 3D plugins I tutorial I Q&A
Ladybug for
environmental
analysis
Ladybug tools are one of the
most popular grasshopper
plugins. It enables you to
conduct environmental analysis
of your building geometry.

Ladybug, unlike butterfly


and honeybee, is a stand
alone plug-in. This means
that we do not need to install
additional software on your
computer. In this session, we Ladybug
will be exploring Ladybug for
radiation analysis. In you free
time, please explore the other
functions of Ladybug and the
other associated plugins
https://www.pinterest.co.uk/pin/568368415444511616/?lp=true

7 GRASSHOPPER 3D PLUGINS
04/12/2019
Introduction I Grasshopper 3D plugins I tutorial I Q&A
Ladybug for
environmental
analysis
“Ladybug allows you
to import and analyze
standard weather
data in Grasshopper;
draw diagrams like
Sun-path, wind-
rose, radiation-rose,
etc; customize the
diagrams in several
ways; run radiation
analysis, shadow
studies, and view
analysis.”
https://www.food4rhino.com/
app/ladybug-tools

https://www.food4rhino.com/app/ladybug-tools

8 GRASSHOPPER 3D PLUGINS
04/12/2019
Introduction I Grasshopper 3D plugins I tutorial I Q&A
Ladybug
workflow

To analyse and
visualise geometry
and data in ladybug
you will need a .epw
file. This file contains
the local weather and
location data needed
for analysis. All scripts
that include ladybug
require this file to be
downloaded.

EPW stands for


EasyPlot Weather file.

https://www.food4rhino.com/app/ladybug-tools

9 GRASSHOPPER 3D PLUGINS
04/12/2019
Galapagos plugin
The second plugin we will be using today is Galapagos. Galapagos is
used for genetic algorithms.
Introduction I Grasshopper 3D plugins I tutorial I Q&A
Iterative
optimization
using GA
Genetic algorithms
allow you to explore
different combination
of selected parameters
towards an optimal
state or score.

Galapagos, one of
grasshoppers genetic
algorithms plugins,
allows you to explore
hundreds of iterations
and associate scores
to each iteration.

Image from: https://www.pinterest.co.uk/pin/366902700864161104/?lp=true

11 GRASSHOPPER 3D PLUGINS
04/12/2019
Introduction I Grasshopper 3D plugins I tutorial I Q&A
Galapagos
for genetic
algorithms
Genetic algorithms
apply the principle
of natural section
through random
mutation.

Random mutations
produce groups,
which then produce
other groups and so
on. The best groups
are valued based on
their survival abilities
(or the GA fitness
score) that are carried
on.

Image from: https://blogs.scientificamerican.com/tetrapod-zoology/refined-fine-tuned-pla-


cental-mammal-family-tree/

12 GRASSHOPPER 3D PLUGINS
04/12/2019
Introduction I Grasshopper 3D plugins I tutorial I Q&A
A quick
demonstration
of Galapagos
The Galapagos node
seeks to reach an
optimal solution
(fitness score) through
the modification of
parameters (genome).
1 4
1 - Params to explore 3

2- fitness score, here


it is the mass addition
node.
2

3- Galapagos node

4- Galapagos user
interface

13 GRASSHOPPER 3D PLUGINS
04/12/2019
Combining plugins
In this tutorial, I will show you how to in-
stall and combine different grasshopper
plugins to solve architectural problems
Introduction I Grasshopper 3D plugins I tutorial I Q&A
Combining
Ladybug and
Galapagos

You may wish to


optimise your
design for the
environmental. To
achieve this you will
need to combine the
ladybug plugin with
a GA plug in. For
example, if you have
a parametric tower
and wish to optimise
it for maximum
radiation, the fitness
score from ladybug
radiation analysis will
be used in the GA.
Image from: https://www.unstudio.com/en/page/8629/optimisation-vs-adaptation-multi-parameter-optimisation

15 GRASSHOPPER 3D PLUGINS
04/12/2019
Installing Grasshopper plugins
Installing plugins is easy. Find the plugin
you need, then follow the installation
instructions!
Introduction I Grasshopper 3D plugins I tutorial I Q&A
Where to find plug-ins
for Grasshopper
Food4Rhino is
a centralised
depository where
you can find many
plgins for Rhino
and Grasshopper.
You will need to
create an account to
download plug-ins
from the Website.
Most of GH’s pulg-
ins are hosted
here, but other
online resources
are also available to
download plug-ins.

17 GRASSHOPPER 3D PLUGINS
04/12/2019
Introduction I Grasshopper 3D plugins I tutorial I Q&A
Downloading
Ladybug Tools
To install pulgins, simply
find it, and follow the
instructions. Most plugins
can be downloaded and
installed directly through
.exe files, other require
supporting software, and
others you can just drag
and drop.

Instructions will be
provided by the plugin
page. You usually want
to download the latest
stable versions.

1 - now download the


ladybug tools 1

18 GRASSHOPPER 3D PLUGINS
04/12/2019
Introduction I Grasshopper 3D plugins I tutorial I Q&A
Installing
Ladybug
We only need the 3
Ladybug plugin.
We do not require
Butterfly or
Honeybee.

1- to install ladybug, 1
simply drag the user
objects files onto the
grasshopper canvas.

2 - restart rhino and


grasshopper

3 - you should find


a new Ladybug tab
appear on the top
ribbon

19 GRASSHOPPER 3D PLUGINS
04/12/2019
Ladybug tutorial
How to undertake radiation analysis of
your building
Introduction I Grasshopper 3D plugins I tutorial I Q&A
Starting with
Ladybug
As mentioned earlier,
Ladybug requires .epw
files, which contains
local weather data
necessary for analysis. 2

1- load the Ladybug_ 1


Ladybug component.

2- attach a boolean
toggle to the Ladybug
download EPW
component. This will
load the browser. 3

3- find the local epw


file and copy the URL,
alternately you can
download.

21 GRASSHOPPER 3D PLUGINS
04/12/2019
Introduction I Grasshopper 3D plugins I tutorial I Q&A
Loading epw
files
Now that we have the
url for the .epw file, we
can access the data
and break down the
information.
3
1- paste the epw url
into a panel node

2- connect to the 2 4
1
Ladybug open epw
node.

3 - connect to import
epw node.

4- connect outputs
to panels to see what
information you have.

22 GRASSHOPPER 3D PLUGINS
04/12/2019
Introduction I Grasshopper 3D plugins I tutorial I Q&A
Setting up
for radiation
analysis
Ladybug is designed
in an intuitive way.
Just select the type of
analysis you want, and
work back. Underscores
at the beginning of the
input name mean it is
necessary 4

1- load the radiation 1


analysis node
2

2- connect the sliders


5

3- add a button 3

4- add a centre box

5- connect the required


node
23 GRASSHOPPER 3D PLUGINS
04/12/2019
Introduction I Grasshopper 3D plugins I tutorial I Q&A
Running the
radiation analysis
Now we connect the
missing links between the
.epw file and the radiation
analysis component.

1 - connect the cumulative


sky matrix

2- connect the analysis 3


period component
1
3- connect to .epw file 4

4 - run the cumulative sky


matrix component 6
2 5
5- run the radiation
analysis component

6- output

24 GRASSHOPPER 3D PLUGINS
04/12/2019
Galapagos tutorial
How to undertake radiation analysis of
your building
Introduction I Grasshopper 3D plugins I tutorial I Q&A
Galapagos
setup
Galapagos is only
one component, but
we need to set up a
pragmatic object to
use it. Make your own
using the following
steps:
4
1- set initial points
2
and NURBS curve
3
2- set up move series
1
3- apply
transformation

4- output

26 GRASSHOPPER 3D PLUGINS
04/12/2019
Introduction I Grasshopper 3D plugins I tutorial I Q&A
Linking
Galapagos and 3
ladybug
Now we have a
parametric object, and
the radiation analysis 1
script set up. Now, we
connect them together
and introduce the
Galapagos node.
4

1- connect the
parametric tower
output to the
geometry input of
ladybug 1

2- connect the fitness


score to ladybug 2

3- connect the params


to the genome input
27 GRASSHOPPER 3D PLUGINS
04/12/2019
Introduction I Grasshopper 3D plugins I tutorial I Q&A
Running
Galapagos

By double clicking on
the Galapagos node,
this user interface
comes up. 3

1- Geomes (outputs) 2
with scores
1
2- Reinstate the
5 4
different options

3- solver average score

4- parameters used

5- solving space

28 GRASSHOPPER 3D PLUGINS
04/12/2019
Introduction I Grasshopper 3D plugins I tutorial I Q&A
Results!

Now, we can
reinstate the
different outputs
and see which
are the best and
worst performing
geometries based
on the parameters
we have chosen.

You can then bake


or present all your
options in a matrix
like format.

Worst performing Best performing

29 GRASSHOPPER 3D PLUGINS
04/12/2019
Remember
to always
organise
your code!

IT CAN GET MESSY!


Source image: https://discourse.mcneel.com/t/whats-your-largest-grasshopper-script-the-hall-of-shame/60594/5
Thank you for following
If you have any more questions, you can send me an email on:
mahmud.tantoush@mmu.ac.uk
or message me on twitter @mahmud_tantoush

You might also like