Blender Geometry Nodes [LEVEL 1 - FULL COURSE]

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey there everybody and welcome to an introduction to Geometry notes this is going to be my Series where I'm going to show you how to use geometry notes from beginning as in you do not know anything uh to Advanced so uh my plan is I'm going to make a series that is so detailed and so like build on top of itself that at a certain point if you watch every single one you are going to know everything that I know about geometry node so we're going to start off with simple projects and then we are going to get more and more advanced so because this is part zero let me get Geometry notes actually started and show you what that means and how to do that because this is part zero we are going to be dealing with simple uh kinds of stuff so what is geometry nodes very simply geometry nodes is a modifier what does that mean well let's say we have an object whether it be a cube or you can add in a monkey or whatever for any of these objects we can go to the modifier Tab and add in a modifier it could be a build modifier where over time it gets built that is an example of a modifier um another modifier is you could add the screw modifier and do some like spinning and stuff like that I mean it's up to you but the point is these are modifiers and among the list of modifiers you're going to notice if you look at it alphabetically here we go for G you're going to see geometry nodes so geometry nodes is just an example of a modifier what makes it special is that it is a modifier that you can program or you can kind of create and say this is what I want it to be with the thing called nodes we don't know what that is yet but point is geometry nodes is a modifier one way to get into geometry nodes is to select the object you want geometry notes to have like the cube go to Geometry notes and then click new and it will make a new geonodes group when you go to the geometry nodes tab at the top by the way if you don't have that you can click plus you can go to General and you can add geometry nodes right there but you can see when we added this modifier it created two nodes a input and an output if I rename this to Lesson Zero you're going to see it's going to rename our node Network in other words everything inside of here is a bunch of nodes it's a node Network it's going to rename it to Lesson Zero if I rename it here to less than zero you can see it renames the modifier so again everything inside of here is the modifier if I was to do something super simple like say transform don't worry about what any of this means yet and scale by two in other words make it bigger you can see this modifier less than zero what it does is it makes things two times bigger so if I was to take this monkey add in Geometry nodes and instead of making a new one I say use this pre-existing modifier setup you can see it's going to make that also two times bigger so what I've just done is I've created a modifier that makes things two times bigger but all I want you to know is that geometry nodes is a modifier you can either access it by you know adding Geo nodes and adding in the modifier or we could do it a bit more directly if we have an object and we're already in the geonodes tab you can click new and then it's going to do the same thing but kind of conversely so it adds our node Network and then it adds in our modifier again let me just call it again these two things are linked they are the same thing and you're going to see a whole bunch of other stuff like the uh I don't know what it's called really the info sheet it's called the blah blah it's called the spreadsheet you're going to see a whole bunch of other stuff so you have your node system that we can create our node editor you have our spreadsheet you have the 3D viewport but again don't worry about that the only the other thing I want you to do for this tutorial because I'm going to be using this a lot is if you haven't done this already go to edit goes go to preferences and then the add-ons type in node Wrangler it comes with blender it doesn't necessarily come in enabled with blender so if this is not checked off check it off What it lets you do is do all these fancy commands that I'm doing where you can see I'm making these lines so I can cut a node connect the node do this do that normally to do everything I just did you need to like add in a reroute which is this dot that you can connect here and here but with a node Wrangler there's a bunch of shortcuts so what you learned in this lesson uh let's uh take it back a second what you learned in this lesson is that a geometry nodes is a modifier it's a modifier that we can apply to any object and we can make it do anything that's the complicated part telling geometry nodes this is what I want my modifier to do but we know we can make a modifier it's accessible by adding a geometry nodes modifier or you can go to the geometry nodes workspace and add it that way so that is Lesson Zero follow me on lesson one where we are going to make a very simple modifier hello everybody and welcome back to intro to Geometry nodes which is my Series where I'm going to teach you how to use geometry notes from knowing nothing building up to knowing everything so from beginner to Advanced if you have not seen part 0 I'd recommend watching it where I explain what geometry notes is in this part we are going to be making a very simple geometry nodes modifier because again what is geometry nodes it's just a very fancy modifier we're going to be doing a simple one what it's going to do is any object we apply our geonodes modifier to no matter how complex no matter where it's positioned it's going to turn it into a sphere that's what the modifier is going to do there's a lot of things modifiers can do they can make things move they can bevel things you know I'm just going to make it into a sphere so assuming that you guys are ready to go I'm down to start as well so again how do we add geometry nodes to an object well we can either go to Geo nodes here click new that's going to apply the modifier or again in any of these workspaces you can go to add modifier geometry nodes and click new so I'm going to call this two sphere which again is going to edit it here so everything we've done so far as we said apply modifier it's called to sphere and here are the instructions for it now you see these two nodes and the question is what do these nodes do so far and what can we put in between right so first of all we have the group input this is saying this is the information we get to begin with in this case we're starting off with the cube that's in the group input if I was to make this a monkey and apply the same geonodes group so I'm going to gonna add geonodes I'm going to make it to Sphere for both of these cases we have the same Geo nodes preset in a sense but the group input is referring to different things in this case it's referring to the cube when we apply to this one it's referring to the monkey so we have the input the thing it's being applied to and that is being sent to the output what's being shown so really this is a pretty boring Network we're saying take what we give it and output it but if I'm to sever this connection you can see that it's going to get rid of both by the way to server a connection you can just kind of go like that with the mouse we'll talk about shortcuts like this later but the point is if I sever this connection um now you're saying you're seeing that we get nothing because nothing's connected to the group outputs If instead I'm going to use shift a in the same way that you shift a in the 3D viewport to add objects right so you can add a cube I'm going to add I'm going to click shift a and I'm going to type in Cube I can use this as a input notice that this has a green socket and so does this this means that we have a mesh information I'm going to send this to the group output and now you can see both of these are cubes even though even though originally if I disable the modifier this was a monkey because we're not even looking at the group input if I was to swap it out like this we're taking what was there originally and saying send that to what is being viewed or being outputted if I swap it like this we get this now it doesn't have to be a cube of course in the mesh Primitives this is where so I just typed in Cube because I didn't want to figure out what menu it was in but this thing's called the Primitive it's one of the meshes that kind of already exists so we go to mesh Primitives you can use a cone a cube blah blah blah blah I'm going to use a UV sphere don't worry about UV basically what it means is sphere connect that here and now we have two spheres not only that but we can control some of the obvious parameters like increasing the radius uh you know increasing or decreasing the resolution of it Etc one thing I want to note though is that both of these are using the exact same geonodes group right so if I do this it's going to affect both of them no matter what the initial mesh was if I wanted these to both have geonodes but to have different groups what I could have done is I could have said uh for this one I use a different geonodes group this one's now sending input to output and I could do something like oh again we don't know what I'm about to do I haven't explained it yet right but let's say we rotate it so we have one Geo node group that rotates it or I could say use the two sphere command either way we're having um Suzanne the monkey as inputs it's just that in the two sphere we're not using it similarly for this one we can have the rotate group or the two sphere group but what I wanted to show you in this tutorial and let me just kind of reset is how do you take any object and turn it into a sphere which we've kind of already said so let's have a bunch of objects let's have some of them be a bit more complicated like a donut to make something into a sphere we add a geonodes group we say screw the input right we can even delete it X to delete and we can say take this and turn it into a sphere so can you connect that now we have a sphere if I wanted this one to be a sphere we can either use the same group which I should really name to sphere or what I can do is I can click this two button this says that there's two objects with this node group applied so these two if I click this they're not going to be independent from each other so you can see this has two sphere applied and this has two sphere zero zero one which is to say two sphere two applied and I can make this radius bigger now without it affecting the first because these are different groups notice this has a radius 2.4 and this has a radius one for this Cube do I want it to be a small sphere or a big sphere well for a small sphere it's going to be two Sphere for a big sphere it's going to be two sphere two the the core idea here is I want you to think about it about this as we have a group input which is what we initially have as geometry if we say ignore this and instead just put in a sphere that's what we're going to get so I don't want you to feel attached to this idea of we have a cube and we're going to modify it and turn it into sphere no get rid of the cube and put it directly in the output so as a final kind of thing main thing I want you to know is we have a group input this is what we start with and I want to send that to a group output let me actually just reset here so we have a nice clean scene we have a group input this is um everything we're loading in group output is what we are showing and then things in between are ways we can modify it so you know I could add a transform say take the input move it up and put it as the output or we could say have a completely different input to begin with so we made a super simple modifier that turns things into spheres let me get back over here so I know it feels like we're moving pretty slowly here right like in part zero I just showed you what is geometry nodes like it's a modifier how do we open it and now in part one or part two really but part one I showed you oh we can turn things into this first I know we're moving slowly but these ideas uh build on each other and soon we are going to kind of like the end of level one I'm thinking is we're going to be turning a cube into a snowman right so that's going to involve adding spheres stacking them moving objects cones for the nose everything okay um but yeah we start slowly that that's just how it goes in the next part part two I'm going to show you how I do all those fancy commands where I like connect nodes and sever nodes and all this uh just so that you don't need to ask in the future and then we're going to move on to moving objects so hopefully you enjoyed and I'll see you on the next one hello everybody and welcome to introduction to Geometry nodes which is my Series where I'm going to teach you how to use geometry nodes from knowing nothing the very beginning all the way to getting to an advanced kind of knowledge of it and I'm going to show you every step along the way to get there so uh so far you've seen part zero where I showed you what geometry nodes is it's a modifier and then in part one I showed you how to make your very first and simple geonodes modifier that turns anything into a sphere and we got a bit more complicated saying we can apply different geonode groups to different objects and all this but in this part I want to slow down a little I know we haven't been going that fast I want to slow it down a little and show you how I do some of the fancy keyboard shortcuts that you are going to be seeing seeing a lot in this tutorial series because it's going to speed up your workflow and then from this point on we're going to start building more and more complicated modifiers so I'm going to enable blender over here make my window a bit smaller and show you how to do the do so this is basically the scene that we ended with last time it's a geonode group that takes the input which would have been here I just deleted it and said make it into a sphere again if you remember we have our group input in this case add a cube and I said get rid of this just show a sphere a sphere but notice as I'm doing this I'm either disconnecting and connecting manually or what's much faster is I can sever a connection and make a connection and sever it and I'm using these shortcuts okay you can even get fancy and add a reroute node which lets me very quickly swap between these so this is why I want to show you this you can even get fancy and there's some commands that lets you join certain uh um meshes so here we have a sphere that I'm going to move to the side and I join it with my Cube this is a quick command so I could either say this one this one or both of them I want to show you some of these commands so uh first thing first and I showed you how to do this in part zero make sure you have node Wrangler enabled so go to edit preferences go to add-ons type in node Wrangler if this is not enabled enable it what this is going to do is it's going to let us do the shortcuts so here's everything you need to know to sever a connection you hold Ctrl and then you right click drag so Control Plus right click drag to make a connection on the other hand you alt plus right click drag so the only difference here is one time I'm using control and right click dragging to sever and you could by the way if you have multiple connections you can control right click drag over a bunch of connections instead of them so control right click drag to sever connection and ALT right click drag to make a connection notice that I'm hovering over the first node when I'm alt right click dragging and going to the second node that gets highlighted highlighted and that's how it knows to make a connection so in this sense we can either have a cube that's the original group input practice severing that using a sphere or practice severing that using the transformed sphere that's off to the side practice severing that so again alt right click to join control right click to sever another one that's pretty useful it's not very clear why yet but let's say we wanted to swap between this one and this one notice each time I have to cut it's taking a while I can't just do an ALT right click drag here you can see it doesn't allow it because it only has one green socket available and it's already taken so I have to free it up and then you know do this one thing you can do is you can add a reroute node which you can actually type out right here it's just a DOT that we can connect as an intermediary but the nice thing about this is if you shift right click drag so again we have alt control and now shift right click drag is going to make a reroute node the nice thing about this is it lets you hot swap between them okay you could add a reroute here and reroutes don't really do anything to your network they just kind of clean it up so I could say oh my connection goes all the way here but it's the same thing really shift right click drag does that finally finally to join things as in have two meshes at the same time you can either add a join geometry node which is a node what it does is it takes a bunch of inputs like our Cube and let's actually preview this our Cube our moved sphere and you can actually just keep adding things to this you're not going to see this other sphere because it's centered and it's kind of canceled by the sphere so if I move this up you can now see we have three things over here we have our original sphere or sorry our original input which is a cube we have our sphere that we moved up so we're transforming it up on the z-axis we're joining it and then we're doing the same thing for another sphere so join did I say how to do it uh to join you hold Ctrl and shift and then you right click drag so it's not control it's not shift it's not alt it's Control Plus shift and then alt right click drag for this okay so basic review you have a connection Discover It control right click drag to form it alt right click drag to add a reroute shift right click drag and then and then to join Control Plus shift right click drag so it's basically Control Alt or shift or some combination plus right click drag and that is going to speed up your workflow a lot in the future maybe I'll mention it a couple times but when I'm like doing stuff like this and I'm severing and I'm hot swapping and all this and there by the way there are like fancy commands that I forget exactly how to do like you could do this blue highlighted one don't worry I'm not going to use it so I'm not going to talk about it when I use these fancy commands I'm going to talk about them a little but that's just going to be background knowledge at this point okay so let's um close out over here so what did we learn in this uh tutorial part two I showed you how to do the node Wrangler that's an add-on fast keyboard shortcuts um and we reviewed that a very very plentifully but it's going to be important so coming up in part three we are going to be talking about now that we know kind of I introduced the join geometry node uh what we're going to talk about is how to move and join objects and then I think in the next part after that we're going to Build a Snowman and that's going to be the end of level one so thank you for watching and I will see you on the next part hey there everybody and welcome to introduction to Geometry nodes which is my Series where I'm going to show you how to learn geometry notes from knowing nothing the very beginning all the way all the way to getting to an advanced section where you know everything that I know so uh assuming that you've seen part 0 1 and 2 at this point you know what geometry nodes is it's a modifier you know how to do the node Wrangler commands and you know some simple stuff like how to make a very basic geometry nodes modifier that turns anything to a sphere or you can join objects we talked about that too in this part we're actually going to be moving objects and that is the key elements to doing the project that I want to do in this video which is taking an object whether it be a cube Suzanne or whatever and making a geometry nodes modifier that turns it into a snowman which is a complicated shape but and you know there you have it so uh let's open up blender and this is going to be a bit of a longer one and it's going to be a bit more complicated I would imagine than the other tutorials so what is our goal again it is to make a Geo nodes modifier that no matter what object we have any orientation any shape we add the geonodes group and it is going to make a snowman out of that so starting off with our Cube we're going to go to Geometry nodes we're either going to go to add modifier geometry nodes click new or again what you can do is just go new here directly and we're going to call this the Snowman modifier now let's think about what a snowman is a snowman is basically not a cube so I'm going to control right click drag to sever we don't need this group input I'm going to add a bunch of Primitives and stuff here to make the Snowman so it's basically a sphere then on top of it it's a smaller sphere so notice we're going to need to make a sphere and move it upwards and make it smaller that's going to be the transform we're going to make another small one it's going to be kind of like a cylinder shape with another cylinder maybe some cylindrical arms or thin cubes and a cone this is a nightmare image a cone for the nose and you could get more complicated with the buttons and everything but that's what I'm going to show you so starting off with the sphere we again know how to make a sphere out of any object we talked about literally how to make that modifier so again anytime you don't know how to look something up shift a right here you can type in sphere but we know that it's a primitive and we're going to be using a lot of Primitives in this tutorial so in mesh Primitives we have UV sphere so here we have a UV sphere I want it to be way bigger so I'm going to take the radius or the size and bump it up to two next I want another UV sphere but this one should be moved up and be made smaller and this is where we need to talk about transform so one of the nodes that you need to know and if I know what category it's in is the transform node so you can just type that in I would imagine it's in like mesh operations or something like this but so you could go to mesh and you could look for transform I don't even know where it is to be honest but transform what it does is it takes an input and we can change these purple inputs if purple is not mesh but it's a vector it's number information three-dimensional we can change its translation so X Y and Z it's rotation which you can't really tell that obviously because it's a sphere but you can see it's rotating and most importantly it's X Y and Z scale which we can change uniformly okay point is we have a sphere and I'm going to join so remember we have that control shift uh right click drag for join or you can just add a join a geometry node we have the original sphere connected with its transformed version I'm going to move this one up by two units and I'm going to make this maybe 75 of the size so 0.75 and you can kind of do this so what we learned right now is that we can use a transform node to kind of do the location rotation scale thing it's the very basic uh operation right uh that you learn with the editing or 3D modeling um we have translation rotation scale you can modify that for the sphere so by the way if you hit M it's going to mute a node so I'm actually just going to view this right here oh by the way that's one shortcut I didn't show to view something it's alt shift click you're going to pick this up over time but uh either way you can see here we have a sphere and then we fed it through a transform node and then it not only moves up but it gets smaller so that's what the transform node does but then I took this version and this version and I joined them together so both are showing and it's not like I connected them they're actually intersecting right I just said join them put one over the other okay to make the next thing think about how to do it well we can add a transform and you can either transform the transformation or you could transform the original sphere there's a bit of a difference um I'll let you think about that we take this and we join it remember we can have multiple inputs for a join I'm going to move it further up maybe four units and I'm going to make it 0.5 size so originally we had a scale of one of two we made it 75 percent the size and then 50 percent the size by the way I just want to mention this would have not been any different by adding another geometry node join geometry and adding it this way I think it's just much cleaner to say we're adding all the Spheres in one join geometry okay so there we go in fact one way to organize this is in the same way that we had these reroute nodes that we talked about that lets us like you know organize the connections there's also in layout you're going to see reroute but also something called frame what frame does is if you take a bunch of nodes and so I'm just selecting all these nodes and you put it inside the frame it's just going to organize this a little and you can select the frame and move the block I think another way you can do this is I think you can uh select all of these and type in frame all no that's a different kind of frame well there might I think there's a command it's like control shift p control P alt P shift p it's shift p um that's going to put it in a frame um so there we have all our spheres next what I want to do is I want to add in the cone right here luckily there is a geometry node mesh primitive for this so we don't need to make a cone from scratch even though we could uh again shift a to go to mesh Primitives and then we want the cone so we select cone notice if we view the cone unlike the sphere where we could only control the size and the resolution in the cone we have the number of vertices and you can play around with these to see what they mean we have vertices we have side segments that I'm going into wireframe to show you where those are we have fill segments on the bottom we have the top radius so it's actually a cylinder that we've Shrunk the top down on the bottom radius and the height okay in other words we have everything we want to control the cone I'm going to take this and our join geometry and I'm going to join both of these so in other words all our spheres take those and join with the cone and you can see our cone is resting where it was to modify it I'm going to first of all make it thinner so we have something like this making it less tall and again this is where our transform geometry node comes in so I want to move this up I want to have it rotating this way so that is going to be on the x-axis I believe nope why oh wait this is translation on the x-axis so that's by 90 degrees a quarter of a rotation so notice I'm doing a translation and a rotation in one group that's totally doable so I'm positioning this here and then moving it along the y-axis right here and this gives us our cone again because this is all procedural and we haven't really talked about what that means but because this is all made with nodes is another word for procedural we can always go back before the transform and say oh I want it to be taller or not taller right we can always go back a note as long as we have all our connections here so I'm just going to make this a bit thinner and a bit shorter okay next and by the way there are ways to make this a lot faster like right now I think I'm going to make the eyes so we're going to add a sphere here and a sphere here what would be faster is adding in one sphere and saying mirror that over to the other side but we're not there yet so we'll get there let's add in our eyes so by the way all of this shift p to frame it this is our um cone next I want to add in our eyes so I'm going to do a UV sphere I'm going to join these I'm going to look through our perspective here's our other sphere I want to transform this first of all make it way smaller and move it up whoops and move it up to where the eyes should be so I'm just going to move it a little on the x-axis and then moving move it forward on the negative y so something like this but because the eyes are perfect spheres it's going to look a bit weird we can do some flattening on only one Axis or the other so I'm only um flattening on one axis and I want it to be a bit thinner like this to make it sit on the face I'm just again doing all these uh transforms I'm going to like flatten it so it has a bit of rotation and then I'm going to move it back a little and that looks a bit more like a eye we could also rotate it this way to fit the thing and luckily you're like oh do we have to do this all again for the other eye and make it look symmetric and figure out the exact numbers yes but we we can actually duplicate shift d the transform node use the same sphere so we're using the same input and then for the sphere I'm going to add it to the join all I have to do is kind of the opposite so if it's X is a negative 0.45 I make that positive 0.45 now it's this way the rotation negative 14.8 make that 14.8 I'm just kind of reversing some of these numbers 29.1 maybe I do want this one to remain negative just play around some of them should be flipped some of them should not but you can see we very quickly mirrored this not with a mirror modifier but we could have so we have all this for the arms we could either do a cylinder or we could do a very thin Cube and I'm thinking to get a nice variety let's make a thin Cube so again all this shift p these are the and by the way I do believe we can name these if you go into the frame Hit N and then for the label we could type in body this one is the eyes and this one is the I guess it's the nose uh we have an organized thing and by the way just remember this is all geometry notes if you didn't remember but what what I really want you to remember is all this started as a cube so really all I'm doing here is I'm applying a modifier that turns this into a snowman notice if I was to put a cube over here and said use geometry nodes with the Snowman that's just going to make a snowman with the transform of where I move the cube or what I could have done is rotated our Cube applied Snowman and now we get a rotated snowman so it's just going to kind of use it as an instance in a sense um which we don't know what instances are whatever let's make arms so I'm just going to move all of these here for the arm I'm going to use a cube and we're going to turn this into a very thin Cube so again we join so here you can see our Cube this actually has our X Y and Z scaling in a sense uh right here so I'm going to make the X very long v y and z both like 0.2 okay and then I'm just going to transform it by saying you could either do this actually that's kind of a fancy solution to get both arms as you can see or what we could do is I'm going to make this half the size so you could literally type divide by two and it's going to make it half the size you can do a transform you could do a rotating on the y-axis and I know it's y because that's the one facing us and that's the center of our axis of rotation I want so I'm just putting an arm here again I duplicate this with the cube and join it and say all I want to do is I want to do a bit of a reversal here so instead of 26.9 I make it negative and instead of negative 2.54 I make it positive there we go and notice that both of these are dependent on the same Cube so if I'm to make it like this I can change the uh the thickness the length of the arms or I can make them like big wings that go either direction and by the way this is going to be a bit more advanced but I want you to notice that both of these are kind of dependent on each other in a sense so one is like 26.9 call it 27 degrees and again I don't expect you to know what I'm doing right here but just a bit of a taste I'm using this as the Y component of the rotation so nothing has well not nothing has changed apparently this uses radians so something like this and then I could do the same thing over here on the y-axis so here's some nodes of a bit of what's in the future a bit of a note of what nodes are in the future you're going to notice that now with the single parameter I can update the rotation of both and it kind of looks like flapping wings just so you know it does get way more complicated than just adding in things in the right spot um okay so I'm just waiting there we go so we've done this um what else does the Snowman have I guess it has the hat is distinctive so again shift p to frame this called the frame arms and finally it seems like every single primitive we've wanted we do have here so mesh primitive yes we do have a cylinder so I'm going to join these either here or on another join geometry node so basically we have a chain of what we're joining we have the cylinder that I want to move so I'm using a transform moving it up and again just like all these other nodes with the cylinder you can control the number of vertices which is kind of like the resolution of it let me put this in solid view the number of vertices side segments fill segments what I care about is the radius and the depth okay so let me actually add more geometry here I'm going to move this down and this is roughly the radius I want and roughly the height or the depth I want I'm going to take this I'm going to do another transform join this and the only difference is this one I want to be bigger on the X and Y axis and thinner on the Z which is the same as decreasing the depth for another cylinder and I'm just going to move this down and there is our snowman so again any this is not at no point in this do you see group input so it's not dependent on what shape we originally have so again we with Suzanne we can apply the Snowman it's going to be right there this is just a very fancy make anything a sphere modifier that we made before but now with a lot more nodes actually let's shift p this and this is going to be our hat so the difference is now we've joined and transformed a bunch of Primitives so just going back here just looking at our progress we have a sphere we moved it up we moved it up and joined them that's one section we had a cone and we transformed it and joined this together for the eyes we had a sphere that we kind of positioned one positioned the other and Joint for the arms we had a thin Cube that we positioned positioned and joined and then for that we had a cylinder that we positioned rescaled and joined there you go um so that is I feel like that's like a good amount of progression for a single video um and I'm gonna need to figure out what the next logical step is uh for the next tutorial because there's a lot of ways we can take this because now we know how to join transform whatever I'm thinking maybe the next obvious step is to go into edit mode because really what we're doing is removing stuff in object mode we're taking an object we're moving it uh translation rotation scale uh but we haven't like literally moved around vertices and stuff like this so maybe that's what we will do next but uh just to review I feel like this has been a long one uh what we have done in this tutorial is learned about transform and kind of taken that to the max by doing a lot of join a lot of transform a lot of mesh Primitives and now we can make anything into a snowman now maybe a step to take this a bit further is maybe I want to control the size of the Snowman procedurally by just changing a number later instead of going into the nodes uh we'll talk about that but for now uh that is what we have and I will see you on the next video hey there everybody and welcome back to introduction to Geometry notes the only series that takes you from beginner knowing nothing about geometry nodes all the way to the very end where you are Advanced and can make anything that your mind can't create so so far assuming you've seen the first four some parts we've done everything in Geometry nodes about explaining what it is about how to connect nodes with some basic node groups and at the very end we made a snowman that was our final project what I want to do for the next six some tutorials is get this snowman animated which seems easy but there's actually a bit more going on under the surface so to build up to that where we can animate our snowman what I want to do today is talk about set position node which is a very specific node but it has a lot of features so again geometry nodes make it a geonodes group and it makes the modifier you already know all this now sub position node you can literally just type this in right here set position node it's basically a more complicated transform node that lets us basically go into edit mode of this object so I can offset it do this translation stuff in this sense it doesn't look that much different from a transform node right I can move it do all this uh the difference is this transform node moves the entire object whereas set position and we're going to be using this for pretty much every project in the future a set position can move stuff but only for a certain selection okay what do I mean by that well a box like this one and this is where we're actually going to get into the scary spreadsheet editor I know we've been avoiding it for now a box is made up out of vertices we have one two three four and then four on the bottom we have eight vertices which you can actually see listed over here if we go to the vertex information you can see starting at index zero we have zero one two three four five six up till seven vertices each one has a position and of course it's going to be either positive or negative one because this has a radius of a radius of a point of one going in each Direction okay point being there's a bunch of vertices and I can say take the selection show me the index now we're doing a bunch of new nodes so I expect you to kind of be like whoa too much going on you'll get used to it so I'm saying I want to move this position uh based on if the index is and actually what we could do here is we could type this in automatically we can say if the index is equal to some number and notice that now we have green sockets this indicates we're dealing with integers so again green or turquoise indicates that we're dealing with meshes uh this kind of pinkish means we're dealing with buoyance either true or false the selection is either there or it's not and then this green is dealing with integers so either way I'm looking at where the index is equal to zero that's going to be this first vertex with the location one one one one so I expect it to be this one right here and we're saying for that selection uh move the thing so again notice this is different from the transform node because we're actually editing uh one at a time right or I could say go to the second index index number one now we're dealing with this if I wanted to move a couple of these I could say look at where the index is greater than well greater than 3 which would mean we're dealing with four five six and seven which means we're dealing with half the back half the mesh and you can see uh why this is so useful it's basically a procedural way to access edit mode but it's not just about you know setting uh offsets for certain selections you could get much more complicated in fact you're going to notice that there's a position right here and we can hard code a position so instead of saying offset so right now it's moving all the vertices by plus or minus something on the x-axis instead of offsetting them I can hardwire what the position should be so for example if I wanted to turn this Cube so that it's all going down a line what I could say is take the position we're going to use the combine x y z you've seen this node once before where I've kind of hinted at it what this does is it lets us make a vector x y z and deal with the individual components and what I want to do is I want to take the index so I'm saying look at each vertex and by the way it updates right here you can see all the vertices are at position zero because that's where I've set the position to so we can literally edit this live and you can see it going in the spreadsheet I'm going to take the index and connect this to the x-axis what this is going to do is it's going to be not very visible you can kind of see it you can kind of see this line we've taken the cube and said take each index and move it to um the X position of the index right so index 0 is going to be mapped to x equals zero and then Y and Z equals zero index one here two here Etc we can actually be a bit Fancy with this so I'm going to mix and there's a bunch of ways to mix it turns out but I'm just going to mix like this I'm going to mix two vectors since this is what we're dealing with we're going to use the vector and the original position so I know I'm throwing in a lot of nodes but this is just conceptual stuff right now uh you can see once we connect this to the position when this is set to our position output so the bottom socket it's a cube so we're hardwiring the original position back into itself and then when I move this you can see it's forming into the line right so the idea of set position is you can move each individual vertex independently with its own Vector with its own selection in other words it can turn anything into anything else we could even get more complicated here and I know what you're thinking more complicated yes instead of offsetting by like a certain vector you know like this this this we can offset by something called the field meaning it's different everywhere um one way to do that is we could actually create a field out of the index field so we're going to say uh take every index and I'm going to do some uh let's do some combine x y z so this is kind of what we did before I'm going to offset the index or sorry I'm going to offset the position by the index on the x-axis so what do we expect this to do it's probably going to shift things on the x-axis you see it's doing this skew basically what's happening is it's going to look at the index number and it's going to say that's how much I'm going to move it on the x-axis notice that this vertex right here does not move right and that's because it's of index zero so I'm just doing a bunch of stuff to get you familiar with messing around with um the set position node we could even get a bit trickier and for the offset we can use something like a noise texture that you might be familiar with in the Shader editor and what A noise texture does is it's going to offset by a random value between 0 and 1 for each X Y and Z component on this Cube if I set this to a four-dimensional noise we can wiggle this and it's going to animate over time in fact and notice we're taking our group input and then feeding it into this so if I add more geometry to my group input so I'm just subdividing at least trying to subdivide you're going to notice that we get a much more dense messy mesh because now we have more vertices you can see there's actually way more points on the spreadsheet we have more vertices to move around and you can mess around with the noise settings to get different kinds of results so uh as kind of a final project here just to see if we understand this I'm going to remove the group input let's try to make a capsule which kind of looks like a sphere it's this kind of elliptical egg shaped thing so let's try to make an egg is what I'm trying to say so the traditional approach would be we start with the UV sphere again we got rid of the group input so this modifier at this point just creates a sphere we literally made this before the traditional way to make an egg is you do this you transform it and you scale it on the z-axis but notice that we have a bit of curvature going this way I don't want that I want it to literally be straight line hemisphere straight line hemisphere which means that we can't do any stretching using the transform in other words I want to take a sphere and kind of elongate it without turning it into this like curvy mess okay the way to do that is we set position so every time we set position we're moving individual vertices and what I want to say is look at the top vertices the top hemisphere and move that upwards well that's two instructions one let's move upwards which is offset on the Z right but it moves everything so I want to say only do this for a certain selection and how do we make that selection well first let's describe it uh you could use the index um saying we have index 0 1 2 3 but it'd kind of be hard to tell what I actually want to do is I want to say look at the hemisphere on the top in other words look at the positions of each point here of each vertex tell me which ones have a z value that's greater than or equal to zero so in other words the top half and for that and that only for that selection move it up so in other words we're going to look at the position so that you kind of make this a formulation and that that seems intuitive and then you type it in with nodes so we're looking for where the position which components I can separate in the same way that we could combine so I'm taking my vector and separating it into its X Y and Z components I'm going to say where's the Z greater than greater than zero and if that's the case make that the selection so in other words we have the top half selected and one way to see that by the way is um this is a bit beyond what we're doing so far but just so you know we could take our mesh we could separate geometry by the selection and this will give us the top and the bottom hemisphere notice by the way that it's not a perfect cut in half because we're seeing where it's greater than zero which doesn't include this line so technically we want to say where it's greater than like negative 0.01 so now we have a top hemisphere in the rest um either way we've made our selection and for that selection where it's greater than negative point zero one in other words the top Hemisphere move it upwards and you can see it's making a similar kind of shape but this time the profile the profile is kind of straight here so this is how you make a capsule we could we could have also moved it to the side or we could have done like rotation on it um whatever but we've taken a sphere said this is our selection and we're offsetting it like this now uh one question you might ask is why am I like doing so much about the set position node basically our goal is going to be to animate a snowman but beyond that we're going to make a snowman out of this single Cube so remember how before when we made the Snowman we had a UV sphere and then we stacked another EV swing we're not going to do that anymore so what we're going to be doing is we're going to be like taking a cube so I'm just going to do a demo I'm going to take a cube and add more geometry to it so it's kind of dense and we're going to make every piece of it the cone the sphere the cylinders for the hat everything um out of the cube so for example if I take a set position node which again lets me modify the position so for the position I'm going to hardwire so right now it's doing nothing we're putting position and position I'm going to hardwire a special position where we can take this and normalize it we'll talk about what that means we can see we've now taken a cube and turned it into sphere well again we're going to talk about why this works in the next video another thing we could have done and this is a bit harder is we could have turned this into a cylinder a cylinder is basically kind of turning this into a sphere but keeping its Z component so I kind of want to cast it to the nearest thing so what I can do is I can multiply this by 1 1 so we're only looking at the X and Y we take it we normalize that so you can see it's now projecting on a circle and then we take and I know we're getting a bit uh out of the weeds here or growing weeds I don't know what we're doing either way we take this I'm going to take I'm going to steal the X Y components from this and combine them with the Z component from before and you can see and now we have a cylinder and if I was to pinch the top we'd have a cone yada yada point being if I want to make a snowman out of a single Cube which isn't very practical but it is a good exercise we're going to need this at position node and beyond that set position is useful for so much so what have we learned in this tutorial let's take it back for a second so in this tutorial what we've done is I've introduced the set position node it's basically the edit mode inside of geometry nodes instead of the object mode that is transformed we talked about how we can use edit mode with certain selections and we talked about what is the index of a Vertex how can I find it on the spreadsheet and we made selections based on a certain index or on a certain position like whereas position greater than zero we've also talked about the difference between offset and the hardwired position and we did a bunch of fancy functions where we can offset by a function relative to the index and all this we did a lot so I would recommend re-watching this video if it got confusing um the more you re-watch it the more it will make sense either way uh in the next part we are going to be making our Primitives our sphere our Cube which has already made our cone and our cylinder and I think that's it out of a single Cube so I will see you on the next one hey there everybody and welcome to part five of introduction to Geometry nodes the only series that's going to take you from beginning knowing nothing about geometry nodes all the way and I love doing this chopping motion to the very end where you are Advanced and can make anything your mind uh wants to create in the last part what we did is we actually introduced set position node which is what we're going to be using for this tutorial so watch it if you haven't already we're going to be using set position o to turn a cube into every other shape into a sphere into a cylinder into a cone why because again I want to make the Snowman again but this time out of only a cube so everything comes from a cube instead of adding in our sphere Primitives and all this everything's going to come from a cube and the way we do this by converting a cube into all the other shapes is with the set position node so let's get into it geometry nodes take our Cube add a Geo nodes modifier so basically our goal here is to take our Cube and I want to also make out of this a sphere I want to make a cylinder and I want to make a cone some other shapes like a Taurus are actually notoriously difficult to do with this method so we're not going to be making that so starting off with our Cube let's try making a sphere the first thing you're going to notice is if we go into the wireframe view is this does not have very much geometry so if I want to kind of spherize this and move points and all this we need more geometry to work with you can either take this group input and say Hey what if we input something with more geometry and this is what gets sent into geometry notes that's one solution but it's not very procedural instead what if I was to subdivide it or kind of loop cut it the way I have what if I was to subdivide it inside of geometry nodes well to do that I take the group input I say I want to subdivide so again everything you think of you just type it in we are going to subdivide this mesh and you can see we can now control the levels of subdivision Okay so we've taken our group input which is the cube and then subdivided it okay and now what I want to do is I want to take this and turn it into a sphere and you might be thinking how in the are we going to do that well one clue is we already said we're going to use the set position node we are going to move around individual vertices so they're kind of on the surface of the sphere and then the question is what is the function what is the equation that we need to use to get this to be a sphere well if you think about it as I draw the worst sphere of all time a sphere is basically the set of points that are equidistant from the center again think about that a sphere is all the points that are the same distance from the middle that's why it's a sphere it has a constant radius right the cube does not have this because at one point it's going to have this very long diagonal radius that is longer than this vertical radius right so we'd want to keep this one that's basically touching the sphere but we'd want to elongate this one and for this one we'd have to elongate it a little less but you know all that in other words words what I want to do is I want to take each um each point or you can think of it as each Vector because again each point is right here and it has a position Vector I want to cast it I want to move it to be equidistant from the center well to do that let's take our position and we want to hardwire it so again the position is going into the position nothing's changing here I want to put in something in between here that says take this and you know make it the correct length and I'll show you two ways to do that whenever we're doing manipulations on vectors we use Vector math and every time we do manipulation on numbers like if I had a number instead of a vector like here's a number we just use a math node but we'll get into that um here we have a vector math node and the very simple way and it kind of seems like a cheat is you just enable normalize and you can see it turns it into a sphere in fact if I was to show you the animation here so this is just for viewing um and we want this to be a vector so we have this we have this you can actually see our Cube transforming into a sphere so it's taking all the vectors that are too long or too short and they're normalizing them what does normalize mean normalize means take all the magnitudes of the vectors how big they are and make them a magnitude of one so if a vector is like a radius of two it's going to bring it down until it's a radius of one if it's 0.5 it's going to extend it until it's a radius of one so normalize is basically the make it into a sphere function but let's do this a bit more manually okay so what what is it that we're describing here we want to get the distance of the vector how long it is and say is it too short or is it too long so we can take our position we can actually calculate the distance or actually the length would be kind of more accurate you could do distance from the center it's the same but we're going to calculate the length of the vector and what I want to do is I want to take our position vector and I want to scale so I'm saying how big should this vector be well it's going to be dependent on the length now if we plug this in directly what do you expect to happen is going to do this kind of inverted hyperbolic Cube which is a cool in its own right right but it's not correct and let's think about why that is basically if a vector is too short it's now scaling it by that length and making it even shorter whereas if a vector is too long it's making it even longer because we're scaling by it so what I want to do is I want to do the reciprocal if it's too long make it short if it's too short make it long in other words now we're dealing with numbers you can see we have the square input I'm going to take the reciprocal one divided by this so we flip it and now we get a sphere that's the way to do it manually or again you can use the normalize function point being and we will be using the normalize function because it's oh by the way look at that this is how you can make some very interesting shapes it turns out like a little flower petal and this is why I set position so powerful we can literally manipulate geometry but we're going to use normalize for this we're not going to be too fancy and that is kind of the first and in a sense the most complicated object to make well no it's definitely the cone but it's uh not intuitive if you haven't done Vector math before so again we've taken our Cube we've added geometry to this and then cast it into a sphere by the way if I had less geometry it would equal a less dense sphere so you can kind of choose your subdivision levels okay next what I want to make is a cylinder so I'm going to take all this I'm going to shift p that's going to make it that a frame and that's going to be over there I want to use the same cube with more geometry and set this through a set position node which again isn't going to do anything to it so we have a subdivided Cube we need to give this instructions to turn into a cylinder now in the same way that we did this kind of normalizing or casting to make it into a sphere a cylinder is almost the same if we look at the top a cylinder should look like a circle right but the circle goes up and down vertically so the only difference is whereas a sphere is the same distance from the center everywhere a cylinder is the same distance from the center only when we look at the top view so it should look like a circle or like the cutout of a sphere same radius from the center except when we look at it from above it should just be going up and down like we sweep a circle okay this means we can use similar ideas from before so I'm going to hardwire the position and let's think about what we want to do here what I want to do is I want to look at the X and the Y component in other words in other words the only ones we can see from a bird's eye view and I want to say calculate the distance of those and then normalize them and all that same as before so to do this I'm going to again use Vector math anytime we're dealing with a vector and we want to manipulate it we use Vector math I'm going to say multiply in other words uh you know it's it's the same as what you'd expect for scaling so if I was to scale this on the X it would multiply that Vector we're scaling either on the X Y or Z it's pretty intuitive but what I want to say is ignore the z-axis so if I make a z zero what's going to happen it's going to flatten this into a thing because it's taking our X and Y components multiplying them by 1 in other words do nothing but it's taking our Z and saying multiply by zero in other words flatten it down it's as if this was set to 1 and then we scaled it until a zero but for our purposes we're saying projected to the X Y plane we're just looking at X and Y we now want to take this Vector that is not dependent on Z and just like the sphere we want to normalize it because it makes it makes circular cross sections right it's going to make the radius the same everywhere again what could we have done we could have done that like we don't have it anymore but we could have done that calculate the distance then take the reciprocal the same thing as before but we know normalize works now all we want to do is we want to say we have this but it needs to sweep up and down the z-axis in other words X and Y is done but our Z is not so if we take our position or you know what let's actually do it a bit fancier let's take our position and send it through another multiply so again this is the flattening one but if I was now to flip it so X and Y are suppressed and we only have the z-axis what do we expect this to look like think about it it's going to be a straight line because we're taking X and Y that were like this before and we're shrinking shrinking shrinking until it's zero and I think you can actually go negative if you want to invert it but um it's set to zero in other words we have the Z component by isolating the Z components right we keep it and get rid of X and Y and then X and Y we normalized and manipulated them now if we were to add both of these in other words kind of get both contributions you can see what this does is it makes kind of a janky but a cylinder a janky cylinder so again we've kind of separated our X Y and Z operations here so that this is a vector that only has stuff on the X and Y component this is a vector that only has stuff on the Z component and then we added them together uh Point wise or element wise to get a cylinder so in other words we now did the normalization for the sphere we did the normalization only on the X and Y for this and now and let me actually group all of this so this is our so select this shift p this is our cylinder and now the last thing we need because if you think about it the Snowman had spheres for the body and the eyes it had cylinders for the um hat and uh the last and it had cubes which we already have for the arms the last thing we need is the cone now how do we make a cone that seems even more complicated well a cone is basically a cylinder or we took the top and we pinched it towards the center if you think about it in other words we can build off of what we've already done to make a cone so I can either build off of here or make an entire duplicate and what I will be doing is making an entire duplicate just so we have this nice and clean so I'm connecting this to the set position so now we have again a cube a sub subdivided Cube and we send sent it through the set position that it has the instructions for cylinder and all I want to do is I want to pinch the top well if we want to do another operation where we're doing with meshes let's do another set position it's like doing two edit modes one after another now with this set position what I want to do is I want to isolate the very top well one way to think about it is to isolate the very top and shrink it however we kind of have too much geometry here so it's going to be kind of vertical and that's just going to right so maybe another way to think about it is we look as we go up on the z-axis as this happens we want to kind of make this diagonal right let me explain that again as we go up on the z-axis we want to shrink it like this going linearly shrinking more and more and more until we get to the top okay so this is going to get a bit complicated but you know here we go what we're going to do is we're for this set position we're going to hardwire the position again and what I want to say is I want to say take this and multiply it scale it on the X and Y axis as we go vertically okay well let's take that piece by piece if we want to go vertically we need to look at the Z components again separate x y z lets us take a vector like the position that has a X Y and Z component and we can only look at one of them as we go up on the Z what I want to do is I want to multiply on the X and Y I want to scale it so to get control of this Vector I'm going to do a combine x y z so we can actually type in the values so as we go up on the Z component manipulate x y and keep Z equal to one and you can see this kind of makes a weird cone it's called This is what a cone actually looks like it's called like a you might call it a double cone but a cone actually has two pieces what you're used as a cone is only the bottom half it seems but What's Happening Here is we have a cylinder we look at the Z component and let's look at different spots right here Z is equal to zero so right here it's going to multiply X and Y by Z is equal to zero so it's going to shrink it all the way down and is that what happens it is it pinches it right here at the top and bottom we have Z equal to 1 and negative 1 which means either keep it the same multiply by one or negative one means keep it the same but invert it is that what happens yes and then in between we have in between values so all I want to do now is instead of having this go from negative one to one I want it to kind of go from the bottom to the top in a sense I want it to stay fully the same down here which means it has to have a value of one so think about it if I want my base to be the same it has to have a value of one and then as we go up here we want to decrease decrease until we get to zero because at zero that will be fully pinched so just think it watch that part back again if you didn't understand it uh just to really make sure you have that idea in other words I want to take my Z component again shift right click drag to do this reroute so now this is a function of Z that goes to both X and Y I'm going to introduce a new node it's called map range or should I I'll do both I'll start with the kind of harder method so we've already talked about math and Vector math nodes what I can do is we have this going from negative one to one and we want to cast it to zero to one so what I can do as if this is going from negative one to one and I want to make it zero to one uh what I can do is I can either or sorry one to zero what I could do is I could either let's multiply this by negative one first so I know I'm kind of stumbling here we're going from negative one to one I multiply by negative one which is basically saying flip it because when you multiply by negative one this turns negative or sorry positive and this turns negative so by multiplying by negative one we flipped it then we add one why am I adding 1 1 negative 1 turns into zero when you add one and I keep moving and one turns into two and then we take this and we divide by two because zero keeps at zero and two divided by two is one so now we have a gradient going from one to zero and what I've done here is I put in the math functions and you could see it was pretty complicated I had to put in the math functions to map us from negative one to one to one to zero there's a way easier way to do this but you can now see when I enable this whoops when I enable it we now have a cone the idea works and just to see this a bit more visually what I'm going to do is I'm going to mix this as a vector with the original position and you can see what's happening here once we connect it is we have a cylinder that we're pinching at the top right that's the idea but let me show you a cleaner way to do this like math nonsense so there's something called the map range node and you might be thinking what is range what are we mapping basically this idea of going from negative one to one to one to zero we have different ranges different like gradients and spans what map range does is it converts from one to the other very simply so instead of like doing all that math we can say we start from negative one to one and we want to change this to one to zero and that's it so I want you to think of this where the first pair of numbers are our first gradient negative one to one and then the second pair is where we want to go to one to zero if I wanted to make the base of this a larger think about what we need to do so this is equal to 1 over here our scaling Factor that again is only working on the X and Y to make it bigger we just set this to 2. for three if I want the top to be less pinched instead of zero I can make it bigger like this and we can make this kind of weird by manipulating the input gradient but I'm not going to mess with that so in other words what we've done is we've made a sphere then we made a cylinder and then after we made the cylinder we did a bit of a manipulation to turn into a cone but the idea here is we had a cube and now we have a sphere cylinder and Cone okay and as a final part of this tutorial I know it's probably a pretty overwhelming uh what I'm going to do is instead of having these frames I'm going to turn them into individual nodes that says this is the turn the cube into a sphere node this is to turn the cube into a cylinder node and Etc to do that what we do is we select all our nodes that are part of our frame and you hit Ctrl G right what control G does actually before we do that let's actually have this visualizing this so it actually has it as an output so Ctrl G what this does is it takes a single input being our subdivided Cube it's doing manipulations inside of here which we can actually click on the top right so this is called the node group Control G for group in this node group you can see um our actual instructions we just normalize the position and then it's outputting this as the group output into our uh final geometry nodes group output okay let's do that again so for this one for the cylinder I'm going to select everything I'm going to hit Ctrl G and now we have our cylinder group so you can see we're kind of condensing this and then finally we take this we Control G and this is our cone group now for the cone uh what it really was it was basically our cylinder and then some extra instructions so what you could have done is equally connected this right here and it would have still made a cone because this is the same as everything preceding it um but I will turn this into a node group and then to keep organized let's move all this closer so we've compressed our nodes down into something very simple and we're going to actually be using these so that's why I'm going to name them we have a node group here I'm going to name this uh Cube 2 sphere and I'm going to copy that text you can see it's right here we can actually name the not only the node itself but the group inside of here this one is going to be called Cube to cylinder and you could also at any time dive into the notes here and manipulate it but that's what we have so far keep the cylinder and then finally the cube to cone so anytime we have a cube especially if it's subdivided you can just use these nodes to do that so let's actually save this I'm going to call this Cube to Primitives this will be available on patreon so or you could just make it yourself I showed you exactly how to make it uh one interesting thing though is it doesn't necessarily specify what input it should be using like yes it's going to use a cube a subdivided Cube but if I was to put in something weird like a sphere let's actually see what this does so for the cube to sphere works works works so it actually turns out that the instructions we gave are a bit more General and you could think about why that's the case uh really it's because the sphere fits inside the cube and therefore all the normalization on the X Y manipulations work but it is going to have different topology so you can see this sphere has different topology than this sphere this cylinder has different topology than this cylinder and this cone well it looks no it has different topology than this so really what you want to do is do everything we did with the sphere really kind of gives us better geometry but we're going to use this Cube to sphere so there you go what have we learned in this tutorial so basically what we've done in this video is we've taken set position and said we are going to use this to the absolute Max we're going to use certain selections actually I don't know if we use selections but we're going to use certain functions to offset or hardwire positions we turn cubes into other Primitives so that now we can make our snowman again using only our Primitives again is this useful not necessarily but the logic of it is essential because manipulating individual coordinates X Y and Z in certain ways that you want especially with all these gradients and everything is what geometry nodes is okay which is why I wanted to go over this uh lesson so uh in the next video I suppose let me see I have a curriculum here um in the next video I guess we're going to remake the Snowman out of a cube and we'll either use the node groups or make it again from scratch we'll see uh but that's just to get our snowman up and running again um but do watch that video because we're not going to make it exactly the same I'm gonna make it so that the cubes of the arms are made in such a way that we can like wiggle them up and down from their pivot Points uh we'll talk about that um and yeah see you on the next part hey there everybody and welcome to part six of introduction to Geometry notes the only series that's going to take you from beginner knowing nothing about geometry nodes all the way to the very end where you are Advanced and you can make anything your mind can imagine in the last part and make sure you watch the last part because it's relevant to this one we need three node groups we made the instructions or the node groups for taking a cube and turning it into a sphere cube to cylinder and Cube to cone in this video what we're going to be doing again the goal of this whole like level one of the series is to make a um a jumping bouncing animation of a Snowman uh in this part we're going to be remaking our snowman that we made from before but this time fully without all those Primitives right we're going to be using our node groups and uh we are going to make sure that we set it up in a way where the arms can wave and the Pat is one piece that it can bounce up and down and everything uh that is the entire idea so we're just going to be making our snowman out of a single Cube this is the group input we applied geometry nodes to a cube we take this we subdivide it again so we use the subdivision node to do that and recall that we have these three nodes from before that we custom made and they actually live right here shift a group and you can actually add them in right there we have Cube to Cone Cube to cylinder and Cube to sphere so uh let's make this thing starting off so let me actually just get rid of all this so starting off with a cube to sphere we have one of these I'm going to then transform so it's going to be very similar to the last tutorial so I'm going to go a bit faster I'm going to transform this and join it again that's Ctrl shift right click drag if you remember from that tutorial I'm going to move this up and we are going to scale it down again I'm going to take our Cube and then Cube to sphere and then apply another transformation where I move it up and scale it down and that is the body of the thing again again uh the cool thing about this is because this is using our operation you can see how it's actually a bunch of Cubes we moved but we manipulated it into the sphere okay okay so that is our body next I want to use the hat so that's going to be our Cube to cylinder and you can see how fast it is to make a snowman uh once you actually know what you're doing so I'm going to take my Cube to cylinder and I'm going to make another one of these and join them so I'm just making the Hat component so the Hat should be wider on the X and Y and thinner on the Z maybe even wider on the X and Y and this is something we could animate if we want to there's our hat and we're going to join it with the original and we're going to take our hat as an individual component again that's this joined right here this joint the cube to cylinder and the thing and the transformed version and I'm just going to move it up and scale it now it's important by the way that I grouped the Hat into a single object because what we're going to be doing at a certain point let me make it even a bit smaller what we're going to be doing at a certain point is we're going to have the Hat bounce up and down so I like it that this cylinder and this cylinder we've joined and then we're transforming it because again we're going to animate the Hat jumping up and down okay um next what we are going to be doing is let's make the eyes um which are part of the main body so what I can do is again use this a cube to sphere run it through a transform let's see what that looks like so I want this to be thinner like this so it's actually an eye something like that a bit thinner this way and definitely a lot thinner this way that's our I component we are going to take that and join it as a separate thing so let's see what this looks like through wireframe again same thing we've been doing before so that's why I'm speeding through it translate add a bit of rotation on the relevant axis and let's position it so it's offset on the X nope offset on the Y and a little on the Z and it should be smaller but not not infinitely thin okay so that is looking pretty good for the eye and of course you can take this and adjust it as much as you as your heart desires but I think that's looking pretty good so I'm going to take another transform by the way shift right click drag for the reroute so we can use that again all I'm going to do is I'm going to flip the Y components instead of negative I'm going to make it positive and let's actually join this so we can see it I'm going to flip the Z rotation and I think that should be good I mean the eyes are a bit far apart it's a bit of an alien over here so what we could do is we could bring it down to 0.2 then we have to redo the rotation sometimes you just got to be happy with it okay next what we're going to be using is our Cube to Cone so again connect that here and I'm going to join this as one of the final components minus the hand again Cube to Cone takes our Cube and makes it a cone and notice that I want this cone to not just be like I want it to be thinner um to do that I can actually go into the node group and remember we have full control over this we can map our map range to be a smaller remember we have that negative one to one to zero gradients I'm going to make it a bit smaller 0.3 to zero and then and this is the beauty of doing it procedurally because we could control all that I'm then going to send this through a transform node bring it up rotate it by 90 degrees scale it down and position it correctly okay that looks pretty good the final component that I want to make sure we do correctly is the arms for this we're going to again use the same Cube and one thing we're going to do is you might think oh for the arms you take the cube and you make them like very thin on the X and or in this case the x and z axis and then you kind of do it like this you might think that's how you want to do the arm but notice that it's actually scaling from the center and what I wanted to do is scale from the shoulder so it can get longer this way so what does that that I mean seems pretty complicated well what I'm going to do is I'm going to move the cube and just seems like a bit of a strange move I'm going to move the cube so it's actually on the X Z plane so in other words I'm going to do it like this so now the origin is touching the edge of this whereas before the origin was in the middle so I'm shifting it so that it's touching the origin I'm then going to add another transform node and what this transform node is going to do is now when I scale it on the y-axis you can see it's actually keeping this still because it's scaling from the origin and then it's going out like this so that's actually what I prefer so I'm going to make this super thin and maybe not as long and again it's scaling from this and the key here is rotation is also happening from here so it almost has a pivot point so what I want to do is I want to take this look at our snowman join it as one of the final pieces and make sure that it's the right size so it needs to be like this way thinner and then after we do this we can do another transform let me do a clear clean slate for this transform I'm going to move it up and I'm going to rotate it again it's rotating from the shoulder is the key idea here so it still needs to be a bit smaller okay so now when we're done with the Snowman and we go back and animate it we're going to be messing with this component over here in fact what we can do is I can move this you can see the it's still kind of in the middle of the body I can move it like this and then when we rotate it it's really going to look like it's waving correctly so let me just make it a bit shorter so all of this can now be controlled procedurally the length and the wave we just need to make a second one of these and to do that I'm just going to do the same thing with another transform join this here actually it's being sent out here so I'm going to join it in this version all I want to do is flip it so I can rotate it by 180 degrees on the Z which will make it face the other way and then I move it to have the negative value it's basically like a mirroring but the key idea here is now if we I mean we could control the individual arms or what we can do is we can go over here and control both of them at the same time in fact let me make this a parameter so again we can separate the rotation as a vector into its XYZ components and then with this component we can have it waving up and down and I'm going to use something called the value node we're going to talk about that later it's basically just a number in the same way that you could just put a vector down right so if I just type in Vector you can have an XYZ component I'm just going to use a value and this is important to have so we can animate it using a single number and similarly remember and I know it's turning into a bit of a mess so I'm looking for my Cube to cylinder and my join geometry this is my hat and this is the transform for the Hat I also want to make this a parameter so I'm going to combine x y z I want to look at the Z component and make that a value and this is going to be how tall our hat is this can be animated up and down so let me move this all the way over here so we have our hands moving and we have our hat bopping bobbling in fact we can take all of these over here and our initial group input which is the cube and I'm just gonna make sure we re-wrap this so it's just three uh connections uh this one this one and this one going in here and then we take everything we've done hit Ctrl G to make it a node group so we've taken something very complicated and made it very simple so you can see we have the X which stands for X rotation we have the Z which stands for the Z height of the hat and we have the initial geometry which is a cube that gets uh subdivided right now I believe as we saw in the last tutorial this could also work with a sphere but it's going to manipulate the arms because we use cubes for those but that's also a thing you can do okay so let's save that um one final thing I want to do for this is let's give it a bit of a better naming convention instead of x z and geometry to do that go inside the group for x and you can hit n for this menu for X we call this arm rotation for Z we call this hat Bobble and for geometry we call this Q because it's inputting in a cube okay and we can actually get rid of these and put in these values I think was like 2.1 or something 2.8 we can put in these values inside the node group and animate them we can actually have this thing like doing some crazy motions over here but there you go we made the Snowman again out of the cube but we actually added some parameters that we can animate and in the next tutorial actually now that we've gone to this phase Let's uh oh has my desktop been off center the whole time why did nobody tell me oh well I I assume that it's fine anyways um in the next part of the tutorial we're going to be talking about how we would animate something like the arms and the hat over time without like adding any keyframes or anything and also doing it periodically sinusoidally in other words instead of the arms just going up I want them to also go down and up and down and up and down kind of repeating that's what we're going to be talking about so hopefully you enjoyed this tutorial sorry about it being off center I'll watch it back and make sure that it's fine but other than that that is the video and I will see you on the next one hey there everybody and welcome to part seven of introduction to Geometry notes the only series that takes you from beginning knowing nothing about geometry nodes all the way and I love the chops to getting you to an advanced state where anything you can think up you can actually create so in the last couple parts what we've been doing is creating things we've been making a snowman out of manipulating meshes and transforms and all this in this tutorial however I want to talk about the other side of the coin how do we animate so we made the smash how do we actually animate it and give it motion and all this procedurally no keyframes so let's get into that so starting off with a fresh blender seam I'm going to make this a Geo nodes group and by the way we're going to be introducing a couple of notes today some of which you've seen like the math node and the map range node but we're going to go over them again but you're also going to see a new node so new geonodes group again it's a modifier you know all this for this project what I want to do is I want to transform again I'm putting this in between so our group input is this Cube we have I'm transforming it and that's what's getting outputted this will let us move the cube what I want to do is I want to animate this Cube going this way along the x-axis over time now the only way we know how to do that is either you know manipulating this or maybe like adding a keyframe here playing a bit of the animation adding another keyframe so that it's now like you know moving and I did I to do those keyframes while hovering over it but I don't want to add keyframes I want to do this procedurally so what I'm going to do is I'm going to use a combine XYZ again anytime we want to split up a vector and control the individual components you can either use a split XYZ to split a vector combine x y z to form a vector in this case we are trying to form the translation Vector which lets me control X Y and Z independently with actual inputs and for the input we're going to use a new node called the time node notice the time node either has seconds as an input or frame in this case it's the same it's either going to say the number of seconds that have elapsed or the number of frames well I guess frames would be faster but either way we click play and now this is playing let's try severing the connection and trying a frame I guess this will go about 24 times faster since we're at 24 frames per second but you can see now we have procedural animation because what this node does is it tells you what time we are along the timeline as display so we'll now say one second two seconds three seconds and that will be the translation on the x-axis of this Cube now if I want to speed up time using seconds not switching to frames how would we do that well we want to take time and make it go faster in other words um we want to take the time between 0 and 1 and make it go from like zero to five so it's good it's like 0 to 60 instead of zero to one um to do that we're going to use this math node I've been alluding to a couple times math node has a bunch of functions it has you know multiply addition greater than less than sine cosine a whole bunch of stuff but notice that this has great inputs meaning we're manipulating um we're manipulating factors is one way to think about them are float values basically we're manipulating single dimensional numbers not vectors just one number and what I can do is I can take my seconds multiply it by If I multiply it by 0.1 we'd expect it to be incredibly slow you can almost tell it's moving it is moving but now the time is 10 times slower If I multiply by 10 our seconds are elapsing 10 times faster and this is what's being inputted into the x-axis okay so we have that what I can also do shift d to duplicate is I can connect this to our I guess we'd want it at the same speed our rotation on the y-axis and this will make it rotate so now it's rotating over time and moving we could do something weird where we multiply this by negative one meaning the rotation is going to go the other side you can see how this can be manipulated um one other thing I just want to mention is that you can have independent axes of motion so this is going 10 times the time on the x-axis and I can make it go half the speed five times the time on the y-axis so it's going diagonally but the vector is going to be like two to one because it's going twice as fast on the x-axis okay now what I want to do is we have this Cube rotating and moving what I want to do now is put some more complicated motion on this so again I'm going to connect this to the x-axis it's going to move along the x-axis what I want to do is I want to make an animation where this thing Bobs up and down because our goal is to make the Snowman Jump Around well we know we want this to Bob up and down on the z-axis so I'm going to make this a seconds on the z-axis but this is just going to make it rise and it's never going to fall so what I wanted to do is to go up and down and up and down and if you look at what I'm drawing here it's a sine wave if you've heard of that before so what we can do is we can actually take our seconds and literally process them through a sine function and you can see now it goes up and comes down and it comes up and it comes down and it's going to oscillate between 1 and negative one and just like before if we want this to go faster we multiply the time let's say by five and then it's sent through the sign and then it's sent through the z-axis okay one thing I'm noticing however is it's dipping below the z-axis and I want it to jump up and down from the ground plane so what I can do is we've already talked about this we're going from 1 to negative one and what I wanted to do is I wanted to go from zero to like I don't know two or something like that to do that we need to remap the range again we have this one to negative one gradient we want to go from zero to two we talked about this in the last tutorial I believe so we can add a map range node sine is outputting negative one to one so that's our first remember this is our first combination negative one to one and let's say it output 0 to 1. this is almost going to work you're going to see there's a bit of an issue but you can see it's kind of getting closer it's still dipping below the z-axis why is this this is because our initial cube is actually already sitting below the z-axis so when it's at zero State it's already down here uh two ways to fix this one is we can add a bit of a transform before the start so we move this up one unit on the z-axis why is it already doing stuff it should not be doing nothing yeah so I want to transform this one on the z-axis and now it can't dip below this plane another way to do this is a bit more sophisticated is we could use the map range so we could bump this up by one units instead of zero to one it's going from a minimum of one to a maximum of two or yet another way we could have done this is we could have added one at this point which is identical we're going from zero to one and we're adding one so it's going from one to two and now we have this thing hopping but it kind of looks like and again I'm gonna make this one to two so we have our negative one to one range mapped to our one to two range so it's hopping but it kind of looks like it's floating a little um a quick fix for this is you're gonna see inside of this map range which is why I love it so much in our remapping we have an option for how it's going to be remapped so we could use step linear which is going to make it look kind of eight eight bitty it's going to take steps in between um and you can choose the number of steps right here I'm going to use something called Smooth step which what it does is it Smooths the end points of this what it's going to do is it's going to make it hover on the ground a bit longer so here's our linear it's kind of floating and our smooth step looks like it's sitting a little with smoother step it's really going to look like it's hopping so it's up to you what you want to do so we can have this and then on the x-axis I can combine this with time and make it look like it's going a bit faster and I'm thinking let's set this to smooth step just so it's not so extreme I feel like it's moving a bit too quickly and here we have a simple hopping animation okay uh we could even go a bit further and this is what we're going to do with the Snowman we could do a combine XYZ on the rotation and say I want to animate this rotation over time and for that let's try using again a sine function we'll see what this looks like so if I just plug this in directly it's kind of a bit extreme so I'm going to use a map range we're going to say go from negative one to one to negative 0.1 to 0.1 so in other words we're usually at rotation zero I'm gonna have to go a little to the left and a little to the right and you can see this adds a bit of basic rotation uh we could even have it go from zero to like point two so it's tilted and then when it lands it's flat and tilted flat tilted flat so this rotation just adds a bit of something if I make it more extreme you can see it kind of makes it look like it wants to jump a little Let's Have It Go from negative 0.1 and this could be you can mess around whether it's like smoother step or smooth step or linear that is up to you but you can see we've basically animated this Cube I think the last thing I want to add is a bit of a Randomness so we've I think in one case use the noise texture node but let's use it again remember noise texture what it does is it generates random numbers in this case I want to generate a one-dimensional input so I'm just going to give it one way to look at this and let me see this is a new feature of geometry notes I'm going to see if it works here we have a cube and I'm manipulating here you can see as I move this W slider the brightness is changing what this is showing or what it's indicating is that this W slider is then outputting a random value um per this W slider or if I set this to if I set this to color and then connected this I'm just viewing it you can see it's generating a random color or in other words a random Vector per W slider the point is if I animate this W slider over time as we've been doing in this case I want this to go much much slower so I'm going to divide by a hundred so times going 100 times slower we're going to get this random Vector if I then go to our rotation and do a vector math because now we're dealing with vectors so I'm going to add what we have so far so it's not changing anything since we're adding zero I'm going to add our random rotation now it's going to look very very strange what I want to do is I want this to be less intense so I'm going to take this I'm going to scale the vector how strong is this contribution make it point one and this should just add a bit of Randomness as it will be a little hard to tell maybe I'll make it go 10 times faster so you can kind of see it should be randomizing the rotation let's see what happens if we set it to one it I will admit I'll be the first to admit it is hard to tell if we set this to one there we go now you can see the random rotation that's being added it's just adding a bit of chaos to the system so I wanted to go 10 times slower just so we're getting a bit of random rotation and a little something we can do here is by the way this is a bit of a technicality noise texture outputs a vector that's zero to one on the XYZ axis if I want to center it at zero so instead of going from zero to one on the X Y and Z axis I want it to be centered I want it to go from like negative 0.5 to 0.5 so that zero is in the middle here so it can go like tilt forwards or backwards I can just take this I can subtract 0.5 from each and now the rotation is going to be centered and you can see it's almost like the cube is facing different directions uh each time okay one way to make this a bit more evident is I'm going to add a transform and I'm going to move it on the Z so you can really see its rotation you can see it's facing different axes each time but effectively what we have now is a cube that is jumping and it looks like a bit random and stuff like that what we could do is again I shift right click drag to consolidate this to reroute I can multiply all this so it now has a Time multiplication Factor before it enters any of these so now it's going two times faster or five times faster and that is up to you what you want to do with that um and what I'm going to do in the next tutorial since we're actually done with this one now is in the next tutorial what we're going to do is we're going to apply the lessons we just learned to animate the snowman jumping and then we're going to move his little arms in this hat and all that is going to be with sine functions and to do with time so what did you learn in this tutorial you learned of the existence of something called the time node which has seconds and Frames isn't as an input really we've been using seconds and we use this to animate different uh we use this to make functions that animate different aspects of our things so the transform mainly the location rotation but you can use this to animate anything you can use it to animate scale the number of points whatever so that's the idea in the next part we're going to animate a Snowman and I will see you there hey there everybody and welcome to part eight of introduction to Geometry nodes the only series that takes you from beginner knowing nothing about geonodes all the way and I love the chops I say it every time uh too advanced where anything you can think up you can also create um so far what we've done is we've made a Snowman and make sure you watch the previous Parts because they build on each other we made a Snowman and then the last part I showed you how to animate a cube to make it look like it's jumping now we're going to take those two things and combine them we're gonna make our snowman uh jump over time so it's actually going to be pretty similar to what we've been working on so here we have our snowman node group uh you can see it has the parameters from before it's arm rotation it's had bobbing I just want to focus on making it move so what we did in the last tutorial is we added a transform so again we have a cube as an input we have this node that basically turns it all into a Snowman and then we transformed it or we're going to transform it in a way where it's going to be hopping and moving Etc so I want to affect its translation so I'm going to combine X Y Z again why do we do this it's so that we have individual control of the X Y and Z parameters so I'm going to animate the X to increase over time and the Z is going to go up and down relative to a sine wave just like the last tutorial so I'm going to use time as our X input and Now using a math function remember we're going to send time through any math function I'm going to use a sine for the z-axis so what this is going to look like think about it it's going to move forwards and it's going to go up and down relative to a sine wave but it's moving pretty slowly so to make it move faster I'm going to multiply my time in other words I'm going to accelerate it instead of going from 0 to 1 0 to 60 or in this case 0 to 5. I'm going to make it five times faster one thing I'm noticing though is the Hops kind of like for each hop we're going way further than I'd expect almost like we're on the moon so uh for the motion remember this Branch over here is just X movement and this Branch over here is the Z Bobble I like that if we multiply it by 0.5 or divide by two now it's going to move the less per jump next issue is remember our sine wave goes from negative one to one and that makes it so that the Snowman dips under the ground plane uh we want to fix that and we know simple fix for this again so this is literally the same node group we are going to map range from negative one to one not to zero to one because remember our snowman is already underneath the surface um but we're going to have it go from one to two so that it's at its resting state so negative one to one two oh it's not connected or it's not being viewed so at its resting state it goes exactly on the z-axis again another way to do this is I'm going back to zero to one is we can take our snowman and we can transform him or her or they um up one unit and connect this to our thing it's a bit more sloppy but it does the same thing right but I don't want to have all these transformed so I'm going to go one to two and to make our jumps a bit smoother I'm going to set it to smoother step so you can see it's hopping and it's loving it's loving life and next thing I want to do is I want to add in some rotation again literally the same way we did it with the cube so I want to combine x y z on the rotation I want to rotate it on the y-axis just like this and for that what I'm going to do is I'm going to first of all try connecting this whoa that's crazy uh we need this to be relative to a sine function so it goes in and out in and out in and out and then instead of using a map range I can just say instead of going from negative one to one because you can see it's going way over way over I'm just going to multiply it so instead of going from negative one to one it's going to go from negative 0.1 to 0.1 which is a bit subtle so let's do 0.2 so this is like a map range where we know we're taking this negative one to one centered at zero and compressing it in the middle okay that looks pretty good uh let me make it just a bit more intense I like that um the only reason to use a map range in this case for the rotation is if we want to incorporate that smoother step which I think I do actually so I'm going to do that I'm going to go from negative one to one to negative 0.25 to 0.25 but again the difference here is we have smoother step and that's going to make the rotation also kind of vibe with the jumping motion um okay so we have this thing jumping and we have it rotating uh the last thing I wanted to add was the random rotation that I showed you before so again let me explain it we use a noise texture and with this noise texture we set this to one dimensional so as we animate over time so I'm connecting my seconds to my w input which is basically just the seed of this it's the input to generate a random Vector I'm going to divide this by 10 so it goes 10 times slower this noise texture we are going to incorporate into our rotation just so we add a bit of randomness so all I've done here is I've taken our rotation and I've added our random components and you can see it's kind of changing direction each time now one thing that I mentioned last time that I don't think I was very clear on noise texture what it does is it generates a color or a vector same thing where the X Y and Z components are all zero to one right which means on average it's going to be tilting a bit more this way on the X and a bit more this way on the Y and a bit more this way on the Z because it's all positive zero to one I want it to be centered where I can rotate this way or this way on the x-axis or I can go this way or this way on the Y in other words it's not biased in a certain direction so for that I'm going to Vector math subtract by 0.5 this is just a common trick and you can see this makes it centered and almost looking at the cone as the direction it's facing you can see from the cone we've added some Randomness and it doesn't look so constant anymore and it adds a bit of a life to this again we can make this way stronger of a contribution by scaling this by like let's say 10 that will make it crazy but you can see it can rotate like any direction pretty much but I like this again you can control the speed of this make it look like it's going crazy or kind of stabilize it out we now have a jumping Snowman and the next step is remember we had a cube we made the Snowman group and now we're doing a transform so let me actually take all of this all of this whoops and put it in a frame shift p so this is our transform instruction so just to be super clear we have our group input which is a cube right we applied our geonodes modifier which means it's going to turn into a Snowman that's the node group we made and then we're transforming it the transform has a very special set of rules that we made um so let's actually give this a name this can be our snowman so you can see this is our snowman group and this is our jumping group so think of each note as an operation but because this is all procedural we can always go back and this is what we're going to do in the next tutorial we can always go back and add a bit of hat wobble as you can see or maybe the arms can like flail around and rotate so this is why we set it up this way so that we can have have some Randomness here and I think what we're going to end up doing is kind of using sine functions or maybe some noise to animate these we'll see in the next video but the essence of what we've done in this video is we took the lessons from the last tutorial how to animate things using time and Randomness and we applied it to our snowman so in the next tutorial we are going to finish up our snowman with the bit of hat Bobble and a bit of hand waving and then that will be the end of level one tutorial zero through nine at that point a 10 part tutorial series that got you from knowing nothing about geonodes to making a snowman that jumps around so pat on the back to you but first let's finish it off with the next video
Info
Channel: CGMatter
Views: 129,497
Rating: undefined out of 5
Keywords: blender, beginner, geonodes, geometry nodes, full course, tutorial, series, advanced, nodes
Id: ZerJnivvBn4
Channel Id: undefined
Length: 110min 22sec (6622 seconds)
Published: Thu Jan 05 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.