Transcripts
1. INTRO: Hi and welcome to DCO. My name is David confetti. These videos I'll
be sharing with you how to use Grasshopper. Right now. In this video, we'll
be showing you how to create this
roof truss system. I'll be going over how
to create the base form, then subdivided and create the
details that you see here. So I'll be going over
all of those steps. I'll be sharing how the
program works by walking through all of the
steps in detail. This way you can understand
how it all functions. The program is a little
bit intimidating at first if you've
never used it. But once you get used to it, you'll see how important
it is to understand it and how you can use
it to your advantage. I'll also be sharing the
script so you have it by your side as we move
through the exercise. This way you can always reference
back to what I'm doing. Hopefully you're excited about getting started
with Grasshopper. And let's jump right in.
2. BASE FORM: To start, we'll go here
instead of right now. Let's go ahead and
check the units. So type in units. I'll have it in feet. Then I'll hit okay.
Here in grasshopper, I'll go to File New
Document and I'll open a brand new document
file instead of grasshopper. What I'll be doing today is
creating a parametric point. And to do that, we'll bring in a component called
Construct point. And to do that, all you
do is double-click in the Canvas and type
in the command. And you should see it pop up. If you don't see the icons
and the way I see them, go to display and
have all of these on, that way, you see the
icon and the input names. Now that we have the point here, we'll go ahead and plug-in a
bringing a point component. That way if I want to bring in a different points or
move it inside of rhino, we can go ahead and set up
point and move it that way. But for now, we'll be using a parametric point that we
constructed using this. Next we're going to
move to this point. Along this way. Won't be moving in
the y-direction. And the way that a guide
myself is by going, looking here in the widget here. We have the x, y, and z, and we'll be
moving it into y. So I'll take this point, go to Move Component. I'll plug in this point into the geometry that I want
to move. The motion. Well, we know we want to
go in the y direction. So double-click
here and go to unit y. I'll plug in the unit
vector y into the motion. The factor, I'll
say let's say 12. This will become the
slider that moves, want the point over. Now what I want to do is create another point that is
twice as far as this one. So if this one I moved
in the y direction, 25, I would want this
point to move again. But move 25 times two. So there's two ways
that we could do this. We can take, let me show you. There's two ways we can
go to a move component. We can plug in our geometry into the MOOC component again, and plug-in the unit
vector into the motion. This way we create two points, one in the center
and one at the end. The other way to do
that is to plug in the original point into the geometry and multiply
the output vector by two. Ok, OK here, double-click and go to star or
multiplication by two. This gives you a component
that has an empty a input, B input of two. So it'll multiply
whatever you plug in. If we plug in this into the a, b, it's going to
multiply it by two. And this will give
us another point. Both of these achieve
the same thing. The reason why I want separate points is because I will actually take
this center point. I'm going to move
this up to create an arc as our base geometry
for the center one. Let's go ahead and do that. I'll actually just leave
it using this one. Both of them work the same way. But it doesn't really matter
in this sense at the moment. So next thing we're
going to do is take this point and
let's move it up. When we move this up, we're going to look
here and we're going to move it in the z up. We'll bring in another
MOOC component. We'll plug in the center
point into the geometry. The motion. I'll
double-click here. I know I want to move
it up in the z vector. But for the factor, I need to plug in a number. So double-click here and to
bring in a custom slider, I can go from one or from
0 and do less than 25. This gives you a
component from 0 to 25, starting with the slider at 0. Let's plug this one in here. Let's take this one and
let's disable the preview. So we're not seeing both
of these at the same time. I'll take this one.
Right-click disabled preview, or you can middle-class and disabled disable
preview on this one. So big that for by accident. Now a second, we can
move this point up. It will stay center. Relative to both
of those points. We have the ability to
move this arc up and down. Let's go ahead and relabel
some of these sliders. I'll take this one, I'll
right-click, call this size. For this one, I'll
call this arc. The change in the name. Select it, right-click. And you can change
the name right away. But there is something
that I want to show you before we move
forward in that is that if we have this point here, this number is actually half
of that entire distance. To make sure that we're actually doing the overall distance, we have to take that number 44. And let's go ahead
and divide it by two. Because technically
this distance is half up the entire thing. So let's plug in
44 divided by two. Then we'll plug that
into factor here. As you can see now this y size is actually the overall size. With these three points, we can create that arc. So let's double-click here
and go to an arc component. This component, it'll be
actually it's not this one. Let's double-click
here and go to art. It'll be arc three points. Since we already have
this initial start point, we have the middle
point and the endpoint. We can plug in the first into a, the second one, which is the
one that we moved up into B. And this last one, geometry into C. Let's go
ahead and move these around and see what kind of
variety we have here. This is going to be the
center arc that will give us that kind of change
in elevation for the, for the truss system.
3. LOFT FORM: For this next part, we basically have most
of the work done. And that is to take
these points and to move them to the right
here and to the left. But just create a straight line. We'll take this point, will also take this endpoint. Let's also move that
in the x-direction. Quick here and go to move. I'll go to this point
or start point. Then this one, I'll plug it in, holding down shift
into the geometry. In this you can see
they go up and that's because the Move
Component automatically moves everything up by
ten in the motion here. And so we don't want that. We actually want to move
it in the x-direction. The little widget
here in right now, so let's double-click
here and go to unit x. Let's go ahead and
plug the unit back to the vector factor
into the motion. Now let's give it a number. So let's pick this one. Let's copy it down here. So I like to slide
it down here and hold Alt to make a quick copy. Or you can do control C, control V, or copy and paste. For this one, it's
going to be the x size. So I'll change the name of
this one. As you can see. Now we moved these two all
the way to the end here. As you can see, it's only
two points in there, both inside of this
MOOC component. For this one, we'll bring in a polyline component and plug in the geometry
into the vertices. Now that we have one side, all we need is to
take this geometry, mirror it over this way. To do that, we'll go to our
initial starting point. Actually to show you what we
need to mirror something, Let's double-click here and
go to a mirror component. All it means is a plane which is where it's going to mirror
and then your geometry. So our geometry is going
to be our polyline. And our plane will, it gets us our world YZ, which is what we need. But instead of just not
having something plugged in, we should double-click here
and bringing y, z plane. And I'd like to
plug in the point, original point into the
origin for the YZ plane. And let's go ahead and plug
this into the plane here. That gives us basically a plane in which this will
mirror over the world moves. That initial line is
going to be this one. But as you can see, since
we're also moving in two ways, the overall width or
length of this is going to be 30 plus 30 equals 16. So we actually have to take
this exercise once again, do forward slash two
to divide by 230, divided by two, and
plug that into the x. Now this is actually
giving us 15 on each side, which is 30 overall. Now we can go ahead and take the points that's
disabled the preview. So middle click Disable preview. I'll do the same thing with
these other two points. Now let's plug those
into a loft component. So I'll double-click
here and go to loft. With this component. We're going to plug in all
of our curves in order. But first, before we do that, let's take the curves and
let's right-click and go to flatten that. So the information comes in and organized in just one list. So let's go ahead and
plug in the first one. So the polyline, then the arc holding down shift
to add an input. Now let's go ahead and
plug in the last one. I'm holding down Shift. As you can see, we've
created a kind of rounded off shape
with the center arc. And we have the ability to
change all of these with these sliders will
increase the length here. Now that we have this, the next step is going to be
to give this some thickness. That way we can develop
it into the trust system.
4. OFFSET FORM: Next, let's go ahead and
take this and move it up. So let's double-click here
and go to a mood component. Will be moving this
slotted surface. Will plug that
lofted surface into the geometry for the motion. Let's move that up. So I'll double-click here
and go to Units Z. Let's go ahead and
plug the units z into motion and bring in a slider. For this one, I'll
do a slider of is 0, then less than 1.50. That way we can have a movement up and down with
two decimal points over. And we can always
change the max, let's say to five, and just have the
ability to change the thickness of that
trust system this way. Let's change the name
here to surface offset. Let me share to decrease some of the sizes
here a little bit. So we don't have such
a large structure. We can always come back and
change the size of this. Let's take our original surface, lofted surface right-click
to save all preview. Now let's take this and create are the thickness for this. What I'll do is I'll
take this geometry and go to project. Our project to which plane? Well, we'll do the same thing
that we did to this one. So instead of for y-z
plane, we'll do an X, Y plane located exactly
at the origin point. As you can see, everything
stems from this point, which we can always change
for changing the location. Now let's do this plane
is where it's going to be projected onto this surface, into the plane here. I'll take a loft component. Let's plug in our top surface
and holding down Shift. I'll plug in the bottom surface. Make sure I flatten it. Now I have some thickness to it. But as you can see, these three are in complete
separate components, which means that they're
not as solid yet. That's what we'll do now
is we'll go to Europe. Join will join the top. Holding down shift will add the bottom and the
center portion. And if you right-click
and go to flatten, it should put it all
into one, into check, we can go hover over
the blue wrap output. And as you can
see, it says close to Europe for the output, which means that we have
like a watertight solid. I'll take these and
disabled preview. I'll take most of
this stuff back here. It can basically hide it
so you can select it in the middle click and
disabled preview it. Now the next portion is
going to be to create the actual subdivisions
using contour.
5. CONTOUR: For this next portion will bring in the component called contour. So when you type in contour, you're going to have a
few different ones here. The one you want
is create a set of beret or mesh contours. It will bring this one in. We have a few different inputs, shape, point, direction,
and distance. We're actually going
to use all of them. Shape is going to be what
we're going to contour. So as long as we plug in
the burette into the shape, notice that nothing
happens and that's because we don't
have a distance. So let's go ahead and
plug in a distance. We'll say three. I'll plug that into
the distance here. As you can see, we
already have something, but it's not the
result that we want. This component
automatically gives us two different components. One is the point of origin where the contours are going to be starting and the direction
is in which direction. So as you can see, it
already has a one in the z, which means that it's
going to do it vertical. These two, we have to change. The first, the point, it's actually going to be located exactly in
the center here. To do that, we'll bring
in an area component. So double-click, go to area. This gives you a centroid, which is the
mathematical center, center location of your object. As you can see, that
puts it in the middle, which is the perfect location
for starting our contours. I'll go to centroid, plug that into the point. And as you can see,
it actually moved. So that is where it starts. And we can see that by the contour being aligned exactly where the point
is here inside elevation. So let's go back to this one. And the last thing
that we need to put is the direction it wants to go. So there's two different ways. One is if we double-click
hearing go-to y, z plane. And this gives us a
plane in which it aligns the direction
of your contours. So it's plugging
the centroid into the origin and plug in the
plane into the direction. You can see. The contours are now aligned perpendicular or parallel
to the YZ plane. We can at the same time
double-click hearing go-to x z plane and also change the direction using
the x z plane components. So these are interchangeable. It depends on which
way you want to develop your, your trusses. Also, the distance,
not how many times, how many copies you want is actually the
distance in-between, In-between each one of these, we have a distance of three. If we increase it, it increases the spacing and it decreases the
number of copies. The less, the
smaller the number, the more copies of
transness you'll have. As you can see, they start
at the center point. If I were to unplug the
point from the centroid, you'll see that it's still
starts from the center, but from this point, and we can find different
places to locate that. But it's best to place that exactly in the
center of your object. Just in case if
you move it over, It's not starting from one side. Now let's take our solid,
which is our buret. Let's middle-class
disabled preview. For these trusses. Let's take these
contours and let's go to a component called
boundary surfaces. Let's plug in our contours
into the edges there. And as you can see, we have planes that are
now located exactly at the location of those contours and where they
intersect exactly on that. Let's take a look at our
initial sliders here. I'm kind of increasing
some of these, changing it around
a little bit to see what if the components
solo works. The next step is to
take the stresses or the base surface of those
trusses and sub-divide them. We can create that basically
the webbing on the inside. And also at the end we can create that
into wire-frame that can hold the top of some glass
or some type of covering. So that's what we'll do next.
6. TRUSS DETAILS: The next part, let's take
this view rep or solid. Let's disable the
preview on that. Now with these contours, we can double-click here and
go to boundary surfaces. This way we can create a plane in between all
of those contours. But before this, let's take that surface right-click
disabled preview. Let's take these
curves and let's offset them to give
it some thickness. Double-click here and
go to offset curve. I'll take these contours, plug them into curve. For plane. I'll actually plug those
contours into the plane also. As you can see, it's
offsetting out. I want to offset in. So I'll double-click
here and go to a, a negative component. I'll plug in the negative
into the distance. I'll bring in a slider of 1.50. Let's decrease
that a little bit. Now what I'd like to do
is do a boundary surface. Delete this one that
I had done before. Now let's do a boundary
surface between those two, will take these contours into the edges and these
offsets into this one. And I'll go here to flatten. This way. It actually creates that
surface in between those two. You can see now that
we have the surfaces, all we have to do is extrude them to give it that thickness. The thing is that
when we extrude it, we would be extruding
it either in the x or in the x-direction. But we're going to be doing it both to one side
and the other. For me, there is a trick that I like to use that you can move this half a step this
way and extrude it twice as much to
give it a thickness. What we'll do is we'll
bring in a mood component. We'll plug in the surfaces into the geometry, into the motion. I like to use an
amplitude component. I'll plug in the surface
into the vector. The vector into the motion. This way, it actually moves perpendicular to the surfaces. Now for Amplitude, I'll use
a value, I'll say point. I'll say 0.5 for this one. We'll actually, since
we moved in 25 here, we're actually extruding
it out and buy one. For this, I'll bring in
the extrude component. I'll plug in the surface, this geometry into the
base. The direction. It's going to be
perpendicular to this vector. But I'll say times two. And actually turn
that into a negative. They'll do this
vector times two, turned it into a negative. So if it was 0.5, now it's gonna be negative one. In this way we move it halfway and extrude
it twice as much. So technically this 0.3, it's 0.3 from here to here. So overall it's 0.6. For this, we can do something similar to what we did
before and we'll do divide by two and do 0.3
divided by two and use that as our amplitude thickness. Now let's take this middle
click disabled preview. Let's disable the preview
on most of this stuff. Let's take a look at
what we have here. We have these contours
created using this component. So I'll go here to three. We have the ability to take. Those contours and create some trusses by offsetting and giving that a
thickness of a surface, then extruding it out. Now notice that this, for us, this insight curve, we can actually round off the
edges by using a fill it. Let's do that. Let's
double-click here. And let's go to a fillet. Let's plug in our offset
curve into our curve input. For the radius,
let's just do 0.1.2. So as you can see, it actually
round soft the top part. But if I do a little bit less, it'll do both of those. As long as psi. Instead of using this curve input for
our boundary surface, I'll use this curb. So I unplugged it and
holding down control, as you can see, you
get the minus sign. And I'll add this input
holding down Shift. I can disable the
preview. Now on this, this slider with 0.5 is
a little bit too small. We can always change the
range to, let's say, three, the three decimal points. And we can have a
little bit more of a subtle rounding off of
this interior trusses. Let's go ahead and also actually increase the
distance in-between. So I'll just say about
six feet in-between. Let's bring back
our original V rep to see how it looks
like compared to that. Now let's actually disable
the preview on this new app. And let's bring back
the sloped back here, which is actually the
one that we moved up. And let's take this and just
give it some thickness so we know what it's actually like, what the trusses are
actually holding down. So this will be the plane
that will become your roof. There's different
materials we could use, but for this one we're just
going to sub-divide it and keep it as glass. I'll take this I'll go
to Extrude component. It'll take this surface, plug it into the base, and for the direction, I'll plug in a z unit Z and we'll extrude this
would just say 0. Now we can disable
the preview on this. Let's change the name
to roof thickness. This is going to be distance between this is going
to be on-center. This is going to
be trust offset. And you can also select it
and do Control G to group it. Then right-click on top
of it. Go to color. You can change the color
to whatever color. You can also choose color
and make it your default. This way when you zoom out, you know what slider you
would want to change. I'd like to do this
to all of my sliders. And it's just a style thing. It's not something that's really required or that really
matters for the design. Just go around, select
it and Control G. This is going to be radius. Now let's move forward
and let's create the subdivisions in
here, the truss. That way we have the
final trust result. This wouldn't really work
functionally, structurally. That's because we don't
have anything here that would distribute the
load from up here. So this would just
buckle in here. I'll show you how to do
that on the next step.
7. TRUSS SUBDIVISIONS: Now that we have our trusses, Let's go back here
and let's disable the preview on the top portion. But let's actually bring
back the preview on the top and the
bottom projection. What I want to do now is take this and I want to sub-divide it to create the
trusses on the inside. To do that, we'll actually
bring back, we have these, let's bring back also
our boundary surfaces. Let's bring another component called boundary
surfaces into here. This plug those into
the contour here. Now that we have this, let's
actually take it back. Let's disable the preview
on all of these except for these new boundary surfaces that we created
from the contours. Let's disable the preview
on the rest of the staff. To sub-divide the surfaces. Where I like to
use is isotropic. Double-click here
and go to isotropic. For this, we'll actually have two separate components
that we'll use. Isotropic and divide
domain squared. Would that we'll do is
we'll allow us to take these and sub-divide them in the U and the V.
As you'll see here, when we plug-in that
surface both into the domain surface and we
plugged this in like this. We have instances both
vertical and horizontal, going 1234, so ten,
vertical and horizontal. So u and the v at ten. And that's for both of these inputs in the divide
domains squared for isotropic. So let's change that to, let's plug in ten for the EU. These control the horizontal. I'll make a quick
copy down here. I'll change this to a one. What happens here
is, as you can see, is that we have only these
vertical subdivisions. What I would like to do is take the subdivisions and
extract only the lines. But what happens
with isotropy is that we actually have
these as separate planes. So there would be
too redundant minds here. To get rid of that. We have to join the buret. I'll do bureau up, join. Then the input. And I'll disable the preview on the buret or on the isotope. Now with the joint B rep, we can extract the
vertical lines. To do that, let's go
to the rough edges. What we're going to use this, we'll plug in all
of those into the, into the viewer badges. And the only ones we're going to extract or at the
interior lines. I'll double-click
here and goto curve. Plug in the interior
curves into this. Unless you can see only the verticals that are inside are the ones
that we chose. And that's because with
the closed the rep, the outside edges, you're naked edges which are in this
portion of this component. And if you want these inside
once you get the anterior. To explain this to you real
quick is if we take this ISO trimmed surfaces and I'd
go middle click and bake. I'll take all of these
surfaces, move them over here. Here I'll go to shaded view. I see, you can see these
are independent surfaces, therefore, having two
lines on the same one. But as soon as psi
join the buret. So I'll go here, middle click, and notice that there's only one line here in-between
each one of these two, but you still have
the separate panels with one crease in-between. That's what we extracted
the interior curves. That's also the reason why
we had to join the buret. So hopefully that makes sense. Let's move forward and intersect these vertical
lines with this brush. Let's go here at the top. In Grasshopper,
let's go to our tab that says intersect, physical. We'll go be rep and curve. Let's plug in the curb
into the curve input. Let's go to, let's go back to our truss. The curve that we
actually want is, it's actually this one. We want. This, this curve is what we want it to intersect with
that bureau up. So we have this curve. Let's go to a new rep component, boundary surface component. Sorry about that. What
we want is to plug in this one into, into this one. Let's disable the
preview on these. Let's also disabled the
preview on all of this. We want to intersect is this
inside portion of the truss. Now whatever was
intersected between this one and those lines, we can disable the preview. Notice that now you
have the ability to change the number of
subdivisions on the inside here. Vertical. It won't make much of a
difference if I say two, because it actually won't
divide it that way correctly. So I would just keep this one at one this one as
our subdivisions. The other way to make sure
that you don't change this and you want to
maintain it at one. I'll delete that.
Right-click on top of it. Set integer. It'll say here one, and then commit to changes. So it always keeps that as one. And we can say, call this
number trust subdivisions, ungroup this one together. With that being said, let's
take this inside portion, middle click, disabled preview. Let's disable the preview
on. Everything else. Bring back our trusses, which would be over here. Here's the thing. There are two different
ways in which we can create the verticals. But I think what would look
cool is if we have the squared off in these
inside one, it says pipes. Let's take these curves. Let's go ahead and bring
in a pipe component. Plug-in those curves into
the curve component. For the radius, we will actually do trust thickness
divided by two, which would be the
result of this one. Since it's the halfway, it'll always meet that. We can always have
a separate one, but this keeps it
nice and clean. And let's make sure
to take our caps right-click and go
to round. That way. We know that it intersects here when it comes up
to the vertical points, we know that it intersects
that inner part here. And then we have some have
it all working out here. This one. Let's come back here and let's also bring
back our last roof. The last thing is also
to make sure that this sits flush with the top
part, which would be this. We have to make
sure that we take our final truss and
we do a difference. Soap, double-click here,
and go to solid difference, and plug in the
trusses into Europe. A, forbear of B, plug-in, the top glass surface. That's so the topology, the topology of it
all works together. So let's disable the
preview on this. Disabled it, disabled
premium. With this. And the pipes. I'll go to solid union. And I will join together. The trusses with the
pipes, flatten the input. Now I can disable the
preview on all of this. And as you can see,
our trust system is complete and we still have all of these sliders that
we can play around with. So let's go back
here. Let's change. Let's go from the beginning. Let's move around some
of these sliders here.
8. CONCLUSION: Let's go ahead and move
the size of the y. And every time it
creates an extra truss, it actually will take a little
bit longer to process two. So that's another
thing to keep in mind is to keep it a little bit
simple towards the beginning. And then at the end
you can always move the sliders around the height. We'll just go to 0. You can see it and
let's see five here. Moves up in the middle. It's actually do a
little bit more. Depending on how fast
your computer is. This will work faster or slower, but it shouldn't get
stuck. Let's go here. Surface offset that this
is this portion here. Roof thickness. That's fine. Let's move forward and
say distance in between. Let's actually, the bigger the number less
subdivisions will have. So this will be easier this way. Let's increase our x size to 50. The offset. This is one of the things
that will actually make it look really interesting is the offset amount on the
inside of these trusses. And how much we round, our thickness is going to be this one. With this, let's
go ahead and take this information
and let's bake it. We can apply some materials
and have a final result. Go here to a new layer. I'll go here, call this truss. I'll hit Tab and
call this glass. I'll make trust my
new current layer. I'll go to the trusses
here, middle click, Bake. For the glass. I'll make that my current layer. And go to this component, middle click and bake. At this point, I
would recommend to save both of your files, your grasshopper and
your Rhino file. And then we can apply
some quick materials to see what it would look like
at the end as a final result. Alright, so I just
saved the file. Now let's go here
inside of grasshopper, go to our, to this icon. So I don't draw anything
instead of rhino. And now let's go to our
Rhino file and change our materials to look something more like
a roof structure. So let's go here to
our perspective. Rendered. Right-click on your viewport. Go
to perspective. Now let's go to our layer. So our trust layer, I'll go to under material. Go to that little circle where
you can apply a material. And we'll change
this to metal here to steal the glass. I'll also click there. Go to the drop-down menu, use the little plus sign
here and then go to import material from Library
and use the glass. Then use light blue glass. So with this, we have
the final result here. So there's different ways in which you could capture this. One is just by right-clicking
on perspective. After you file. And this way, you can save in a specific location or
you can go to File, then go to ray traced
and do the same thing. But this way it'll
actually ray trace it, which means it'll calculate the sunlight reflections,
shadows and things. So it'll be way more accurate
than not using that. So that's one way you
can capture your work. If you have another render
like VRA and stuff like that. That's how I actually
like to render my work, is using V Ray,
applying materials, but it's it's something similar
to what we just did here. If you have any questions, make sure to let me know. I'll have the script
at the beginning and endnotes for you to
have side-by-side. I hope you enjoyed this content. I'll have more like
this one in the future. So if you enjoy your stay tuned. For now, I'll just save this and I'll hope
to see you next time.