Grasshopper Tutorial _ simple parametric louvers / fins

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello welcome to my grasshopper tutorial today we're going to be making a parametric louver system so essentially we'll create a script here that will allow us to have louvers along that flow along a surface that the depth of the louver is relative to the proximity to the curve so I have the definition built here and we'll go through it step by step to recreate it from scratch so just to take a quick look at how this is working if I hover around here you can see my louvers are set up where the depth is greatest part when it's farthest away from the curve and is almost zero when it is touching the curve the amount of curves I have is parametric the size of the surfaces parametric I can change the interval spacing that's all parametric I can that I can change the smoothness of the curve if I lower the interpolation it starts to level out I can also change the domain which would essentially the maximum and minimum depth here so if I kick this up a notch we can really extend that I can also pull it in on the minimum side pull it out on the maximum size I can inverse it to do have the opposite where the areas that are touching the curve are the deepest parts it's extremely flexible script and it's also quite simple but essentially it gives a lot of tools that can be used and manipulated to make this into your own design so let's start from the beginning and work our way through this so to do this I'm actually going to have everything exists within grasshopper except for just the curve the only part that you draw from scratch and right now everything else will build from scratch and grasshopper so to start let's just create a simple box so under the surface tab we will go to the primitive section and we will just do a box rectangle up take that back we will do a bounding box we will do a center box so our Center box here and looking at our center box it's going to want the base plane which is XY which is fine as it is that's what our rhino base plane is it's just looking for the size and the XY and Z so to give it a size I'll just create a slider so you can find sliders under inputs here under the params AB or what I also like to do is just double click anywhere and just type slider and it pops right up so when adding a slider the first thing I always do is I'm going to want to edit it just to get the scale right for what I'm doing so if I go to edit I can change the number of digits and since I'm just creating the size of this I'll just do whole numbers but my max I'm going to do it at 20 and the minimum will be 0 that's fine so what does 20 mean 20 is in grasshopper is always going to be what your Rhino model units are set to so in this case 20 here equals 20 see in my model because my units are set to feet so 20 feet here I'm going to make a copy and of this slider for my XYZ so if I just highlight it control-c control-v I can make copies this way I can independently change how big I want to end my x y&z so I'll plug those in here and first I'm going to do is actually turn off the old one so that we're only seeing what new things we're making so I'll select everything right click and turn preview off now we can see our new cube here so as you can see twenty by twenty by twenty cube here but we want quite a bit more width so I'm going to edit my box in the x-direction to give us some more width so I'm going to edit that I'll set my max to 100 feet click OK and we'll bump that out so now we just get a nice long surface so we can start to see that change over a greater distance next thing we want to do to break down this box you see if we click on the box and select the entire box but I'm not I don't want to work with the entire box at this moment all I want to do is work on this individual face so what I need to do is explode this box so that I'm working with just the relevant edges of it so first thing I'll do for that is well go under surface analysis and your your deconstruct key rip drop that in here connect that so what that does is now allows me to have the faces edges and vertices of the B rep so every time I add a new plug here I want to turn the preview off on the old one otherwise they just start to overlap each other it's hard to tell what you're looking at will just keep what we're working on fresh and highlighted so here we can see the difference between the first two is here you can see my vertices are highlighted and the edges are highlighted and the surface and faces all at once but I actually in this case I'm only concerned with my edges because what I want to do is take these edges and use them as a way to divide the distance to start to build some horizontal lines that will eventually become my louvers so how do I select just these two edges out of this whole box I want to list those items so if I go to my sets under lists I can go to list item so the list item plug is going to ask you for the base list which will be here all of my edges so I have 12 edges but and then which individual item or index I'd like out of those edges so I'll plug it in here and you can see it's grabbed this bottom one here that's because the default is set to 0 so I'm going to make a new slider so that I can shuffle through all of my different edges and get the ones I want first thing I'll do is I'll edit and I'll do a whole number because I'm selecting an item I can only do whole numbers it's basically 0 to 11 for my 12 edges so we'll set our max to 11 so I'll plug that here under my item and now if I slide this around you'll notice it's jumping from edge to edge so I can see which edge I'm actually selecting and so what I want is edge number 8 I'm also going to want this other far side so I'm just going to take this and this select them both ctrl-c ctrl-v it keeps the same input I just know that I'm going to want multiple edges so I will copy that out there and I will also select edge number 9 so I've edge 9 and edge 8 great now what I'd like to do is divide these edges into an interval that can start to relate to whatever this ends up being whether it's your facade or some sort of program diagram or something like that so let's go ahead and take this curve we'll take this top one here we want to divide that up so if we go to the curve tab and go under division we have a lot of different ways to divide things so you can divide the curve into equal segments you could divide it specifically by the distance between points or by a specific length for this what I want to do is actually divide by a specific length because I want to have some control over where my divisions happen and maybe that I want that to relate back to a real life scale at some point for this it's going to be still be quite conceptual but I want to design it so that it can be more applicable to real situations so we'll just take my curve and plug it into the input that's looking for the curve divided right now the length is set it's at Mt which is why my plug is orange gray means it has some input and of course red beans it has the wrong type of input which we'll get to that in a bit so how many segments what is the length of my segments I'm going to make a new slider and I'm going to do I'll round it to one decimal place and I'll make the max five we'll say so B zero to five of one decimal place and we'll put that in my length and I'm going to just manually type in 1.5 as my length to start with so what I've done here is I've just simply divided this curve into one and a half foot intervals and you can see all these intervals here I'm going to do the same thing with my opposite end curve so there we can see those pieces at the end there and so now what I'd like to do is simply draw a line between them and I'm going to do this the wrong way first just to see a very common problem and then we will solve that problem so to make a line horizontal line between all of these points we simply go to our curve tab and under primitive we'll just do the most basic line from A to B so point a is all of our points on the left side and play these all our points on the right side but what happens see our lists are flipped grasshopper has no way of knowing that this list started from the top and this list started numbering from the bottom so if we type panel this is a great way to just start to look at your data and see what you actually have going on here so I'm just going to put in my points here and see what I have so here are all those points right that I divided or what stood on the top one here are all these points and it gives you their points in space right so point zero is at minus 100 minus 20 and 20 and here are these points so point zero here is at 100 minus 20 and minus 20 so you can just see by point zero is clearly the on the far right they're all at one hundred so they're all over here and this is at minus 28 in the X and the y this is at minus one in plus 20 so we know right from the beginning that point number zero and point number zero here are different ones at the top and ones at the bottom and when this is drawing a line it's drawing a line from item number zero to number zero and number one to number one and two to two and so on so to get these to speak to each other we simply just need to flip the way that this division is happening so under our curved tab we go to utility we can flip curve I'm just going to plug that in right before we put the divide that curve so this curve here we're basically flipping it here so the curve flip the flipped curve and now let's divide the newly flip curved and now we can see it matches on both sides and now when we draw a line between them it's just a straight line so a little bit of a complicated way to draw straight lines but it's important that we have everything entirely built within grasshopper because it allow for maximum editing as we move through so let's get rid of those panelist we'll keep adding these panels to help explain how the data is working and not working so that we can trouble troubleshoot along the way all right so we've created a very simple set of lines connecting but right now these lines are parametric in that if I change the size of my box they all stay connected and keeps everything from the very beginning editable all the way to the end so now let's break down those lines even further and do a set of points one of the ways I like to think of working in grasshopper is starting from the complex and working your way down to the simplest point of manipulation and then building back up from that simple point so it's very easy to manipulate points and grasshopper it becomes more difficult to manipulate surfaces so when you can the best way to start to think about how to create what you're doing is what are all the points that are going to make up the final output so in this case when we think of louvers we could think of louvers as being extruded from a curve but we met them can think of that curve being created from a series of points so here's our curves right these are straight lines but if we break down those lines into a series of points then we can move those points and then recreate a new curve along their new points so here's our line now first let's break it down into a series of points so if we go division again this time I want to do an equal segments so I'm just going to go to divide curve because I don't really care how far the points are between them from the specific I just want a uniform division that'll give me a sort of a sense of you know fluidity for how much or little I break down those curve points so here's our divide curve it's looking for the curves to divide we'll give it these lines the number of segments and if they're split at the segments which we don't want to split we just want to be still one of cookies of lines so we can see here if we break down those curves into that many pieces as a segment or the default in here which is 10 it's gonna be a little bit of a chunky line so let's give it a little more fluidity and add a slider okay I'm just going to copy a slider from over here and plug it in and follow me we edit that let's make the max 20 okay okay you see what I do before yeah 20 that should be good enough I should give us a good amount of definition and I'm already breaking my own rule again I wanted to turn off all this old stuff so I don't see don't need to see all this just well we'll keep that on so we can get the sense of escape don't need to see these lines and you are really just worried about these points so now what I want to do is I want to move these points in space and particularly I want to move them in the y-direction but I want to move them relative to their distance to this curve so this curve is drawn and right now very simply just go into your front elevation and just draw any kind of curve you want in there I have this kind of you know enough enough shape in it to give you an idea of how it works so how do we how do we connect something we drew and grass up or in Rhino to pull to theoretical points that are only being shown through grasshopper these green points here first thing we need to do is actually bring the curves from Rhino into grasshopper so if we go to our parameters tab go down under geometry and go to curves flop that right there you'll see it's orange it has no data I'm going to select it and then right click and go to set one curve and then I will set the curve you can see a screen so now in grasshopper when I click on it's green so now it's in there so even though it's here in Rhino it has now been brought in here so I can actually hide it if I want to so if I don't want to see it but because it's just a simple line I'll leave it there but it is now in grasshopper and if I go in here and I actually adjust the Rhino curve it automatically adjusted in grasshop so it's a parametric between Rhino grasshop grasshopper as well as the manipulation that we're going to do to it from this point out so now let's find the proximity between all these points and this curve so what's interesting about a curve is we're looking for not just to find the distance between a curve and a point you essentially have to draw a straight line to the closest point of that curve and luckily it's quite easy there is under the curve tab under analysis there's a curve closest point so you can just even see in the little diagram it's doing exactly that right points floating in space finding the closest point to that curve so which is essentially giving you that proximity to that curve so we drop that in here what's asking for the point well we have our points here that we just divided so we'll connect the points to the points and then it wants a curve to project onto so we'll give it that curve that we drew in here and now it shows us all those little points with those is basically just the points where if you drew a line from here straight to here it create that point you can see all the places it would touch as it runs through there we don't actually need to see those so I'll turn that preview up it's more important of the outputs of the points where it touches is the distance this is the key thing that get the output that were concern was it's going to give us the distance from these points to the closest point on this curve so let's look at those distances really quick because this is sort of the key idea of this tutorials not only how to make these parametric but to understand how to scale shift and control domains so if I look at all those distances right there are pretty arbitrary numbers so this is 5 feet 13 feet 20 feet and if I wanted to make the depth of these louvers relative to this I don't necessarily want it to make it exactly the same so I don't want my louvers to be 5 to 13 feet or even like and I want a 20-foot louver just because I'm 20 feet away from the curb what I want to do is adjust a scale that makes sense for louvers based on a scale it makes sense for a proximity so that's really where the key part of this is is changing domain to work with each other so to do that we're going to need a few pieces and these are all under the mast section so under the domain tab there's these three things that always I like to use together and you just remember them to just remember there's three there's the bounds there's remap numbers and then there is construct domain so these three pieces work great the remap numbers is going to do exactly what we need to is going to remap and sort of rescale our proximity into something that makes sense for a depth of a louver or for or whatever object you want to transform this into so let's see what it's looking for at first it wants a value to remap okay so that's going to be the distances and then it wants to know what's the source domain and then it wanted to know what the target domain so what's the source domain essentially what's the maximum and minimum of the initial domains so if we were maybe we'll keep that panel out just to explain what we're looking at here if we look at all these distances right what's the maximum minimum I can scroll through here and figure it out right but there's hundreds of points here but all I care about is what's the smallest point and the biggest point by using this bound tool I can plug this in here and this data I'll need to flatten so that I'm seeing the entire list and then I'll explain a little bit more about flattening data in a minute but for now just right-click on the end and click on flatten and when we've now plug this into our panel what we can see is that the very smallest distance is point zero six so that's one of these points right here which is really close and the greatest distance is 33 so that's probably right here going to here right that's the farthest distance that it is from one point to the curve so that's our our domain the max and min of our distances and so that's going to be our source domain so I'll plug that in here now this is the domain that we are creating so this is going to be the maximum of a louver size for this particular example so I'm going to make a slider and I'm going to edit it will give it maybe one decimal place and we'll say the maximum is 10 which might be crazy for a louver but just so we can clearly demonstrate what we're doing they'll be fine that'll make copy of that and so we'll say a is my low end and B is my upper end so I'll just throw this up here somewhere I leave this kind of low here plug that into my domain so essentially I have a zero to 10-foot domain for Lu and I have a zero to 33-foot domain for the original distances so I'm going to put that into my target and what I now have is my remap numbers so what that does is it takes the smallest number point zero six makes it zero the biggest number thirty three point four two it makes it ten and readjust everything in between so now that I have those remap numbers you can see it's not even displaying anything and Rhyno is because it's just data have to still do something with that data so what I want to do is just use that data to actually move these points in the y-direction so let's go to our transform tab and under the Euclidean we will go to move very simple command or plug it wants the base geometry to move and it wants the translation vector so if you remember how vectors work they need a distance and a direction or a direction and an amount so the geometry to move is going to be all my points right here so remember these points are not these points orginal points so you can see right now they all just went up because the default is set to move ten in the z direction that's not what we want we want to move it based on all these points but these points don't have a direction they just have a distance so we need this distance plus the direction so to do that we can just go to the vector it go to our base vectors and just pick the Y vector so by plugging all of our distances into a Y vector now we have those distances in the Y direction and then we add that to our translation vector so now we can see all those points you can see those points have been moved and they are you can see that they're relevant to the actual curve itself one of the things you'll notice is that they're moving in the wrong direction right they're going sort of into my building even if I switch the relationship so what I want these to do is go the opposite direction so one very simple way to do that is just to make all of these numbers negative so right if I go here to my vector tab and go to reverse the very simple way to just make them all go the opposite direction so they're leaving my facade and not going into my building so I'll just go that into there reverse my vector put them in here now it's all going out the other way I can shoot a little bit once in there so they can see that there they're clearly going out and they're going out based on how far they are from that point that's starting to look like what we said we wanted to do from at least eight points in space standpoint but obviously this is it quite louvers yet so now we need to start thinking about how we can translate these points and make them back into a more realistic design so first thing we can do is simply just make a curve so again thinking about a louver as a thickened plane is defined by the original curve and that original curve is defined by points so where we we started at here at lines we broke it down to the points move those points now let's turn it back into lines then we'll turn it into a surface and then in turn thicken that surface and do a poly surface so first thing we do is connect these lines so if we just go to curve under or spline and go to a NURBS curve which is just sort of your standard curve and right now and our points into the curve control points you can see it makes these curves based exactly off these points so we've sort of created the outer limit of this louver and now one easy way to make a surface between the surface of our you know abstract building and that is just to simply lock between that and the original lines so let's just copy our nerves curve and make another set of curves from our original points here so we have curves that run perfectly flat and straight based off of the original and then we have curves based off of the moved points so before we did all this transitioning done here and then actor so we have these two different pieces and now that we have those two sets of lines we can simply just lock them together to make a surface so under freeform we can use the loft here the way the loft works is it actually just wants you to put all the curves that are me lofted into one single plug so I'll put my flat original curves and first and then when I bring my moved curves based off of the the drawn line here I'll just hold shift while I put that plug in so that it has two plugs and now if I turn off all this mess we can see the lofted surfaces that it's created so these lofted surfaces are now between this line and this line which is starting to look slightly more like louvers turn off some of this other noise and then from here I can simply extrude that surface to make it feel a little bit more like a second looper so under freeform I'll just extrude extrude going to want the base curve or surface so we know what our surface is but it also want to know the extrude direction so again we'll go to vector and in this case we want to extrude it in the Z direction so that will give us a thickness basically the up direction and then we'll make a slider to define how much we want to to move it so in this case 0.25 so that's a quarter foot which is three inches which is maybe a good starting point I'll plug that in so now I have a quarter three inches in the z direction and then I'll use that as my extrusion direction and now we can see that my Luther has some thickness and is completely parametric based off of the curve in right now so let's just quickly explore what what we can do with with these parameters and then we'll bake it in and we'll call it good so again the thickness is this is sort of analogue direct input right so this is I can just change this thickness to anything I want if I want them to be six inches thick for whatever reason I've changed this to 0.5 and now we have some thick thicker louvers here maybe these are you know something else they're more of a shading screen and less of you know a typical Sun Shade so here that's sort of a direct analog input again if we want to make this relative to another thing else we can sort of build up a new definition where the results would end up being the thickness but we'll leave it simple for now our domain is also something that we have control of so the max is at ten but let's say I want to keep these a little shallower it's a little bit more subtle our max can be 5 let's say I didn't want it to get so so small where it's really skinny at the end the minimum can be you know point 0.5 so maybe we're saying it's a half foot to start and you know seven feet at its most extreme so all of that is parametric as well the divisions are so you see when I break this down you can start to see that it gets a little bit less fluid and sort of flattens out as we have less control points for our curve so more control points the more fluid our curve looks and then of course we have our division lengths right and so since I want this division length remember we divided the short and far end of the curve actually want these to be the same so I'm just going to use my same divider here that so here if I change this you can see I get much less and say there's only a loom ready it's sort of a less exciting version of it maybe this is a really dense screen and there's a louver every one foot and they're half sweat sick so you get this sort of a be off on and a much thicker almost wall like version it becomes almost like a fluid wall itself which also can be kind of interesting so let's say we want to leave that there for now and again of course if you go all the way back to the getting what's really great about this and what's really great about having our initial surface in grasshopper as opposed to me just making a surface in Rhino which we could also have just made a surface brought it in to grasshopper by using the parameters and just bringing in a premade surface but I wanted to show you bringing in the original making everything from scratch so that you can see how here if we wanted to come back and adjust the overall width it all still works even you can see it just is not concern with the part of the curve that is not next to it anymore but everything is able to be controlled without having to remodel anything so let's say we have these parameters where we like them sort of just a nice little subtle flowy wall here exaggerate this a little bit more there we go that's kind of fun here is our actual louvers it's the final piece the end when I select that what I want to do will first it to go into grasshopper into right now and I'll make it a new layer and call them louvers double click on that layer to make sure if the current layer and then in grasshopper I'll select this layer all right click and just click bake it'll give me a lot of attributes to look at I'll just leave all the defaults and click OK and then I'll come in here and turn the preview off so I'm not seeing it minimize that and now my louvers are in our baked into rio-chan color so you can see a little bitter and so these are now baked in as actual objects what I like to do is what's great about this is we can start a bacon multiple iterations and then come back and start to compare them one by one to see what's really giving you the effect you're going for so if we just call this louvers option one go to this go to our louvers option two maybe we'll turn off that original layer here let's open pull the grasshopper definition up put this on so now let's see let's compare that to our maybe a louver that's not as thick that's maybe a little bit more depth at the maximum and let's say it's not as dense either maybe like every two feet so generally a completely different look and feel than that first option will come back in here we'll bake this turn it off just make this black you can compare it now we can quickly see option two versus option one and start to make some design decisions about which one is really giving us a look that we actually want to go for and so we'll leave it at that in the upcoming tutorials we'll get into more detail about some of the nuances and start to add some more ideas to our tool set and then start to combine those ideas to really make truly parametric and it's interesting designs Thanks
Info
Channel: Source Render
Views: 6,859
Rating: 5 out of 5
Keywords: Grasshopper, Rhino, Rhino 6, Grasshopper for Rhino, parametric, louver, fin, proximity, parametric relationship, intro to grasshopper, beginner grasshopper
Id: aWqKi7TeQ7M
Channel Id: undefined
Length: 38min 30sec (2310 seconds)
Published: Tue Mar 24 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.