Generative Design in Grasshopper - Part 1, Parametric model and analysis

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone Anton here welcome to another video from the computational design basics course by the digital design unit at the Technical University of Darmstadt this is the first of five videos that will introduce you to generative design in grasshopper now to make a meaningful use of generative models in your design practice you need three things first you need a parametric model that is able to take multiple states and we're gonna take a look at that in this video second you need a way to evaluate each of the states of this model based on a given metric such as the total floor area or the shadow withdrawals over a neighboring site or anything that can be measured in numbers in this video we're also going to take a look at this basic computational analysis and third you need a way to browse sort and filter to all the design options that the computer has generated for you we are going to build a custom tool to do that in videos 2 & 3 of the series in the fourth video I'm going to walk you through an example workflow of how to use the generative design tooling that we've built in your design practice in the fifth and last video of this series we're going to take a look at evolutionary optimizations so let's get started first we're going to create a simple parametric model of a tower as a reference we're going to use the Sears Tower in Chicago the Sears Tower was built in 1973 and designed by architectural office Skidmore Owings and Merrill what is very characteristic about the building is it's bundled tube structure it consists of nine tubes of varying Heights in a 3x3 square grid each tube has a dimension of 23 by 23 meters and the tallest one is 110 floors high so we'll start by building the floor plan of this tower first and then extruding the tubes let's switch to Rhino and grasshopper empty Rhino file empty grasshopper file so let's start by bringing in a square day if you don't see where the great is you can right-click somewhere in the cameras and have the get selected click zoom that would Center the zoom in Rhino to the selected component in grasshopper so here we have that is with the size of one and five by five cells what we actually need to do is make the size of the grid 23 since that's the dimension of each tube and have a three by three so let's swim again area so that's the floorplan of the tower now we need to extrude each of these squares with a different height for the purpose we can use the extrude component and the extrude component takes in a geometry let's be a bit more explicit here and create a component to hold the curves for the floor plan of each tube okay here we go and then the other thing that this component needs is the direction of exclusion which is a vector we are going to extrude in vertically so unit Z vector should do and then we need the Hat the building has 110 floors and each floor is 4.5 meters high so one way to approach it will be to multiply the number of floors by the floor height and use that number as the as height so here we have all the nine tubes of the same height now how do we let me swap this then so that would be the floor height I will rename it so we know what it is and that would be the height of all tubes at the moment now we need to find a way to set that individually and let's look at the data the travels long and coming from the curves we know by the dashed line that that is a three a list of lists single lines are only single data in that case our vector from the height and double lines let me flatten these three to a list double lines in Rhino windows and a thick line in for Mac means that on the line on the wire only a list is traveling okay so let's let's take a look in the extrude component nine polyline curves are coming in one list because we flatten them and here we will then need nine vectors instead of just one if it's only one it applies for everything that comes in B if we have nine then the first one will be matched with the first one from the directions the second curve will be matched for the second direction and so on so here's a way to get that nine values we can just copy and paste this rider but before that let's configure it to something we want so let's start with a minimum of one floor and we said that the maximum will be 110 floors so here we go minimum of one maximum 110 and then we can copy and paste that a couple of times to give us nine sliders then we can use the merge component to bring them in together here we go and then we pass this where we have nine values already let's set different values for each of them and now we have nine values we can pass them to the multiplier and we can observe already in the model that if I'm changing one slider yeah only one tube is moving up and down so basically that would be our 3d model making part let's explicitly say that that's a vector so that's our 3d model here's our floor plan we don't need to group it and okay what we want to do next is to cap these tubes so then they don't have holes I'm going to bring that into the group and at the end we have a geometry [Applause] here we go we can hide the preview of this and here's our building parametrically defined Sears Tower one thing that's characteristic of the Sears Tower though is that the core the middle of these tubes this one here is as high as the highest of the others it would not make sense for the core to be lower because it contains elevators and staircases and so on so it has to reach to the top floor so how can we how can we get that basically we are talking about the fifth one as I move it you will see so this is the parameter that we need to set to whatever the maximum from all the other ones is so first of all let's exclude it holding the command key or control key on Windows and repeating a wire will actually disconnect it and here we have the list from which we want to find the maximum we can find the maximum by sorting the list and it gives us the list sorted from the smallest to the highest number we can revert that so we have a list it's from the highest to the lowest number and then we can get the first list item which is with index 0 from that list by default this is set to 0 so this is our highest number at the moment under 10 10 I change it 105 and we want to use that in the fifth position here unfortunately we cannot just do that because that will create a cyclical definition where the output of a couple of components is also the input of these components so it's impossible could calculate let's disconnect that so we basically need to assemble the list of values again let's split the list that's coming out of here we're going to split with index 4 so here we have four items handy we'll have the remaining four items so d1 to d3 will end up in a and the 6 to the 9 will end up in B and then we can use the merge component again a will connect first then we want the core height and this will connect B will connect afterwards but observe what we have here unfortunately grasshopper has already kind of stamp stamped the data with a different structure and it's not a list and if we flattened it our highest number was not is not going to end up in the fifth position that's why we actually need to flatten it on the input nut'n button and now we see that Hamilton 5 is on the 5th position with index 4 and now we can use that as our new multiplier value here so we have now 8 sliders and whatever the highest is the core always stays equal to that so next let's measure the area of this building to do that we need to first find all the flaws and measure their areas and one easy way that you know already how to do that is by using the contour contour where we need the geometry to slice we will need a starting point let's keep it at zero zero we will need a normal vector and we need the distance the normal vector is correct and the distance is actually our floor height which comes in from here as with everything else let's make everything a bit more explicit here so that's and this is the number so that would be the floor height at the end we get a bunch of curves and let's use the area command to find the area of each curve and then the mass addition component to sum all of them together a panel shortcut quotes oh yeah however they are in a three and that's why they don't get some all together we need to flatten all of them into one list here is the area of our building as it stands now if I go back and change actually let's take this with us and if I change the sliders you will see that the area is also changing but also what you see is that the definition is quite slow because every time it has to perform this slicing and there is a faster way to do that in that particular design and that's just calculating the area with the formula so let's see how we can do that for each tube we have that many floors and if we must Edition the floors that will give us the total amount of floors we have in the tower and then each floor is 23 by 23 meters so we can multiply that taking it from here 23 meters actually let's take in the number again okay make it easier to connect later so 23 by 23 and all that we need to multiply so this is there a one segment and how many segments we have 616 at the moment I can multiply it here and at the end we have a number which is our area let's use an integer number so that is our area we can check if it's the same as the other method so this gives us exactly the same number but a way faster method to calculate actually to to check how much time something takes if you don't see these icons these hints here go to display and canvas widgets and switch on the profiler the profiler tells you the computing time of each component so that's which done we already see that that's in the red section 430 milliseconds that's half a second every time a delay for the contouring and what happens now when we disable it so this is our slow method of calculating the area this is our first method of calculating the area which comes in here but basically now can slide in and up down and up all the floors and we have immediate results just for documentation purposes area slow and this is area first what we want to do next is calculate the shadow for these purposes I have prepared a small contact here where we will have neighboring to the plot of the tower we will have a park and we have a difficult neighbor who doesn't want to have any shadow from our tower to calculate the shadow of geometry we can use the mesh in you choose mesh shadow component so that already tells us that we need to convert our geometry to a mesh which will be passed in here and then we need the direction of the light rays so that would be a vector and plane on which we project XY of the world system is okay so let's let's connect the mesh this is where our building is in this component is all the tubes I will just pass it directly to the component here it will be converted automatically by gas hopper to a mesh and then we need the direction of lights flight rates so we need to build some kind of a Sun system there are various systems for finding the Sun position in a particular month or time of the day which are available in plugins such as ladybug for example we are going to build one from scratch it's not gonna be exact but I think you're gonna learn also few new things as we build it so if we imagine the Sun on a sphere we can think of the Sun system as evaluating that sphere or the upper part the upper dome of that sphere evaluating that surface to find a point and then creating a vector from that point to the center of the sphere and that's what that's what we are going to do so I'm gonna bring in a sphere here yeah by default it's already placed in zero and the origin of the coordinate system now we're just going to give it a huge radius let's go with five hundred and fifty and see what we get okay and then we want to slice it in the house so we get only the upper half in the intersect section of course over here we can do mathematical and breadth and a plane this here is the breadth and the plane will be the XY plane by default already set to that here in grasshopper so here we have a circle and then we want to split a lab with a cutting shape so we'll be splitting with the curve this what we get at the end is to trim surfaces we just need one of them let's see if it's the index zero or its highly nothing else okay so by default the index zero is actually good now we have the upper half of the surface actually I think we should be using is split yeah this is a better one to use so that would be the curve that would be the surface and still let's put it off and we're going to pass it to evaluate surface component evaluate surface here's our surface we're going to be parameterize it and we need a point so I'm going to create a point from XYZ construct a point and set a slider for the U and the V direction here we are and let's see where our point is our point is actually below this is because it's turned surface and I know still keeps the information of the whole surface the whole UV space in there but we can actually deal with that quite easily simply by setting this slider to be moving from five point five to one so it will start on the horizon and move only up and then the other slider helps us navigate around the building just to maybe understand also where the Sun is let's bring in the easel curve to visualize so that would be the curve the surface we want to repair ammeter eyes this surface and pass the same point here and now we have these curves that helped us understand let's preview off everything else that help us understand where the Sun is point and here's the point so now let's visualize the vector today is the point again since it goes from here to zero zero but it's reversed so we need to reverse the vector and we can use the vector display extended component to display this vector on that point amplitude let's set it to 200 so that's our vector can bring in a color swatch for the color of that vector let's make it blue there you go now we have a basic solar system in grasshopper which gives us a vector to define where the Sun is I'm going to set these to 0.6 and 0.9 because that's the direction that gives us a good shadow that overlaps both the neighboring law slots and in that sense will then have to only find the optimal shape and not an optimal Sun position we can group all that into its own group the vector this is the output of that group that we're going to use later and this is called sum so let's go back to our shadow creating component mesh shadowy past the mesh now we need the light rays direction we found it and as you already see from each of the tubes it calculates the shadow outline we can use the region Union component to combine all these flatten them first to combine all these into one curve we hide all this and display that in the curve here we have that curve and we can measure the area of that shadow this is the area of the shadow let's go it in the chair numbers we don't need the decimal points so next let's find the part of the shadow that lies over the park and the part of the shadow that lies over the neighbor we're going to bring in the curves and then outline the back into grasshopper so that is back and that would be neighbor set one curve select curve and we have it and again using the region difference this time you know the region intersection we're going to pass the shadow here this is the shadow and park and we're gonna end up with the small rectangle here let's measure its area let's click and copy this thing then so this is the area I can right-click on the panel and say Park shadow this is total shadow yeah yeah and then we can repeat the same for the park now for the neighbor copy this whole part and just substitute the park with the neighbor and that would be named shadow there you go let's cook that so you call this some kind of an analysis shadow analysis one more thing we need to do for that model is to figure out what to do when there is no shadow thrown over the park or over the neighbor let me show you what I mean first of all let's take these panels for the part for the shadows and let's reduce the number of items that are shown here I can right-click on a panel and remove the paths and the indices that way only the area is shown and then let's exclude them let's select them all exclude them from the group and bring them bring them all the way up here to the front we have our sliders so these are the sliders that define the tube let's take a look at the part at the moment one of the tubes is high enough to throw a bit of a shadow here it's this one look what happens if I reduce it the shadow is at one point not anymore over the part and then our Park shadow component it doesn't say zero it says nothing this will create problems later on we need to make sure that this here is real the way to do that is to go back to where we create the shadows and basically see where the orange the orange line starts that means no data is traveling on that line it starts here at the region intersection because if the regions don't intersect there is no intersection so I will make a bit of space here by using the out key and the component we're going to check to use to check is whether an item is no if I connect this here and I can check the end output it tells me - yes an item this item is true at the moment is no at the moment so we can use this data to weave into the result so this is our result based on this pattern so if it is true to means one false means zero if it is true we want to get whatever comes in one in the input one and what will come in input one is an area of zero and if it is false which means there is an intersection this item is not know then we want to get the area and this would be our result you see now this is not a range any more orange anymore it is zero let's go back to the beginning here we are our Park shadow is zero let's move that tube up again this one and at the moment that it begins to intersect that we are getting the correct shadow so we need to do the same for the other shadow so these two I will copy and paste them and just reconnect this region and then this area everything else is the same and then we can bring this tidied up a bit and bring it in the group ok so we have a model which lets us parametrically create a tower by setting eight heights for its tubes it also lets us measure the flow area of this tower and how much shadow it flows over to neighboring sites and we can use that in the next part and that was it for this part of the tutorial looking forward to see you in the next one where we're going to take a look at how we can generate more auctions at once from this parametric model we just built
Info
Channel: Digital Design Unit - TU Darmstadt
Views: 13,245
Rating: 5 out of 5
Keywords:
Id: -HLRtXSG7fQ
Channel Id: undefined
Length: 27min 47sec (1667 seconds)
Published: Tue Jun 30 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.