I wish I knew this before using Geometry Nodes (Blender)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
how did geometry nodes actually work within blender it feels like most tutorials out there show you what to do but not like why you would do that or how you do that with something like geometry nodes it's kind of overwhelming how do you know which node to use when like what's the thought process that you need to have as you're going about building something in geometry nodes so today we're going to do exactly that this is going to be very much a learn by doing scenario so what i can promise you is i'm not just going to be like click here add this node do this do that okay we're done and here is the owl we're going to talk about a certain philosophy that i've began to use with geometry nodes that has completely changed the way i use them at all maybe i still don't know every single little thing but at least i have that foundation where i can put things together and know how to go about that so i'm excited to share that philosophy with you specifically today what we're going to do is we're going to build a stitch pattern so if you can imagine if you're modeling you might need a stitch if you're stitching fabric together or you're you're trying to put a stitch on a leather patch that's getting stitched to another surface like a jacket or a hat and this will just be a really fun way for us to play around with geometry nodes and really learn how they work under the hood so what can you expect in this video we're going to quickly talk about how you would build something without using geometry nodes to get that foundation first and then jump right into geometry nodes and learn how we do the exact same thing there once we're in there we're gonna specifically talk about how to generate curves and meshes how to convert that curve into a mesh what are the different options available there how do we scale and rotate things how would we maybe make a mesh follow a curve in geometry nodes there's a bunch of different data types in there what do those mean attributes fields every geometry node seems to be a group with an input and output how do those actually work and is it actually possible to reuse those also what about like extruding things and shade smooth and all that jazz like is that possible to do within geometry nodes so these are some of the things we'll chat about but overall the main goal here is a mindset right at the end of the day we're not going to go through every single possible geometry node one by one in fact that would be in my opinion extremely boring so again today we're going to be learning by doing and really just focusing on developing a new perspective around geometry nodes that suddenly makes everything so much easier to use by the way i'll tell you right now we will be going down some rabbit holes so i've given you fair warning all right let's get started so first of all um you know my resolution is probably a little bit high right now so i'm gonna zoom in just a little bit let me know if that helps and yeah let's get started so we're gonna get rid of our default cube we're gonna go from a bird's eye view here and what how might you go about creating a stitch to stitch something onto something else right you've got you can stitch fabric onto other things seems within a piece of fabric or like we talked about a leather patch onto a shirt or a hat or whatever so the first thing that comes to my mind is to use a curve so if you're familiar with blender we got curves we have a couple different types so what if we took like a bezier curve which looks like this and we went and edited that guy and perhaps we you know do something kind of like this you know we want to create that arch for a stitch right now we're just going to create a single stitch maybe this needs to come a little bit more vertical right the the stitch isn't going to be perfectly spherical it's going to kind of pierce into the sides so we might do something like that great we got our curve it's at the wrong angle so what you might do is you might go rotate so r on the x-axis and we rotate it up by 90. so now that has moved it up so that it's vertical and then you might just come down here into your properties we know that curves have a geometry and we could set a depth on that guy to extrude them and now you can imagine you can start to imagine this could be a potential stitch right so say we were stitching something on we needed like a curve or a in this case let's make a circle uh so we create like a circle scale that guy up maybe scale this guy down a bit and then we can apply a couple modifiers right so a typical way you might do this is okay we got our bezier curve let's go ahead and make this an array modifier which will just basically duplicate it so right now there's two we can just keep that rolling perhaps we want a bit of an offset between them because they're not right up against each other all the time um and then we can add another modifier called a curve modifier that would basically attach this to whatever curve you like boom and there we go we can kind of play around with those at the length a little bit tedious at this point but you know 32 looks all right um this last point probably isn't perfect but it looks pretty good so we got lucky yeah that's a very basic simple way you might do something like a stitch right and then of course we'd have something like a cylinder let's increase the vertices on this guy 100 um we'll pull them right out to be just bigger and then this guy is way too tall so we're going to scale him down scale zed and something like that could be like our little circle leather patch and we'll bring him down just a little bit so they kind of overlap and then you got kind of like the stitch pattern right i'm gonna quickly add a leather texture here and i'm just cheating a little bit because i have a library i've just set up which you can do for free so let me know if you want a tutorial on that one i'm going to shade smooth this guy just so that it is even and if you're familiar with shade smooth you usually have problems with the normal so we can say auto smooth at 30 degrees and we look pretty good so you can imagine this is like a some sort of patch that we're going to stitch on to maybe like another surface behind it okay so there is our patch and then let's just quickly add a material on this guy call this the stitch and let's just make it some similar color a little bit darker i've done this already once before so i'm going to turn the roughness up all the way and the specular down kind of make it give it that uh the threaded material um we could go all out if we wanted to we could make this actually look like a thread with a specific texture i'm not going to go that far right now all right so that's without a geometry node so how would we do the equivalent with geometry nodes so what what i'm going to do and i'm going to explain this as i go so bear with me i'm just going to start with my um my curve so let's rename this just to a circle curve this guy is going to be called old school stitch and then we're actually going to turn this curve itself into the geometry node here and i'll explain why in just a little bit so to do geometry nodes we have this nice workspace at the top called geometry nodes we can go ahead and click on that and with our circle curve selected we can click new and that basically adds the geometry nodes modifier for us what we could have done instead is just going to the modifiers tab add modifier geometry nodes and that would have basically done the same thing so with our geometry nodes super high level you basically have a input and output what does that mean input is the input geometry given to this so in this case since i added the modifier to my circle curve that is my input the circle curve and then the output is whatever you want to output and since we just have a simple line going between the two what you get put in is what you get out but of course that's not very useful on its own and here is where i want to start talking about the real power of geometry nodes and this philosophy that i'm about to go through is the philosophy that i've started to use when i'm using geometry nodes and really it has motivated me to use geometry nodes a lot more because of this and here it is basically think of geometry nodes as pre-recorded actions what does that mean okay so i'm in my object view here right ctrl a or sorry shift a we're going to go ahead and do something right okay i'm going to add a cube to the scene that's an action i just did something i added a cube okay what else might i do with this cube okay i might uh scale it or maybe scale zed this direction i might rotate it okay i've done a couple things now i've added the cube i've scaled it i've rotated it what else can i do i can add modifiers to it i could mess with a bunch of the properties you get the point we can do all these different actions what if there was some way to in a sense record those actions so that instead of manually doing them over and over again we can just define them in a single spot like if we could just create like a a list of actions okay number one let's add the cube number two let's rotate the cube number three let's scale it okay i did in the other order but you get the point what if there's some way to write that down pass that into blender and say go run this and then what if there's a way to reuse those over and over again right and before geometry nodes you'd be thinking yeah okay this would be called scripting right if you've ever dabbled in this at all which i'll admit i have not very much at this point uh blender uses python as a scripting language so you can go ahead and use python to literally write code in the python programming language to manipulate your objects within blender and you can create functions and if you're coming from a programming background you'll know exactly what i'm talking about you create functions you reuse code over and over again you have inputs outputs this is very much a programmer kind of thing that you might do to accomplish what i'm talking about and this is literally how add-ons are created right you install some add-on from from some developer how do they make that add-on they create a script with python code that manipulates your objects or adds your objects they have a you know a line in their code that says add a mesh to the scene and then scale it and rotate it and do whatever they need to do in order to build their add-on right back to geometry nodes well it turns out geometry nodes basically allow every single one of us whether we're a programmer or not to become programmers geometry nodes at the end of the day is basically visual programming by visual i mean you're dragging and dropping nodes on a scene but this is pretty much exactly what a programmer would be doing but instead of writing code you're doing it visually and if you come from a programming background this is possibly the best thing you've ever heard because this is the way your brain thinks and now that you know that you can do that within these geometry nodes that's a game changer and if you're a programmer you might be thinking well i'll just stick this scripting and that's perfectly fine good for you but i'll explain a little bit as we go why geometry nodes perhaps could make your life a lot easier at least at the beginning so first things first let's do exactly like i was demonstrating there so first things we're gonna do is shift a just like anywhere else to add stuff and you're you know you're brought up with all this stuff right it's it's overwhelming but once you start to understand like the idea behind some of these it becomes a lot less overwhelming pretty quick for example we have this mesh okay what is this okay looks like it's like operations on a mesh okay i can extrude a mesh it's kind of interesting cool but like can i create a mesh uh and that's where this mesh primitive comes in right mesh this is looks just like if you're to go ctrl a mesh um mesh primitive okay cool what does that mean okay so let's add a cube for example so instead of adding literally a cube to the scene i've added this cube node which represents um the formation of the cube right so now i can just drag this mesh into my output and boom now we have an actual cube in our scene but pay attention here we're still selecting the circle curve right because that's where we're applying this geometry node uh we're just basically saying i don't care what the original input was the original input was this circle curve i'm saying uh forget that i'm just going to completely disconnect that guy and instead i'm going to output this cube instead so be it cool what if i want to scale this guy like i did well you can actually change the size right in here if you wanted to um but that's actually not quite equivalent this is changing the actual cube size i believe where um what you might do instead is a transformation operation um so if you're looking for like scale for example there's scale elements that provides a uniform scale or you can do a single access so that works for scale let's see is there if you want to do rotation rotate there's this rotate instances but it's not quite what you think it is um so instead what we can do is we can do what i did before transform which will allow you to do the translate rotation and scale so if i pop my mesh into that guy and then this guy into our output um we can do like what you would do here um in your transform panel right you're scaling not the underlying element but the um the object itself so let's say i extrude the zed everything else can come down a little bit i might rotate it that way which direction did i wrote it x and now i've kind of gotten something sort of similar to what i had before and that's amazing right because now you know this was a very very simple and contrived example right this is probably pretty useless um but you can imagine like there's as we go through here there's going to be a lot of possibilities we can do with this and that can be extremely powerful and we'll get more into that in a little bit so let's let's delete this cube we don't need that um we're going to try to go back and create our stitch so we're also going to get rid of this cube because that guy is just in our way now and we'll come back here so first things first we need to create a stitch like our old stitch right and to do that we created that bezier curve so if i go ctrl a and search for bezier segment which is also under curve primitives right so just like mesh we have this curve which is like more like curve operations uh and then this curved primitives where you actually would literally instantiate these curves so um let's do a buzzer segment and this is so cool right because instead of having to add the segment to your scene uh tapping into that into edit mode and then like manually modifying it you can just do this once as a node and then this can be reused and repeated however you like so it's gonna be a little bit more work probably to get it adjust in the first place right we we can't just tab into it and and adjust the handles as you can see these handles are actually not the handles of this curve these are still the handles of my original curve and that's just because again geometry nodes are separate this is if i go back here i'm just back in my same old viewport same old blender again if i go tab i'm still talking about the circle curve right that's what i'm editing there uh it's within this these geometry nodes is where we need to do that so here is our bezier curve like we had before you can see we have a couple options here we have our start and end which is talking about um that point there right start and we have our let me actually just isolate this guy so it's easier to see isolate is slash on your keyboard we are start handle which is like somewhere talking about in there again we can't really visualize it but we can kind of we can kind of get it and then obviously if we understand the start handle there's got to be some sort of end handle so this isn't symmetrical we kind of want it to be symmetrical so just do the same thing let's create an n handle at well that one's 0.5 so let's go 0.5 and then the y there is 0.5 so let's do 0.5 okay perfect so now we have like kind of like this part of a circle in a way but just like what we did before it's not really a stitch doesn't really look like that right it comes more like up over and back down so maybe let's move our start handle back a bit maybe negative one that would make that go straight up see that's already one benefit of using these geometry noses if you do want to be extremely precise which i'm a very ocd person and so even outside of geometry notes i found myself you know typing in numbers trying to make things sure things are like exact and this makes doing that really easy okay so we've made it the same and you might be thinking about now hey this is kind of annoying because we always want this to be symmetrical right a stitch is always going to kind of be symmetrical from this profile it's never going to like be lopsided on one side um so is there any way we can actually force that in here turns out there is so if we go into our nodes there is a special node in here called a vector node which to be honest i don't even know where it is i just kind of searched it hoping that it would exist where is it oh it's an input okay vector um by the way i create a shortcut for search which is uh controlling on my keyboard whoops uh that just makes my life a lot easier because i'm almost always searching for for stuff right so if i did shift a a lot of people just go shift a click i think and i just find that one extra step that's kind of annoying so why not just control a and if you don't know how to do that use right click on here and go it would say add shortcut for you if you don't have one yet all right so we got our vector and each of these is a vector right you can tell by the fact they have an xyz so let's just make this vector match our let's say our end handle so we got one we got 0.5 and that's perfect and you're thinking okay just could just pop this into both but except for one problem our start handle is actually negative where n handles positive so if i pop this into both dang that that obviously won't work because we need the start handle to have a negative x and this is where it's super easy with nodes right um turns out there's a node called a math node and this is actually the wrong kind because it is a scalar uh we actually want a vector math node right so there's a couple different types of math um in this case since we're working on a vector which has an x y and z we need to be doing a vector math operation um so we will go ahead and do vector math we're going to do a multiplication on our x so let's first of all make them all one we're going to pass that guy into there so right now it's just multiplying them all by one and that basically does nothing but now i can change the x to negative one so i'll basically take each of these negative one positive five zero because i'm not using z um and it basically does exactly like we want so if i pass it in there nothing changed which is what we were hoping um and now all i need to do is change a single spot over here and you can see that we're moving symmetrically amazing so that's pretty sweet um as you can see we got a bit of a problem remember before we did a rotation we hit rx 90 right so i'm not going to do that on here because that's actually going to literally rotate our circle curve all the actions we need to do need to be within our geometry nodes so how can i rotate this guy well we just talked about that earlier there's a good old transform node so i just by the way you pop these on the lines and it just auto adds them which is super convenient um so let's go ahead and rotate about the x 90 degrees boom looks great um and then we what was the next thing we did well we came in here to our stitch and we went to the geometry and we added some depth to the round bevel how we're going to do that so you know what what would you search for in this situation and i'll admit there's lots of times i try to search for something and it just did not exist i'm like okay this is annoying had to google it finally found it after not too long okay that's all good other situations you get lucky so like i'm thinking how would i turn a curve into a mesh perhaps there's like a curve to mesh okay awesome so i'll just pop that in between and now this is technically a mesh but why does it not look any different well unlike our convenient bevel function on our curves within blend regular blender what you'll find in geometry nodes by the way quite often is there's usually an operation in here for kind of every single thing that you might do within blender right um control a add things you know as you as we've already found out you can add curves you can add meshes um you can do curve to mesh which actually is more equivalent to going convert to mesh right if you've ever done that before that will literally turn this curve into a real mesh within uh blender and so the point i'm making here is basically there's almost a note for everything you might do but uh the blender developers and the blender team has basically almost made them even more modular in some situations just to make them work better within a node environment here so curve to mesh doesn't do anything what we need to do is we need to add this profile curve there's no convenient um bevel rounding and whatever that's okay that actually just it's actually a good thing because that gives us more flexibility and makes each of these a little bit more modular right so i need a curve profile curve if you've ever done profiles before that's going to be another curve let's make that a curved circle right that'll be equivalent to going ctrl a curve circle like we actually did at the very beginning um don't need that so we just did that and we're going to pop that guy into our profile curve and whoa way too big so let's pull that guy down i'm holding shift by the way because normally this is like extremely sensitive so if you hold shift that brings down the sensitivity um and now we can have like that stitch right cool and of course you can adjust the resolution if you wanted to change that um let's fill those caps right you might have seen this option elsewhere in blender so that's the same thing and cool we have this mesh so the next thing we did was we took that mesh and we added um well it was actually still a curve in this situation but we we did an array modifier that remember we duplicated that remember and then we attach it to a curve so how do we do something like that well there may be a way to duplicate in geometry nodes but there's actually a better way to do this in general around a curve and let me show you how i would do that so first of all we have our group input if you recall this geometry is literally our original circle curve right if i pop that back in there's our circle so what we need to do just like before is make this bezier segment basically duplicate it and then make it follow along this curve how do we do that well turns out and i'll tell you i did have to search for this one we have this curve operation called a curve two points and this is extremely handy um looks kind of freaky right now um the reason why is because their points by default are just massive um if i were to like for example skip we'll scale this out you can see what's actually kind of going on here instead of scaling that out though i'm going to do another narration and so basically curvature points we have these points and they're going out to the geometry and what's a point i guess that's just like literally whatever that thing is that's a point and it can be considered a mesh because it happily connects to the geometry um of course we don't want these points we want to replace them with something else so is there some sort of way to like take these points and put a different object on it and i'll just tell you what that is it's called or it's called point it's called instance on points there we go so we'll pop that on here and instantly everything just disappeared because we have no instances passed in as you can see here it's expecting some sort of instance conveniently we have our stitch ready to go so if we pass that stitch on there uh cool but uh perhaps the stitch is a little bit too big so we can come back to our transform scale all those guys down maybe scale down our radius even more and now you can see okay we're kind of getting closer to what we want right we have these stitches they're going around our curve one thing that stands out right away is they're not rotating along the curve right they're all kind of like facing the same direction which is not what we want and conveniently this curve to points actually has a rotation output which is basically the output of this rotation is gonna basically as you go around the curve this rotation will change and so that's extremely convenient for our situation here because we have uh this rotation which if you just change it in one spot it changes the mall right and this is where the power of nodes kind of comes in right you know on its own this is just being applied to everything but you can have basically inputs that will vary across the surface so in this case we're having a rotation that as you go around the rotate uh the curve this rotation will change which is literally perfect for us as you can see now they're all rotating the wrong way but they're all at least rotating along the curve of course to fix that we'll just need to come back to our transform here and just uh bring that back up to i guess what we'd do is 180 here again we can be precise we should be precise next weekend thing we can do is rotate our y's and looks like that should be 90. and then perfect now we're actually getting a kind of good looking stitch now one thing we didn't talk about here is this curvature points has this parameter here called count which is really cool because you can just uh increase this or decrease this to configure the number of instances it will create and you can probably see now why this is a lot better than that array modifier right because the array modifier you kind of have to give it a specific amount and uh instead it's always going to go along the curve and just space itself out accordingly um but we can actually do one better in my opinion um you know this is subjective based on what you're trying to accomplish but if we scale out our curve here you can see the count doesn't change right that count was fixed we still only have 12 they're just more spaced apart and to me if you're going to be using this geometry node which is a stitch probably you're going to want it to just like keep an even stitch distance between each one of them and if i scale this out i'd rather just add more instead and turns out there is a actual perfect solution for that and that is change this option from count to length and what length is basically doing is well it's way too close right now um what is basically doing is setting a fixed distance between each segment right so here i have point three seven let's change this to like point five um right you can i can prove this if i can hold our handy dandy measuring tape uh you can click on that to do that or i believe it's shift space m there we'll do that too so let's pretend the origin actually the origin probably is in the center of each of these stitches so if i measure let's go from bird's eye view from here center here to the center of there it is 2.5 so i am lying to your face right now i think i know what's going on we need to change our yeah we have a scale on our curve so usually this this is why people always say you should apply your scale right lots of tutorials i see oh just apply your scale let's move on right why are we actually doing that it's for situations of choice right because the underlying curve has a different scale than the object here so it kind of throws off our expectations sometimes um so if i apply the scale without basically doing this go into this underlying um curve and set the scale to whatever this is now this is considered one right so as you can see that changed it quite a bit we have stitches all over and now if i zoom in and do our good old measurement again we can see we're base well we're not basically we are exactly 0.5 meters so that confirmed what our expectation was with that parameter and it makes sense right if it changes all the way down to zero they're overlapping like crazy and that's just because again the center is in this in the middle right so they're just like duplicating right next to each other um we need to bring this to at least the length of one segment um but i'm going to say a little bit more because i don't know depending on the kind of stitch there might be um an even gap between them like that right cool now just to fully just demonstrate what i was trying to show there um if i go ahead and change and by the way i'm going into edit mode so that i'm changing the actual scale right if i didn't if i did that in object mode we have the same problem i have to keep on applying it so let's just go right in there as i scale this amazing it's actually adding these um stitches for me and basically keeping that consistent distance which is what i believe most people will want with a stitch perfect let's bring that down just to make our life a little bit easier okay cool so one thing i want to talk about next is this thing called attributes and being completely honest was really confused how attributes work in blender for the longest time so if i go into whoops by the way i turn my screencast keys on here sorry i don't know why that wasn't showing up before it was only showing up in my layout workspace um so that's back now all right so uh attributes if i go shift a and we come down to inputs here we have a bunch of different what they're calling inputs here and if we go below this separator we have a bunch of what we call attributes and what do attributes do well attributes work within the context of whatever you're connecting them to okay that sounded kind of theoretical and vague what does that really mean so in this case we have our instance on points right and something that you could change for example is your scale right here i'm i'm shifting the scale up and down and like we talked about before with the rotation it doesn't always have to be a fixed value it could be actually a data set multiple values like this rotation actually changes as you go around each point and if you pop that into the rotation input on this instance to points it will actually have a different rotation for every single point that was passed to it uh which is real so this is where attributes can be quite powerful um so for example if i go into my inputs and i grab index what is index well if you come from a programming background this should be pretty obvious um if you don't index is talking about which element within a list am i referring to so for example uh in programming terms we call these arrays or lists and in this case right we have a list of uh whatever we can count these one two three four uh let's just say 20 because it's going to bother me now one two three four five seven i was off 14. okay so i have 14 points and each of these is going to have an index and when it comes to programming uh everything's zero based what is zero base means it means instead of the first one being considered one so pretend this was the very first um point on the curve instead of going one two three four you start at zero zero one two three four five so by the time you go all the way around it's actually gonna be zero through thirteen instead of 1 through 14. it's still 14 elements it's just uh what you call zero based and why is that this is the case for basically all programming because first of all this is just how a computer works and second of all the math actually tends to work a lot better with things being zero based in this case for blender being zero base is actually quite handy so for example if i were to pass this index into something like my scale what would actually happen since index is actually going to be changing for every single element right and i probably got this wrong probably this one actually isn't the first one it's probably let's just see so if i pass that in here i think probably this one over here was the first one and let me explain that so what just happened there well as index increases right you can imagine this is literally going to be zero or one or two or three or four or it'll keep on changing for every single element in your um in your list right so for each one it's actually going to dynamically change my scale to be whatever the index is so the very first one would be an index of zero so we should expect a scale of zero hence why if this one was the first one it probably disappears completely because it would have a zero scale next we'd have an index of one so we'd expect this guy to look actually just like this next would have an index of two so this guy should be double the size so let's hook that back up and see if that was correct we are correct and we can't really see behind here okay we can let me just turn my view um so i was right zero um one right this is scale of one now there's a double side uh triple the size keeps going bigger right so if you can see where i'm going with this something like this could be actually quite powerful we just so happen to use scale for this scenario and if you like to do kind of a cool growing effect then you know use it for that but at the end of the day we have so many different um geometry notes we can do this we can just manipulate things and massage things to be infinitely complex to make like literally anything we want and on the simplest level like what if you didn't what if you thought this was a big obnoxious like hey i like that growing effect but like like obviously this is too much well if you recall we have what's called uh vector math nodes so let's just toss a vector math node go down the wrong one there there we go by the way if you hold alt or option uh while clicking you can just take it away without having to like reconnect the line below it so it just like pops off which is super convenient so we'll do that and in this case we probably do like i mean you can do whatever you want let's do a multiply and now we can actually like fine-tune the adjust the scale of each one right because what's going on here is we have zero one two three four five we're gonna pass that into the scale so it's actually going to divide by almost 10 here or multiply by 0.1 0.12 same thing 0.1.1 there we go and then then pass it into a scalar right so you can start to see what kind of possibilities you have here and as you get more complex you can get into some really crazy vector math that may or may not be useful also of course we're scaling everything together you could scale just certain dimensions if you wanted to right so we could just make one just the x scale or get bigger as we scale um which one would look the best you can actually do some pretty wild stuff this maybe take everything down and then like do something crazy anyways from a stitching perspective this is i mean to me this is not what we want i mean maybe you have some crazy stitches in your life but for me i'm gonna get rid of this but just to demonstrate the these what you would call an attribute and feel free to experiment with these right there's there's a bunch of different options like you know scene time what is scene time well scene time exactly like it sounds uh depending on where you are in your animation so let's change this to our where are we let's go to our dope sheet right so if you've done any animation before you can scroll through the timeline this will actually straight up output the frame number you're on or how many seconds you are into your clip and i mean the sky's the limit use your creativity here but the first thing that comes to my mind maybe this isn't so creative is well what if we actually took the output of something like seconds and literally created a text note on the screen right we've already done meshes we've done curves what about text so if i go text here we can do looks like we can maybe do string to curves all right so we can have the ability to pass in all our standard text options so if i pass our seconds into string okay this red connector means it's not happy with that why i think the reason is because this is expecting a string and again if you come from a programming background you'll know that a string is just talking about uh text right that's essentially what a string is whereas this output of here is not a text output it's just like a value it's like a number value so if you don't come from that programming background it's important to know that every single one of these inputs and outputs can have a different data type right if i pull up my sidebar here we're going to talk about inputs and outputs in just a little bit but just to quickly show you you know you got geometry as one of your types but you can also have strings or integers or floats which is like if you're not feeling with floats it'd be like a number that can have decimal points in it uh so we'll come back to that in a second here but let's go ahead and figure out how to convert this value to something that can go into here uh it turns out there's lots of awesome converting functions in geometry nodes um pretty sure there's one here called value to string perfect so we're taking this value and then we're going to output a string so basically just converting that to from a number to a string and then we don't see anything because we haven't outputted our curve yet but if i do that we'll temporarily get rid of our other stuff but yeah boom look at that zero and it's zero because we're zero on the timeline as i increase this the number will actually change as we go so like i don't know about you but this is like super exciting to me this is like in my mind extremely powerful like the kind of options you have with this right and like i can adjust the decimal point here so maybe you had like a cool like you know timer that counts up as your scene goes i don't know what the use case is there but i'm sure there is one like i said at the very beginning you're basically programming now at this point right so you could always like what if i didn't want it to count up but i wanted it to count down well if we knew that the scene had um was a 10 second clip then this is actually really easy right we just use another math node so we do go math this time regular math not vector math we're going to pass it into let's say the bottom value we'll say we know that the clip is 10 seconds long and then we just subtract the current time 10 minus the current time and then that should actually start at 10 and then count down right so you can like really go nuts with this and then i don't know if there's actually a way to grab the total time of the like the programmer me is like i don't like hard-coding this to 10 because what if later on i change it from 10 seconds to like 20 seconds then i have to remember to come back here and change that to 20. it'd be nice if there's somewhere to just like pass whatever the time is for my clip directly into here to be honest i'm not sure if there's a way to do that let's let's poke around did a little bit of research there so i found out there is a way to grab this value although not as easy as i hoped it would be i don't think i at least i couldn't find any kind of like attribute or way to pull um something like the total time in the scene within an input or anything but turns out you can use drivers to do this and full disclaimer right now i'm not an expert in drivers but what you could do is there is a input type called value which is literally super basic um almost has no purpose right you just pass in some sort of value and like great what does that even do like i'm just i'm just doing the same thing just making it more complicated by using a whole nother node right but it turns out that you can actually add a driver to it and like i said i'm not an expert on drivers here um but basically drivers can be a very powerful tool to script some basic things and have one input driven by a different input right so in this case um what i would do is i come down here to these input values and i would set this to just a single property uh and just bear with me here so first you need to choose which i guess id type here as this is indicating uh to pull from so first right now we need to ask ourselves where would i find the total time in a scene and someone can please correct me if there is a better way to do this but i didn't find an actual property available for the total time on the clip but there is the total number of frames in a clip and then there's also the frame rate in the scene right so if we can if we know the total number of frames and we also know the um the frame rate then theoretically we can basically calculate the time in the clip right so how do i get access to this and how do i get access to this right well thankfully for something like end time you can just right click and say copy data path and that will actually copy like the underlying python property name so if you were to actually be doing real scripting this is how you would easily access this property and reference that in your code right so what we can do is come here go to edit driver and the expression can just be our var which is this guy we need to reference our scene because that's where this property is attached to and then we need to um pick a property oh sorry we need to choose which scene and now we need to pick which path with it within that scene so i can paste what's in my clipboard frame and that should theoretically create a driver that just pulls whatever this value is and pops it into here and as we can see boom driver value is 250 so you can tell it's a driver because it's purple now um let me zoom in for you guys if i try to change this won't do anything because um it's now locked to this if i were to go change this value you can see on the left now that is dynamically changing which is perfect that's actually really incredible so we can go ahead and rename this guy uh f2 i guess we'll do that and let's call this um total frames now this is 100 true this is actually the end frame so if your start frame uh was higher up and then your end frame was still 250 technically we should be subtracting the end from the start but whatever i'm not gonna go that far into this uh especially because this has nothing to do with uh stitching anymore but we're going down a rabbit hole here all right so now we have the total frames let's duplicate that uh and we're gonna have another one to grab the fps and annoyingly i wasn't able to right click on this fps to grab its data value so i'll look it up but it it is there it does exist so we just have to go add driver again i don't know why it likes to add that by default but we'll come back here and do the same old thing reference our scene scene and i'll just tell you and there's documentation to look all these up anyways but you would do um so right now we're on the scene so you can go scene.render.fps i believe it is and that grabs the 24fps i wonder if that would have been available under my render settings not sure oh well okay so we got our total frames we got our fps let's do a little bit of math and we will divide our total frames by our fps and that should give us our total time in the clip and apparently it was 10.42 because we're at the very beginning here and it has 10.42 but we can prove that this is correct by going all the way to the very end and we should end at zero at the very end there perfect uh although note if you could go past that we're gonna go negative so i mean theoretically your your animation should never go past that last frame but if you're really concerned about that i'm sure there's some way we could actually cap that so typically uh if you've done any kind of program before you would cap things by using a math.minimum or math.maximum so in this case we want to cap the zero we don't want to go below zero so we can just say choose the maximum between uh whatever value we have and zero so if it goes negative suddenly it now chooses this bottom one as the maximum because uh it's greater than the negative right so now if we go past that i am lying to your face why is that going negative oh because i'm an idiot uh i shouldn't be adding the math.max there this is just passing in our um total possible time right our actual time is here we do the subtraction and then here is where we should be doing that capping okay that makes a lot more sense now you can see anywhere we go past there would be zero anyways total rabbit hole right there he might not even care about capping in this scenario but probably useful to know that that is an option for other things where perhaps that would be a lot more useful and then since we've gone this far let's just see this through real quick right now we're just we just got curves rendered so most likely you want this to be an actual good-looking mesh um just like we did before we can do a good old curve to mesh and this is actually not what we want i take that back because curve to mesh does like a lathe style thing right like a bevel um so just like we did before with our stitching right we could add a curve primitive we can add like a circle curve pop that guy on there obviously he's gonna scale it down and yeah it's creating geometry but it's like beveling it right i mean maybe that's what you're going for it actually looks kind of cool but what i was actually intending is a to like extrude this thing right so under text nope not under text under curve there is actually a thing called fill curve and this is what we're looking for now this has actually added a face to our curve which we can do something with so if you recall now that we're a mesh we can go down to the mesh and there's a good old extrude mesh sweet we're extruding it's a little obnoxious let's bring that down and you get the idea here right so back to what we talked about at the very beginning you just keep going right and like the best part is every single note i'm adding to the scene here is an action that i would have been doing in regular old blender right okay first i create my curve and then i fill it right i'm extruding it like yeah it's a it's more modular we have um have to do maybe a little bit more work sometimes but in my opinion that's a really good thing and so like a common scenario here is you're like oh well normally i would like right click on this guy and say shade smooth but naturally that doesn't work because again we're just on this curve we're not actually smooth shading our mesh anymore like we can't consider anything in in this viewport here as as something we can work with it's all got to be within our geometry nodes so then the first thing that we think of is like is there like an actual shade smooth node hey would you look at that set shade smooth so we pass that guy in we're actually have the option to enable or disable shade smoothing now that looks kind of nuts and the reason one of the big reasons is because when we filled our curve it decided to use triangles to do that and in general in blender you want to use n-gons that looks quite a bit better still quite funky here and if you've had a scenario before you might be familiar with the fact that you might come into this normals and do this auto smoothing i'm just choosing our old cylinder for now remember we did that at the very beginning um right this guy we came in and we said um auto smooth otherwise it would have done that weird kind of curve thing so if we go back to this guy again i'm hitting slash on my keyboard and then you can hit dot on your numpad to zoom in we want to basically add that auto smooth which basically says anything built beyond this angle i want you to automatically smooth right but beyond that don't and that way we can keep that crisp edge so how do we do that um is there a node to basically do that smoothing and this is a good time to talk about something you might see commonly in geometry nodes and it's called a selection so in this case we have set shade smooth say that 10 times fast please and it asks for like one option to pass into this is this selection and you might have seen that before i think you know this instance on points it actually had a selection as well what is selection talking about so selection you you can think of as choosing the vertices within that mesh you're basically filtering that down for this operation right so in this case instead of adding a shade smooth to the entire mesh what if we could filter that down to only be certain vertices within that mesh to apply that shade smoothing to which is essentially what's happening down here with this auto smooth normal this is a lot simpler and easier to work with in here we're kind of getting more under the hood we got to do it ourselves but the selection is how we basically do that filtering so turns out there is a node called normal and this is an attribute like we talked about before so again attributes are within the node that you're working with um can grab certain values out of there right so before we add index and that would be 0 1 2 4 or whatever depending on the current point that we did that back there we can do one called normal um except that's not enough what we need to do is we need to combine this with a math operation so let's go math pass in there and let's say instead of actually performing math we can do within this math note we can do what's called um a comparison and so we can say as long as the normal is less than a certain value then provide the shaded smoothing that's the selection again we're filtering right so now i can actually adjust this threshold in the less than i'm going to hold shift to really make the sensitivity go down because it's really sensitive right so like i'm in like the 0.2 range so if i have zero right there's no shade smoothing whatsoever actually there is interestingly enough i gotta go into the negatives but as i slowly creep that up you can see where we're getting that shade smoothing to happen there kind of and why is this number so low well the reason for that is because we're working in radians right now so if you recall with angles you can have degrees or radians radians are like if you recall from your math class what is it math.pi divided by 2 is equal to 90 degrees so uh ratings are going to be different so we can work in radians or again we have nodes and we're fully flexible here so why not just work in degrees because that's easier here so it turns out there's another math node called or math operation let's say called two radians so there's two degrees and two radians in this case we need radians in the day so we can start with our degrees uh let's say 30 degrees okay that wasn't right but start with degrees uh pass it into here and that will actually convert that to radians like how convenient right so we'll take that down and i guess it was around there that we wanted the the normals to be um why are we only getting part of it okay just a little bit of digging there again um i remember i made this mistake last time it's not normals that we want for the attribute here because um that always trips me up because it's called uh it's under the normal tab here so i think that's what i need to work with here instead there's actually a property called um edge angle um and that must be an input right no that's actually coming from a mesh right because only a mesh would have an edge angle so down here we have edge angle and that's actually what we care about here not the normal so let's put the angle into there and then now as we tweak this whoa we're very close but still getting kind of a funny situation and i finally figured this one out too um turns out when we extruded our mesh we had this setting called individual turned on we turned that off boom instantly those go away and then we can pull this back down to a number that we would have expected like 30. um hence the default right you always see this at 30 as the default because that's like 99 of the time what you want um so i was actually a bit surprised that this wasn't 30 um so if i just change the 30 now boom it now works with that setting so what is this individual what does that actually do well i did a quick google um by the way if you ever want more information on what these mean check out the blender documentation but yeah so individual if you come down to individual whether to extrude each face individually rather than extruding connected groups of faces together as region a quad side face will be generated on each side of every selected face so it's a bit cryptic but i think the general gist is you might be getting extra faces or extra extra geometry that you didn't expect because it's treating multiple faces in their own individually rather than in groups so in our case we wanted it to treat it as a group and that's what we would have expected okay the last thing you might have noticed as i've been moving the viewport around that we have no bottom face why is that uh well it turns out for greatest flexibility i guess the extrude mesh literally doesn't always behave as you might expect it will actually just extrude in one direction and you don't get a face on the other side and i'm not bashing the blender developers here at all that wasn't supposed to be passive aggressive uh i truly there must have been a good reason for this um this must provide the most like the most flexibility in the design again just means we need to do a little bit more work so if we before we fill our curve or sorry before we extrude the mesh but after we fill the curve it turns out there is a node called a flip faces and if you want to know where that is let me tell you it's under mesh flip faces so what does this do well if we pass this guy into well first of all how would we do this well we'll just put it right in between here and see what happens so the second that i flipped the faces here you can see what's happened it's actually gone the opposite way it started here and gone down so now we have a face on the bottom but now we don't have a face on the top so we just kind of like have the same problem just in the other direction um but you can see what it's doing here i think it's kind of flipping the face the normal of the face uh to face to invert it right so what if we just uh instead of flipping the faces there what if we just actually flip the face here so basically we're adding another face on the other side and then we can't pass into here right you can only have one mesh input we'll just have the same effect but what we can do is we can merge basically we have two meshes now we have this extruded mesh and then we have this other face flipped on the bottom as it should be just sitting here not extruded and then if we can just combine these two together somehow everything should look correct uh so to combine meshes we can go into no it's not dual mesh um combine i know it's in here somewhere here we go join geometry um so if i pass that here this is an interesting data type by the way right um this input here it's got like this big kind of circle uh i guess it's not a circle um looks like multiple circles right beside each other and that's because this actually can accept multiple geometries which is cool um so now if i pass that guy in there as well just like we hoped for now this flipped bottom face is basically merged with our extruded mesh and we have basically what we would have expected normally for an extrusion operation amazing so now we can you know we got our countdown timer cool so again this had nothing to do with our original stitching but hopefully you guys learned a lot about more options you have with geometry nodes to do something like this countdown timer uh okay before i completely just disregard and remove this countdown timer let me show you uh this concept called grouping and this is actually pretty huge and let me explain why so grouping is more than just me hitting like uh is it command g right click or not right click you go shift a make group so yeah it was command g yes that will group everything together into its own thing but now that group can be reusable anywhere else in your geometry nodes and that is the power of groups and in addition to that you can explicitly set the inputs and the outputs of that group and as a programmer that is pretty freaking cool so let's go make group yeah so we haven't talked about uh group inputs and group outputs yet um you notice back when we were over here by the way i'm hitting tab to go into this right now we can bring all this over because that was just obnoxiously big now small so if you want to go into a group you hit tab it's like think edit mode you know tat you're tabbing into it so here we have this geometry right but as you can see there's this empty group slot here and what i can actually do with this is pass this into anything here and that actually becomes a new input for the group and i'll do that here on this level but first let me go back into my timer which by the way you should always be naming these something meaningful so f2 to rename uh let's call this like countdown timer and that's what i've named this node but the actual node group should be called that right so i just created another instance of it now um this is just like the name of this instance of the group whereas this is the name of the actual group so this this one down here is actually more important but i would do both and now that i've renamed that to countdown timer if i come over here you can see i have now two geometry nodes one is our original geometry nodes that i never renamed for my stitching let's call that stitching by the way always name your stuff like you'll thank yourself later so stitching and then we have another one called countdown timer so at the end of the day this subgroup that i created is actually it's on the same level as my stitching group right and if you start to think about geometry node groups in this way you can start to see the power behind it right because i can now just take this countdown timer and apply it to any old thing i can create a good old um uh empty like something that doesn't have any geometry whatsoever wow that's funny empties actually don't have modifiers never mind i'm going to add a i don't know let's just do like a cube so kind of modifiers i'll go into geometry nodes and i could pick or just create a new one i don't you don't want that i want to pick uh my countdown timer and i think they're overlapping but look like now i can just immediately apply that countdown timer to another node or like we're doing in our uh curve you can actually add it as a sub group within this and you can just keep going i can go tab into this guy have another group and pass that into here i could create my stitching group and put it into here and now that's going to be crazy um actually what's going to happen because that would be like wouldn't that be like an infinite loop i'm kind of afraid to do that i should save my file first okay this is hilarious uh in the best way possible so uh blender team has actually predicted someone trying to do this before so they've they're purposely filtering out um when you go control or shift a group um you can go ahead and uh it will show all the groups available to put in here as like a quote-unquote subgroup and uh yeah they they purposely filter out all the the groups that would turn this into some infinite recursion infinite loop scenario um right because if i i can't put another countdown timer in this countdown timer because it would just go into infinity right my nested countdown timer is also going to have another nessa and it'll just keep going uh same thing would apply if i put or try to put a stitching one in here because stitching contains countdown timer so that would just also result in infinite loop or infinite recursion rather and and yeah that blender actually is accounted for that and purposely filters out groups that would cause that to happen which is smart um even though i like quote unquote deleted that geometry node one you can see it has a zero here it just i can still access it but it's technically deleted i gotta hit the x again and if i were to save my file and close and open it back up it would remove i've always found this kind of confusing at first there's probably a good reason for this but if you really want to get rid of it just go to your blender file node groups these are all my material nodes but so your material nodes and your geometry nodes get just bundled together into this node group type come here and just go delete because and that would permanently delete it all right let's rewind where were we oh whoops we actually deleted our geometry nodes by accident stitching we're back and of course in that process i just created another one sorry guys delete okay so we've exhausted the idea of groups hopefully you understand that and but we haven't talked about inputs and outputs so uh right now this stitching group is working because we're passing to the output of this node if i take that away that goes away right so from think from a programming perspective or just from any kind of modularity perspective this is amazing each group has its own input and output if you go back to this level there's the output if i had an input it would have been on this side you're basically creating your own notes at the end of the day which is pretty epic so like i've created my own custom node called countdown timer just now so this is actually a good time to talk about inputs as well like in this scenario what would be a possible input that maybe this countdown timer would want i mean potentially like start time although we've done a bunch of work to make this smart by auto trying to calculate your total frames or your your total duration maybe we make that customizable right like like you are you are the node developer now right so really right now you can decide like maybe you have an option that says custom length or or just pull from the scene and you do some fancy math logic that says if they chose to do a custom time then pass that into into the subtract function otherwise just use this uh pre-calculated thing which by the way we could just take this group that command g call this scene duration and now we have a reusable new node called scene duration that we can use anywhere so you have to be duplicating these node setups over and over again i would highly encourage you guys to like even in like a very micro modular situation like even on a couple notes at a time turn those into groups why not and um now it's not such a mess right one of the worst things with the note editor is just how crazy things can get so modularize module modulize things that was hard to say um as you go and not only does your whole graph look a lot simpler now you can actually reuse those little pieces that you create along the way um over and over again perhaps right if i ever need the scene duration i can use that again so like okay let's just quickly entertain this thought what if i want to give the you the you know the blender artist whoever is going to use this node in this case me for now but what if i share this right what if i want to give them the option to like have like a checkbox on here that says like um use custom time otherwise it will use the the scene duration right so how would i do that um a couple options so number one where would i manage these inputs and outputs if i wanted to and the way you'd access that is in this sidebar here see that little arrow the shortcut for this is n if you're familiar with that right that pulls up that sidebar there so if i go n and then make sure you're clicking on group up here you can do things like rename so let's call this uh uh whatever we can call it group input that's fine um you can like colorize these things if you really want to sky's the limit kind of cool uh anyways so we go down to group and we can add an input here and what's like a check box how do you do like yes or no well in program we call that a boolean boolean is like one or zero yes or no um true or false we can give it a default value uh what do we have the default value to we'll come back to that in a second here uh what do we want to call this we can call this um custom duration and then we can actually do a little bit of what you do you know it's called boolean logic also known as like a simple if statement so again if you're a programmer or you even like you know read one line of code in your life you might have seen like oh if an if statement if this situation then do this otherwise do this um turns out we can do that within geometry nodes uh like i said we're literally programming right now so to that you do what's called boolean math and you can do an operation right okay so it turns out that's actually not what we really wanted here in this scenario we don't actually want the boolean logic at this point in time what we should have actually added was what's called a switch and basically treat a switch as like an if statement if this do this otherwise do this and this is like so amazing that this node exists within geometry nodes where is switch good question it's under utility is there so same spot as math and some of the these other useful things we got uh switch all right so how does switch work so first you need to talk about the type right because you're we're switching between two different things right in our case we want to say if they checked off that they want a custom duration and then i just now added this second input for the duration itself this would be a float like i said float is a number that can have a decimal so basically if they choose yes to custom duration then we're going to allow then we want them to use this duration otherwise if they unchecked this then they should just use our default scene duration and actually we want this i think we should have this unchecked by default by default just use the scene duration um but then if they really want to they can use their custom duration right so we need to decide what we're switching between so what are we switching between what's the type well we're not switching between geometries right we're switching between scene durations and what data type is that well that's a float like we're just talking about so if we come into our data types we'll go to float and now you can see these two have changed to allow you to have float so so what's happening here is basically saying give it a switch so in this case um custom duration this is that boolean there's our switch right yay or nay um if they checked yes then use this value for true and output that if they checked false use this value for false and output that so using the full power of nodes we can say if custom duration was false then we'll go ahead and use our scene duration false scene duration and we'll output that into our pipeline and then if it was true aka they did want a custom duration then we can now pass in whatever their custom duration was so let's see how that's working good it is using our scene duration by default if we tab out of here we can see now that our node has these two inputs that we just created right these two inputs here inputs here that's what these are now and not only can i at this point check what my input's going to be i could feed something else into this right so it's it's extremely modular and it looks like this is actually working right because i say if i didn't check this then go ahead and use the scene duration which it's using uh if i do check this then use whatever this is and i can go ahead and change this to 20 let's say and it will actually pop in the 20 instead this is perfect now you might be thinking especially if you're a programmer uh ideally i don't even want to show this duration if this custom duration is unchecked right often in these menus right once you check something more options appear below but like why even show them you know if they're not relevant so is there a way to like conditionally show an input like only show this duration if this custom duration was checked and to be honest i do not think there's a way to do that i think we're asking too much at this point in my opinion it's actually pretty amazing that we can even get to this point but maybe in the future blender will add an option that's like okay so hi i was wondering what this high value did all it's doing is preventing you from at from like entering the value right here you have to pass something into it um which i don't think is necessary it's kind of pointless for us so now you can at least set it here if you want to or you can still continue to pass something in from that side so yeah anyways i don't think there's a way to say like only show this input if this guy was checked that would be sweet but someday so that's inputs um just like inputs we can have outputs uh 99 of the time you're just going to have this geometry output because within geometry nodes we're trying to produce geometry but it doesn't have to be right this could actually be just like the inputs this could be any other data type i could take something else that i've you know created along the way maybe i thought this um i don't know maybe i thought the text coming out of our our whole duration formula would have been handy for something so i probably wouldn't do the string if i thought this was going to be handy the string's not going to be that useful i would probably prefer just to use the the value itself so i could grab that value come all the way over here and pass that as as an output um please rename this because value is pretty meaningless call this um at least something like text value that's gonna be float and now if i come back here we can see that in addition to these two inputs in our geometry output we now have another output called text value you know maybe this is useful for some reason like we have the geometry of our countdown timer but maybe i want the actual float value of that timer to be fed into something else that could be useful for something right you never you know the possibilities are endless so uh nothing stops you from having multiple outputs as well so i'm pretty happy with this countdown timer um i don't think we're ever going to use this again in this project because once again we're we're trying to do stitching this was a massive rabbit hole but hopefully a good rabbit hole for learning um so i'm gonna just delete this node this group rather um don't be afraid to do that like i talked about before they are saved here in your geometry nodes so we have a countdown timer that we can always come back to um if you were worried you could check this fake user thing which basically tells blender to never garbage collect this thing um what's a user like what's a fake user a user for blender is talking about uh is there something else in my blender document that's referencing this object okay what does that mean um the way blender works is like almost everything right right like your nodes um also your objects here like anything in your blender file any of these things um is like a reference within the project right it's like it's an object with your within your project um but other things can reference that um that's why you can do things like linking um multiple meshes to the same like multiple objects to the underlying mesh rather if you've ever done that before right if i create two cubes right now they're just completely two separate cubes right i got my good old measurement here get rid of that okay so i got two uh i got two cubes they're completely separate cubes if i change one did not apply to the other one and that's just because you can see you got one two cubes if you look at their underlying mesh we got two separate ones we got cube zero one and cube two um and i'll be really quick with this rabbit hole these are decoupled right we have this underlying mesh but then we have the object reference in it and then we have this other underline mesh in this one reference in it but there's nothing that stops me from using like this underlying mesh on both of these cubes so that's why you could do something like instead of shifty to duplicate you could do alt d or option d it will also duplicate it however it duplicated linked right if you go object duplicate there's duplicate which is shifty but then duplicate linked what does linked mean well you're actually uh pulling in that underline mesh and they're actually it's referencing the same mesh under the hood so now if i come into here and modify one of them boom it's actually modifying both of them because they both reference the underlying mesh however this guy the object itself has its own transform properties right i can scale this guy up and down and that is in fact independent from the other guy and but that's because this is different from this but the underlying mesh that they're referencing is the same so as i continue to modify it they'll still be modified these are just transformations on top of that right so it's really like once you kind of start to understand this is how blender works everything becomes like way more clear how you can actually like use it to your advantage i'll admit it took me a very long time to understand this is how blender works i i just thought it was very confusing unnecessarily complicated but once you start thinking about it like that then that changes things right so this cube001 is in fact a single instance within our blender file but it can be referenced in multiple places right if i go back to our blender file to our meshes here is that cube mesh that we were referring to right um and then here is the actual object that was referencing that so they're two separate things and so let's reel it in what blender does sometimes is if there's nobody referencing something anymore then blender will do what's called garbage collecting which means it says oh this thing's not used anymore um especially if they decided to delete it in which case you would see like that zero next to it right um let's create a new one there is if i hit this x it didn't actually remove it but it has a zero next to it that's because if i go into the nodes here it still exists but it's marked for deletion because nothing's referencing it as soon as something references it then it will continue to keep it in the scene so what this f does if you've seen this f or this fake user what does that mean it just means like pretend there's something referencing it in blender it once something references another instance of something that's called a user it's a it's a user of this node so to create a fake user is basically saying hey like i know there's nothing referencing this right now but just pretend like there is so that you don't garbage collect the thing and get rid of it right so that may be something you want to do here let me just get rid of this because i'm ocd and i don't even like to see it in here i want to go on okay so we've we've exhausted that discussion let us oh we can't tab out of this because we're actually we actually changed we added this uh geometry node to this mesh over here that's actually kind of hilarious let's delete those guys uh we'll come back here now i can still not tab out because i changed the type let's take it back to stitching right i had deleted that right so that's why i wasn't tabbing in or out anymore okay so we talked about inputs and outputs does my stitching need any kind of inputs can you think of any kind of inputs that would be useful for stitching well i can i can think of a number actually right now for example you are now a geometry node developer i mean in a sense you've almost made like an add-on called like stitching you can now share this out on with somebody else and be like hey like you want stitching i got you here's a stitching node so we better provide that person who's going to use this node whether it's us or somebody else some useful inputs to change things so that they don't have to dig into this and like understand how this works and be like okay like i want this thing to maybe scale in a certain direction or scale as a certain size like you know they don't know what they're doing let's make it really easy for them so what's something that we may want to allow them to adjust well i think this scale perhaps could be one of them i don't see why not if we were intense what we could do is like we did before we could like cap it out so maybe like cap it out in a certain situation where it couldn't grow bigger than the stitch size but maybe not maybe you want to give them the option to like do something nuts like that so i'll leave that capping as an exercise for you for us for now what we're going to do is add this as an input and last time i added inputs by coming into here and manually going plus and blah blah you can still do that a much easier way is actually just to do a reverse connection so i take the scale pass it into here and then instantly it's out of this input for me often this name is not going to be what you want it's just going to inherit the name of the property that you connected for convenience in this case scale actually does make sense but maybe we can call this like stitch scale i don't know maybe that's redundant i'm going to call it tisch kale for now but like how how can i use it now right i'm on the top level of my geometry node so where can i actually access this well if you recall geometry nodes actually at the end of the day are just modifiers so if you come back to your modifier tab this stitching group which by the way here you can also change it to all these other ones suddenly i now have the stitch scale which allows me to change the scale here which is perfect if i were to like temporarily if i get rid of that here you can see now that input is gone so that's that's what's going on here and i actually really like the fact that we're changing this scale before we turn it into a mesh because if you kind of noticed as i'm scaling this it's scaling the curve but you can notice like the mesh itself isn't really scaling like it's not getting thicker or anything as i scale and that's actually like a happy accident in the situation going full on bob ross here um if i had this transform after my mesh right transform put it here then it would in fact scale the radius and everything which to me is not what we want like if we're giving them the option to scale the stitch i think we want to actually allow them to scale that in isolation i do think it would be useful for them to change the radius though but just as a separate value turns out we have this radius here which we had built in so let's go ahead and provide that guy as an input instantly now they can change the radius which is amazing and i guess to be consistent let's call this stitch radius again i might regret this i might just get rid of this word stitch on everything because maybe that's obvious but that's pretty sweet what else might the person want to adjust well we had set this length to something arbitrary like and if you recall it this is a length between stitches i don't know i think this is something someone might want to adjust so let's go ahead and pop that in here in this case i think length is definitely a bad name let's call this um spacing and you know what screw it i'm going to get rid of the word stitch it's bothering me now this whole this whole note is called stitching so it should be obvious that scale means the scale of the stitch if you had multiple different types of scale that's when maybe you'd want to be more specific with your naming right cool so we can adjust that we can adjust that and we can adjust that super cool now let us talk about materials because this definitely tripped me up you're all happy with your stitches you are let's bring it back into this scene what has happened here oh we got we got our old school stitch which is having a tough time right now okay i actually brought that in earlier i should have just kept it out here all right so let's actually build our our real stitch now so if you recall this was our leather patch that we're stitching to something there we go um now the stitch feels like pretty tiny unless this is like a massive leather patch so let's actually use our handy dandy inputs now to uh maybe let's start with our spacing space in a little bit more maybe make them just a little thicker scale can come up right this is already becoming very useful i guess another thing that might be nice as an input now that i'm looking at it is like whoever stitched this uh didn't do a good job right this is actually not a great stitching because you want this tight and this looks kind of like someone just did a half-hour loose stitch so how would we change maybe the height of this curve well if we come in back to here what we did at the very beginning if you recall we have this y value and because we made our life easy by you know forcing our start and end to have even handles it's actually really really easy now and this is actually pretty much required now that we want to make this an input right we want to take this y value and allow them to adjust that y value and call it like i don't know stitch tightness or something and so that works perfectly now how can i grab this y value as you can see there's no there's no y input here and to do that we can actually replace our vector node with a different one called a xyz so you can we can separate x y z or we can combine x y z in this case since we want our y to be an input we do a combine right so it's basically the same thing as here except now you can have inputs to each one of these which is perfect so let's go one point four two zero and then that guy was just zero so now we can basically replace this with this guy i'm just gonna do this manually i messed up here there we go negative one um let me get rid of that guy and now this will still behave exactly like we had before but now we can have inputs so i can take this y pass into here please rename it we're going to call this tightness or looseness whichever you prefer um the higher the value the more loose it is so maybe we should actually call this looseness either one works i think but now we have the ability to kind of adjust that and give the end user the end artist the ability to adjust the looseness of their stitch by the way there's default values for all these right so if i were to create a brand new stitching node on something else it's not going to have these values it's going to have a bunch of default values what are those default values you can find those in here so like looseness has a default value of 1.1 and what like why did it choose 1.1 well that's actually what i had here before if you recall i had 1.1 so the way inputs work is whatever you you know start this on before you come in here and connect it it'll just for convenience make that value be your default but you can change it later too so let's just change that back to we had before looseness 1.1 was a looseness do we like that that's pretty loose i'm going to say that's not what we want our default to be let's make like that our default so like 0.25 yeah 0.3 maybe 0.3 so i can copy that into here and that just means so the next time i try to use this geometry node as a whole it's going to have that as my default so i think that's good and then probably best practice would be for me to come back through all these other ones and give them like a same default that you think most people would want again they can always change it though okay yet another tangent let's get back to our materials so you've got your stitch on your leather patch you're pretty stoked about this you you want to give this a material so what do you do in this situation well you just head on over to the shading tab of course um you add a new material and you're like oh yeah defaulted to white no big deal let's just change that to you know i want it to be like a brown color let's make it a bit darker you kind of tweak this you're getting you're feeling good about it um actually funny enough we actually created a stitch already earlier for our other guy except it's not working what's going on is it something weird with this viewport shading what if i go to my actual render view still no luck what is going on and then you realize oh right i'm working with geometry nodes once again according to blender's perspective this is just a simple old circle curve right um you can't add materials to curves you can add materials to meshes but you can't add them to curves so dang even though i'm adding this material to the stitch like is letting me do it it's completely useless so what are my options here well just like everything else when it comes to geometry nodes you can actually assign the material within geometry nodes so you just go add material and you can there's actually a handy dandy set material pop that here so anytime you see like set whatever and you pass it into the pipeline that just like sets some property on it so in this case it's going to set our material on that guy we can go ahead and set this to our stitching material and then okay finally we actually have our stitching material coming through there now you're thinking this is kind of inconvenient like it would have been nice to somehow use that um shading node and i was trying to see if there's a way to actually like in the same way we pulled like our scenes duration is there some way to like pull this current element's material from here and then like programmatically in a way pop that into here um i don't think there's a way yet as of the time i'm making this video this material selection is just the same thing it's just deferring this to another node you can do material index which will not work but what if we do material material index guys i felt like i was so close here i thought there was a way to like material index i thought would be like each material here has an index 0 1 2 3 4 5 or something like that so i thought this would just like cycle through those indexes and then i could pass in the current materials index in there not working not sure uh yeah not sure there's a way to do this someone please let me know if there is a way that would be pretty freaking awesome so anyways for now we're gonna stick to this but as a pretty reasonable compromise what we can do is again just add our material as an input connect that guy there and then instantly now we have the ability to set the material here so that's actually not that bad because yeah it's not in the shading tab or like it's not under the material tab here technically this is doing nothing i might as well get rid of that just to not confuse myself but i can come here and that is now an input that i can pass in so that's good and in a way this kind of makes sense right because what if my geometry nodes were so complicated that i had many meshes in my node group here right and um i wanted you know each of those messages to have a different material like what if i'm building some fancy geometry node that like creates a you know buildings and stuff like that you might have seen something like that before a building is not gonna have one color right you might have a roof that's brown and you know the building might have a different color so in a way you couldn't just have one material out of there you need multiple so it's kind of fair in that case whoever would build that modifier or that geometry node would probably have many materials here for each thing like roof color um roof material front door etc right window so you know thinking about it from that perspective i think that's actually kind of fair cool so we got materials i think we're getting really close guys we've brought out all our inputs that we think could be valuable we can now set the material we can do all that so i think we're nearly done this tutorial here today next up with our patch we probably want to add our nice logo here i'll save that for another video we will also want to attach this patch to something cool we'll save that for also another video i really hope you guys learned something today within geometry nodes it took a lot of digging and experimenting to figure this stuff out uh i wish i knew this before i started using geometry nodes and there's so much more beyond what i've discussed today um what i would highly encourage you to do is just experiment right kind of like we did today just like you got an idea you're kind of curious about something uh poke around with it and like the more you kind of understand how things can relate and work together and like those core tools like switches are super cool right um all these different little operations we can do now once you have that foundation you can kind of like go crazy and you know you're you're gonna be continually exploring i i doubt you'll ever really understand every single geometry node and if you do wow that's incredible good job but at least hopefully now you have a little bit of that foundation to help give you a bit of a kick start uh working with geometry notes so thanks again guys thanks for joining me today and i hope to catch you down the next rabbit hole
Info
Channel: Rabbit Hole Syndrome
Views: 166,781
Rating: undefined out of 5
Keywords:
Id: VlSs430PAeU
Channel Id: undefined
Length: 84min 13sec (5053 seconds)
Published: Mon Sep 12 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.