Blender Fields - Hanging Cables Part 1

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone johnny here in this video we're going to take a look at how we can create bundles of hanging wires like this that move nicely when we move the control points and that give us complete flexibility in dressing our scenes with some cool effects let's get into it so first off we want to look at some ways that we could accomplish this effect without using geometry nodes the first would be to use the catenary curve plugin that comes with the extra curves add-on we could do something like this we could add a few empties select the first two [Music] go to curve knots catenary select the next two pressing f3 we can do the same option again and again at this point we would have three separate curves i would say this is probably the least efficient way to get this effect so let's try again the next would be to use a curve i'm going to add a bezier curve [Music] and put a point at each point that we would want the cables to connect the simplest way i've found to do this is if we select all of our points change our handle types to vector so that each pair of handles points to one another then turn on curve edit mode handles all now we'll go through and just select the control handles and not the control points then if we grab those and drag them down constrained to the z-axis we get the effect we're looking for of course if we were to change this around [Music] we could mess it up really easily we would need to select all again change them all back to vectors select each pair of points and drag them down now because this is a very distinct set of operations we can actually replicate these steps using geometry nodes i'm going to delete this curve and add a new one let's go ahead and open up a geometry nodes editor i'll add a new geometry node tree because this is already a bezier curve we wouldn't necessarily have to do this first step but one of the tricks i'm going to show you later will make this first step more important so the first thing we want to do is change this from whatever kind of curve it is to a bezier curve to do that we use the set spline type node and we make sure to change the type to bezier like i said this one was already bezier but that's okay the next thing we did was set the handle types to vector so i'll use a curve set handle type node change the type to vector and say both the left and the right handles should be vector handles all i need to do is shift-click on the buttons to select them both now we want to select the handles and drag them downwards you can accomplish this in blender 3.0 beta using the curve set handle position node however you have to use the position input luckily in blender 3.1 alpha a patch that i actually recently committed added this offset option to the set handle position node which means it takes the existing position of this the handles and moves them just the amount that you add here to give you a quick idea what this would look like in blender 3.0 beta i have the same offset coming in but i'm combining it with the existing curve handle position and then using that result to set each handle position that's really the only difference between blender 3.0 beta and blender 3.1 alpha with the new offset option if i move this down on the z you'll see that the left handles droop down one of the differences between the set handle type and the set handle position nodes is that you cannot multi-select with the set handle positions because of the way that handles work so you have to do left and right separately so i'll duplicate this node and change the handle to right as you can see we've already gotten the basic effect we were looking for and if i edit this curve [Music] the cables move accordingly now what i'm going to do is i'm going to select these four nodes and press ctrl g this groups them into their own little node group if i hit tab i go back out to my main tree i've got a basic hanging cable node if i want to have an option on that node of how much to droop the cables i could drag that in from these offsets and since i want them both to be the same i'll put them both in the same output now if i hit tab and return to my main node tree you'll see i have this now we want these to be a bundle of cables rather than just one i'm going to press alt click on my node group and disconnect it we're going to start by making a bundle of our original curves if we want to have several of one object we can use the instance on points node to accomplish that so what i'll do is i'll go to instances instance on points now the thing we want to instance is actually our main geometry so we're going to move this connection to the instance and then we want to give our points what shape of the bundle we want to do that i'm going to use a curve primitive star you can experiment with all different types now as you can see we've got multiple copies of our original curve and i can adjust the radius and the points and the twist to get the amount that i want if i grab my hanging cable node group and drop that now on my instances you'll see that that's starting to look pretty good however if we wanted to move these around a bit and add a little bit of randomness we could add a set position node to our instances and then add a random vector to the offset if you wanted them all to be at the same z position at each connection point you could make your z min and max all zero but then you could have your x and y be as varied as you like i'm going to use just a little extra z here finally we want to give these wires some thickness that's pretty simple all we would need to do is add a curve to mesh node after our node group [Music] and then add a profile curve of whatever shape we wanted each individual cable to have probably just a circle in this case we'll want the radius to be pretty small and we won't need much resolution now you have a whole bundle of wires and the great thing is these are still only controlled by those original four points that we added so if i grab one of these and move it around everything moves dynamically now one last trick we can do is instead of using a curve as our control object we could also use a mesh i'm going to go ahead and hide this curve and add a new mesh to my scene you could add a plane and delete three of the points but i'm just going to add a single vert you have this option if you add the extra mesh objects add-on i'm just going to take this single point and extrude it a few times i'll add a geometry node tree to it but then i'm going to switch to my previous node group now of course this doesn't do anything because our input geometry is a mesh and not a curve but we can fix that if i take my group input drag it over a little bit i'll go to my add mesh menu and choose mesh to curve and i'll drop that on this line now this is controlled with mesh points instead of curve points here's where you can do some fun things if i take this point and extrude it over here you actually get a splitting effect if i fill these faces i can then have a loop and really your options at this point become pretty limitless i hope you learned something new in this video and i hope it inspires you to make something awesome if you enjoyed the video hit the like button and if you're enjoying the channel consider subscribing anyhow until next time i'll catch you later [Music]
Info
Channel: Johnny Matthews
Views: 1,827
Rating: undefined out of 5
Keywords: Blender, Blender 3.0, Geometry Nodes
Id: k65ofSRnxfs
Channel Id: undefined
Length: 8min 38sec (518 seconds)
Published: Sat Nov 13 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.