Warp/weft simulations in Kangaroo (New tutorial style)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys this is going to be a different kind of video to what I usually do I'm gonna what I've done is I've pre-recorded the content so that I can just narrate it and talk over the top of it this this should free us of the annoying click sounds that I get a lot of good lot of comments about I also want to preface this by saying this is gonna is going to go pretty quickly we're doing it at double speed and we cover a lot of content so let's get to it here we're just starting with a cylindrical point because we're going to be creating a circular sort of mesh so by default we're always going to use sally's of Pi for that server 2 pi that's our entire reigning circle and now we're also going to grab another range component for our radii values and so I'm also using binary values so 2 4 8 16 and 32 so on and so forth just because they play bit nicer with divisions and now I'm just going to create a remap range for my inner and outer radii which you'll see in just a second when i zoom out there we go and so I'm grafting that value is also that the radii cross-reference the UM the angle values and so now we're going to use the graph method to get a bit more control over our simulation and then we're going to create a mesh so obviously when we're creating the mesh always flatten the points coming in and then we need a you can name any cap which is going to always be the amount of values in a range plus 1 and then I'll plug these in and I think I plug them in wrong yet so I spend a waste a little bit of time here just changing them around but eventually we'll get it right and there we go okay there we go sorry so now the meshes mesh is correct everything's everything's working we have control with our Bezier handles and I'm dropping down a kangaroo one solder because I still really like kangaroo one solver so we need to set up our Springs obviously and you'll need to set up the simulation so our button now time result set up and now we're going to create we're going to do something a little bit different we're going to create warp and weft lines with this definition which means we're going to be able to exhibit a lot more control over the simulation because we can we can actually change what the mesh is doing in each direction we could give it more tension across the you direct direction or less tension across the V these are all things that are sort of open to us but for the time being I've just use the normal messages just the base simulation and then what I'm doing now is I'm less tightening out the first and last items of the of each list to give me the naked edges or the naked points sorry and then I'm going to I'm going to use this little function here to create a coal passion and because I've done it based on binary numbers or anything that's two to the power of some value I can I can color way the points I don't want in a really nice way you'll see how that works in just a sick when I preview this up so we have two four eight points now in simulation and these are going to be my anchor points reset the simulation and we've got base simulation going plug the nation and we're way laughing okay so we'll preview that off and we'll preview a lot of the other geometry offs okay simulation works good stuff so now now we're adding in unary force standard component they're used in virtually every kangaroo simulation and we're going to use a merge node for our forces very key so I'll just a really tidy way I think I was talking about this in the last video much better to use a merge node again so gravity I'm going to modify minute overall gravity because I want more I want a greater effect in this simulation and so now I'm just going to connect in the the length parameters for the rest length parameters for these um for the simulation and actually make two mistakes there because I'm doing this on the fly and we'll see what those are in a sec for one I accidentally plugged it I plugged the value and stiffness not the rest length and I also ran it over polyline so with the springs component you can't do it over over polylines and it has to be over individual line segments so in a second I'm going to figure that out and I'm going to drop down to explode nodes so we'll just which wait for that to happen just checking to see what a you know just the whole debugging process simulation clearly isn't working what's going on Oh yep good good job game you need to explode them okay so we explode them recent simulation and it's all working but I also notice here that the stiffness is is plugged in which is which is sorry the rest length is plugged into the stiffness which is not helping so I'm going to quickly change that in a6 there we go and now we're going to we're going to do is something a little bit different with with the busy a control handles we obviously pulled out another grass pepper and what we're going to do is we're going to map this stiffness of the of each line segment or each group of line segments and so I need to graph this so that it relates to each each branch index that I want and so what I'm trying to do is I'm trying to make the exterior edges stiffer and the interior edges a bit more flaccid for lack of a better term and the this will have some really cool effects you can see that the closer to the outer edge it holds a bit more taut and the inner edge is a bit it's a bit more jellyfish-like I think that's a I think that's a metaphor that I used in the last definition and so now we're also going to okay so we've set up the stiffness for one direction we're also going to do the same to the other direction and key thing to note here is that the number of lines is going to be equal to one less than the number of points because two for our two points make for one line and so here I'm just checking that my branches line up you can see I have sixteen branches in each and then I just had to flip the car I'll flip the matrix going and then you can see there we go there's our um there's a simulation automatically coming into play now the now the middle will the center pieces closer to the center the edges closer to the center have a lot more fluidity in them be they hang a lot looser which which is something I haven't really seen a lot of people try and do so I thought I did I'd show how we do this in a tutorial okay and so now what I'm going to do is I'm also going to add in some some sort of exterior springs into the simulation this is also something I don't think I've ever seen anyone else do at least correct me if I'm wrong but what you can do is you can plug multiple different kinds of geometry into your simulation at the same time so I'm going to prime going to have meshes and polylines running into the simulation which means that these edges are these curves that I'm creating on the perimeter while no longer going to be anchoring the mesh I'm going to be anchoring the curves and that way the mesh is completely completely in suspension and obviously it looks a bit confusing at the moment so I'm just going to throw in a merge node and merge all our all the geometries into the geometry tab and obviously a bit of mesh going so we can't see the output properly but now preview that off and you can see there are my polyline so really quick a really easy way to do it is take a line divide it up and then create a poly line through those points and that gives you that gives you a more accurate representation of a rope or some sort of bungee cord or something in the way it would react and obviously we can we have to create a separate Springs simulation for each and every element that we bring into the simulation okay and so now what are we doing now okay so at this point what I also want to do is I want to add some rotation some rotation into the original mesh or some rotational opposites and so I'm taking I'm dividing the uh dividing the range desert or two pots or 350 degrees by the amount of divisions which is 32 in this case and then I'm multiplying it by several things multiplying it by an integer so I can so I can sort of upset each so I can offset each curve from the previous one as much as I want you'll see how this works in just a sick when I plug it in and we'll just need to preview this on yes you can see we have rotational control over um sort of we can do incremental controls and we can also if we pan down the six oh and add the flour in we can do in control based on integers so hole multiples of the of the rotational distance okay now what I also want to do is I want to add in a second line of control or a second line of um ropes or something based on based on another closed position into the center so this one I'm not going to well at the moment I'm building it with this that so with a line with start direction in length we're going to change that in I don't know very soon and what this is going to allow me to do well I sort of I want a bit of that rotational component in the in the final mesh so I'm going to build a new line component and I'm just going to scale the points in and I'm also going to move them downwards so we're going to move them in a negative Z direction so that there did closer to where they are in the endpoint of the simulation so I moved them down nope you need to plug them into your line and then plug that into the division and then we'll also have to grab our endpoints and merge them into and into a new node for all the anchors that we're going to create and then that should be happening soon yeah you can see so I've taken the anchors from the outside curves and the new anchors reset simulation and there we go we're getting a bit of a strange result and so this slider here allows me to pick any how should we say any any row of points that I want within the the entire simulation okay and so now once again I'm just just setting up the spring length so that as well and there we go we now have a working version of it and you can see at the moment it's on the exterior which probably isn't what I want there's something I'm just going to change in the simulation as well by scaling it in and now we're going to start to do a couple more interesting things Honda yes you can't you can't scale anything to zero this is something I find out quite a lot I always forget this but yeah you can't scale by zero that doesn't mean anything in grass aw and grasshopper and Rhino unfortunately you can another programs like Max and Maya I wish you couldn't rhino but you can't at the moment um okay and so now we're going to add in a rotation component actually what I what I like to do when I'm doing multiple transforms rather than s bringing them into each other you can do what's called a compound transform so you merge several transforms together and then you and then you basically transform the geometry once by all the transformations at the same time you can do this with any number of transformations you just need to watch the order in which you add them in together especially if they're on different planes and such this works well because they're all using the same plane of reference so I can do my move scale and rotate all at the same time and you can see I keep I keep setting that to zero because I think it's really fun to do okay and so now now what we're going to do is we're going to try and build some money some animation control straight into the straight into the simulation without me having to really tinker with any of the parameters this is something I did once in my way simulation tutorial where we're sort of going over another one you do it again so I'm just creating a rotation based on the counter coming out of the coming out of the simulation reset so you can see we can really we can get some really nice rotation going which I don't even have to touch it all it can just run all of it on its own the counter component and then we're also going to set these up for the move and for the scale as well and so for the rotation we only because rotation goes in the circle it can just continuously loop and loop but the scale we can't you know if the scale gets too high then we're just being a bit and service our geometry so what we need to use is this modulus function so that it's constant that it's modulus can kind of bound it to a certain range but what I'm going to find very quickly is that modulus is still not doing the right thing that I want for this simulation because it's going to give me a hard reset every time it goes to zero so what I'm actually going to end up doing you can see that like that's way too jerky for what I want to get out of the simulation so what I'm going to do in second is I'm going to use the sine wave because sine waves are sinusoidal they go up and they go down and they do it smoothly so I'm really just going to use this for my for my vertical move because I think it's a it kind of works for the remove it gives us this with this winter heartbeat type feeling um which I'm not sure if people are into but I thought it was I thought was kind of cool so now we've just put simulations so we can create our our next control so sine of X times y so that we have because we're going to be using the counter once again for our our x value and then the Y so that we can control the amount that it's or the the frequency of the of the function and so once again it's way too quick at the moment we're really need to hold that in and I've also added an amplitude parameter at the beginning notice I think I should have slowed this down a lot more but apparently I was happy with it at the time so it's doing its thing at the moment and it's kind of a funky simulation there we go now we're getting something a bit more interesting we're getting this weird sort of how do we call how we call it - periodic motion okay but now now here's a is a thing that happens I need to simulation at the moment is going to break because we need to set up some initial values for each of these move scale and rotate functions it's not it's not going to work because I think I think the issue here was that the when when the counter reached R is reset to zero you know obviously that's it's our scale to zero net breaks the entire simulation so what we need to add I'm just going to I'm going to figure this out in a few seconds I'm going to need to put in some more expression come on so at the moment I've just reset it back to what I had before now what solver will be sort of default values and you can see the simulation works okay so now here we go so if X is going to change the true return Y otherwise return Z so I want so when X is true that is when the simulation is being reset so this is going to be my default value and then the expression that I created before is going to be my value for once the simulation starts running and then I'm going to do again I'm going to make another I'm just going to copy and paste this boolean expression and then connect these up and actually what I should be doing is not connecting up the Z transformation on the left side but rather on the right side there we go six that made those connections and now I need to do one more for the rotation as well you can see this is what I really like about this is I'm I'm really showing my entire process from sort of start to finish and that's that's something I don't think I've shown all that often like you actually this is a lot more of how I work and how I actually work things out on a sort of day to day basis it's not all just fluid as my tutorials generally are trying to be okay and so now what we're also doing is we're adding in we're messing with this control for the V what's it called at all actually we're not adding it in now we're just now just messing with parameters and what I was doing there was showing how you can you can sort of subset the range of the simulation so we don't need the entire I mean we don't need the entire 0 to 2 pi or 360 degrees of geometry we can we can cut it back if we want now I'm just going to do a bit of tweaking and going to turn all these what I displays to head in just so that it's decluttering my definition of vector you can see it's gotten pretty messy and so yes and now just more tweaks on the actual geometry we're going to going to turn the simulation on to see or what actually works what actually what tweaks actually look good so this we can see that this this graph mapper isn't doing too much but this one this one has a lot more control will be a lot more than I was expecting and then this one also so um and those are the two graph methods that are controlling the warp and weft directions and the stiffness of each of those components and then obviously we're going to do a bit more tweaking here so that this rotation is a lot slower as this this game now that was the rotation this is the scaling basically I'm not happy with how much it was scaling at the moment and then what we doing here so I just really disconnected move because apparently I didn't like it that much but there we go will reset the simulation yet so when you change the point count for either of the either of the springs or those on those tensioning cables it's going to it's going to break the simulation so we need to do a hard reset every time we do those and that's basically the entire definition hope you enjoyed it
Info
Channel: Daniel Christev
Views: 11,768
Rating: 4.9473686 out of 5
Keywords: yt:quality=high, warp, weft, kangaroo, simulation, grasshopper, tutorial, advanced
Id: oYYbaKjnQJg
Channel Id: undefined
Length: 25min 13sec (1513 seconds)
Published: Wed Feb 15 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.