Transcript for:
Introduction to Grasshopper with Rhino

what's up guys justin here with the rhino essentials so in today's video we're going to do an introduction on how to use grasshopper in order to start creating um algorithmic models inside of rhino let's go ahead and just jump into it alright so you can find out more information about grasshopper by visiting grasshopper3d.com grasshopper is actually included in rhino 7 for mac and windows so it should already be set up and ready to go when you download the program but if you're looking for some introduction videos or some photos of things different people have created this could be a great place to go to get some of those resources so there's also a great collection of intro to grasshopper videos that you can see on this page as well but so first off let's talk about how to access grasshopper inside of rhino so the way that you can do that is you can go into your tools option right here notice how there's an option in here for grasshopper so just go up to tools grasshopper i think you can actually just type in grasshopper as well and it'll open up grasshopper and so that's going to open up in a separate window that's going to kind of sit on top of your rhino window right here so um i have multiple monitors so usually what i would want is i would want this sitting on one monitor and then rhino sitting on the other for these tutorial videos or at least here in the start i'm going to try to split my screen so i'm going to split rhino to one side then i have grasshopper in the other right here and so using grasshopper to create models is a little bit different than actually creating the models inside of rhino itself because basically what you're doing is you're combining a whole bunch of different tools over here in grasshopper in order to generate an output that goes out to rhino so basically what you're doing is you're creating a set of commands over here that do things and then you're going to have an output that goes into rhino itself so you're going to set up those commands over here those are contained inside of things called components in order to create your output in rhino so basically the way this works is you bring your components in right here so let's say we were to jump into our curve and just add like a circle right here well what's going to happen is this is going to run and it's going to generate something inside of rhino so what makes this really powerful though is you're not just limited to circles like this what you can do is you can do what's known as chaining these components together so if we were to jump back into our parameters right here and let's say we wanted to add an input so there's a number of different kinds of inputs in here but i just want to set this up where i can just adjust the size of my circle so we could drag an input right here this control knob is going to allow us to set a value well then you can chain these together by dragging a node out of this point right here into this point right here and you can also right click on this and edit it in order to give you different things you can do so for example i want this to have a range of 10 and i'm going to set it where it doesn't have different decimals right here but i can use this knob to adjust this well notice how when i do that right it's actually adjusting over inside of rhino as well so you can see the circle over here so basically what we have is we have a very simple command structure right now where we're saying okay here's the input for your circle radius make a circle based on the size of this radius so instead of you being limited to something that's been created over here you can actually set this up where it's being algorithmically generated live from the commands that we have inside a grasshopper or from the components that we have inside a grasshopper so once you bring them in so let's say for example that i was to drag it doesn't matter the number slider in well you can right click on this and you can click on the help button in order to get information inside of this window for what this actually does and so if you're looking for that additional information you can right click and click on the option for help one thing you might have noticed is mine looks a little bit different than yours in the sense that i think by default the full names are not turned on so it's just going to look something like this so if that's the case and you want to see what these letters actually mean you can mouse over them right here and it's going to give you more information about this or you can go to display and click on display full names so for a lot of the time especially for beginners displaying full names can be really helpful because i really want to see what this means because i have no idea what p and r mean inside of the circle right here and honestly i would much rather have the full names in here at least for right now and so one thing that i find massively helpful is if you go to grasshopperdocs.com right here so if you go to this page right here there's actually a page that'll show you all of the different tools that are inside a grasshopper so you can actually see them all kind of in one place so you can just kind of scroll through so instead of actually like clicking between the different tabs to try to find something you can go to this page right here in order to see all of those and you can mouse over them and you can click on them in order to get more information on them so if you want to see what the different inputs are other things like that you can go to this page there's also an option right here to view the complete component index what that's going to do is that's going to show you all of the different components in here and it's going to have all their names as well so for example if you're looking for the circle you can either just do a control f and just search for the word circle on this page notice how these are all listed out and they tell you exactly what they do and then again if you want to click on them you can get that additional information in here just like this so you can also search at the top of the page so for example if you want like a box right here it's going to give you a drop down and you can see the different box options so i could click on box 2d right here and it's going to go find that tool so these are massively helpful in order to find all the things because otherwise it can just be super overwhelming trying to find everything within grasshopper itself alright so i'm gonna go ahead and clear all this out for right now but basically what you need to do when you're thinking about how to create something using grasshopper is you need to think about the steps that go into what you actually want to create so let's do something very simple so the first thing i want to do is i want to start by creating a simple box and so the way that i'm going to do that is you can go through and look for the different items in here just by clicking through what i want to do instead is i just want to double click in this space when i double click in this space what that's going to do is that that's going to allow me to actually search for something so in this case for example i want to create a two-point box right here and so notice what this is going to do is this is going to ask for information about what kind of points we want in order to generate this box so right now for example i don't have a box in here because i don't have any points but what we could do right inside a rhino is we can actually add some points and use them to generate our box so let's say for example that i wanted to add a point right here so i'm just going to add a point right in the center my object and then let's create another point we'll put it over here but i'm going to move it up so i'm going to click on it i'm just going to move it up like this and so this box is basically looking for two points right so what we can do is we can select our point right here we can actually right click on this and click on the option for set one point and so what that means is that means that this point right here that we had selected is now set as the input point for our box now let's select our other point well if we right click on point b and click on the option for set one point notice what that's going to do is that's going to use that as the other point for our box so what we did is we basically set this so that it took the points inside of rhino and used them as an input in order to generate our box well the cool thing about this is this is just using these points right from our 3d space well what that means is that means that i can take this point and i can move it and my box is going to adjust with it so i can actually reference live things inside of rhino i can link them to the components inside a rhino and i can use this in order to quickly and live generate new geometry inside of my rhino space right here and so one thing you might have noticed about this though is when we do this when we have our two points in here and we want to try to do anything with our box right so let's say i wanted to like split this or work with this nothing's happening when i click on this so the reason for that is this is just being created inside a grasshopper over here and this is giving us a preview display of what's being created so we've got a preview display that's in here but what we don't have is we don't have anything telling us okay make the geometry once we're done right so what i can do is i can right click on this and there's an option here for bake and so when i click on the option for bake basically what that's going to do is that's going to create an object inside a rhino so i'm going to type in a value of box right here and click on ok well when i do that notice what that did is that generated our box as actual rhino geometry so now i have this full on box in here and if i go to shaded view you can see how this is an actual box basically what that means is that means the grasshopper is still over here generating this object it's just that we created a real true um version of this inside of our 3d space so now we can come in here we can edit that we can adjust that we can do whatever whatever we want it's not really linked to rhino anymore so let's say i was to make an adjustment whoops let's say i was to make an adjustment here and make this really wide and then we were to right click in order to bake it again we call this box 2 and hit ok well what that's done is that's generated another box over here but notice how that didn't have anything to do with the box that we've created over here this box is created it's done it's baked it's complete and so we can save this for access later so we can do a file i'm going to do a save as but i'm just going to save this i've created a folder for grasshopper files and i'm just going to save this as two-point box right here so what that means is that means that now if we want to click off of this or if we want to create a new document right here we can do that and so now you can see how nothing is showing up inside of rhino anymore because we don't actually have anything live so once you understand these principles there's a lot of interesting things that you could do so let's say for example we were to add like a line in here and we're going to do a line segment just defined by point tangent and length and what we want to do is we want to set our start point to this point right here so we're just going to set one point we'll go ahead and we'll add a slider in here so we'll add a number slider for our length we'll just drag this in here and i'm going to go ahead and right click on this slider and set the slider so that we have a max of we'll call it 15. but now if i use the slider notice what that's going to do is that's going to generate a line in here based on that point and so we're just going to go ahead and we'll leave it like this for right now but then you could divide that line into points so we could just search for divide in here we'll click on divide curve and what we want is we want to drag the line into our curve and notice how when it does that it divides this into points inside a rhino so what that allows us to do and we'll just copy we'll do a ctrl c ctrl v that allows us to set another value in here for the number of points that this divides into like this so notice how that gives me control over those points well remember those points can now be used as inputs for different shapes so we've got all of our points right here and you can actually mouse over this and see the points that it's generating but now we could tell this to create shapes in here so if we were to double click in here and do like a polygon like this we could take those points and plug this into our plane right here so now what that's doing is that's generating a polygon at every single point that's coming off of this and then again we can take our number slider i'm just going to duplicate it again and we can adjust things like our radius in here so and again i want to set this so that we don't have decimals in here so we're going to set our digits to zero but notice how we can use this in order to generate our radius right here and so then from there and we're not going to get too complicated in here you could plug like random numbers in here or something like this but what this is doing is this is generating it out right here with these different polylines well what we could do is we could look for a loft function and we can drag our polygon into our curves right here well what that's going to do is that's now using those curves in order to generate a shape right here and i guess we will get a little bit complicated so let's say that we were to drop a random value in here like this and drag value into our radius we'll drag this number into our number but notice what this allows us to do is this allows us to based on a number that we give it generate kind of a random shape in here so it's randomizing the values in here and then the seed is going to re-randomize this right so we can create another slider drag this over here and don't get too overwhelmed by this this is something we can talk about in the future but notice how we can use this to start randomly generating different shapes in here and we could set at a maximum and minimum range if we wanted to i'm not too worried about that for right now i just want you to have kind of an idea of what this can do but this is now procedurally generating this shape well then we could take this shape right click on it and we could bake it like this and we'll just call this organic shape and hit ok and what that does is that actually generates the shape in 3d inside a rhino so you probably wouldn't create a shape like this but you might use this to create some really interesting like walkways or other things like that procedurally so once you understand the way that these come together so that you can use them in order to generate different shapes this gets really powerful and so one other thing that could be valuable for you so if you ever do want to disconnect something like for example if you wanted to disconnect this feed right here notice how if you click and drag it doesn't really do that you can't really select this but what you can do is you can either hold the control key and click and drag across here in order to disconnect something or you can also right click on an input and go down to the disconnect function and click on whatever you want to disconnect so for this one right we can disconnect the number slider just by clicking on number slider right there so if you do ever want to remove one of these nodes in here you can do that by right clicking and clicking on the disconnect function alright so grasshopper is obviously a massive thing to cover hopefully this intro at least gave you an idea of what you can create with this so you could get started if you have questions leave them in the comments down below we're going to be talking a lot more about grasshopper in the future but as always thank you so much for taking the time to watch this and i will catch you in the next video thanks guys