Array Modifier GOOD! | Geometry Nodes Blender 3D Free Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi in the last video i said that the area modifier was bad and i showed you why it's probably not the best solution for certain situations so this video is called array modifier good and i'm gonna show you why and how you can make use of the array modifier in geometry nodes so let's jump right in [Music] all right here we are back in blender 2.93 alpha and of course with geometry notes first thing we always need is geometry so how about we go to the center here we shift a a plane go into edit mode merge everything at the center so now we have exactly one vertex which you can see over here now on this object we're going to add an array modifier and probably let me do this um go to constant offset and go one meter so now we have two and if i set this to 100 now we get this line of vertices 100 vertices right and since we have a constant offset of one meter we know that this one is at position zero and this one is at position one two three and so on and so forth now we can't really see anything so let's also go in here add in microsphere maybe hide it we know it's there and we go back to this object down here we go to geometry nodes create a new node tree and zoom in a little so now we have an array modifier and the geometry nodes modifier coming after the array modifier and now of course we can go to point instance maybe all the way back here plug in our icosphere and now we have 100 ecospheres we can also do point as scale because the icospheres are a bit big switch this to vector and maybe 0.3 0.4 something like that so now we can see that we have 100 points all in a row all done with just an array modifier and the geometry nodes right but that's just one line in the last video we had a grid can we do it of course just plug in another array modifier of course we have to be above the geometry nodes and then we go constant offset 0 on the x but 1 on the y and now we have a grid cool can we do three dimensions like in the last video of course just add another array modifier plug that in again before geometry nodes um we're gonna do constant offset zero on the x but one on the c and now we have this three-dimensional grid full of icospheres it's kind of a lot so let's just do 20 by 20 by 20 so that the viewport is still fast and snappy and now we lost our uh geometry notes input or note 3 down here and all you have to do is go here and activate this modifier to get the note 3 back so this is a very simple note tree and yes the array modifier is good for this kind of stuff because you can generate a geometry which you need in geometry nodes and if all the geometry you have is just a single vertex then the area modifier is perfect for that so if you want a one or two or a three dimensional grid a very simple grid you don't need animation nodes to create the grid you can do it with area modifiers now it's up to you if you like the animation nodes version better that i showed in the last video where you have a real grid node that you can set and you can define the sizes and all of that or if you like this version better with the three array modifiers i personally kind of like the animation notes version where you have a node and you can set your grid on a single node and you don't have to go in here um into the modifiers i wonder though if maybe sometime in the future they're gonna put generator nodes into geometry nodes because simple things like grids which are like used a lot needed a lot maybe you could we could just have a like a point generator grid point generator something circle maybe we'll see um until then you can either do the geometry nodes i mean the animation nodes thing with the grid and then use geometry nodes after that or you do the area modifiers to get this kind of a cube filled with points so this is the first thing we can do we can use the good array modifiers to uh generate grids now let me get rid of those two so we're back to just one line i'm going here maybe set this to 100 again and now we know that this one is at position zero this one is at position one two three because we have this constant offset of one meter right so how can we do something a little bit more interesting in geometry nodes that we can do in animation nodes using loops in animation nodes we don't have loops in geometry nodes why would we want a loop because the loop has an index so if you have 100 nodes or 100 points in 3d space and you can loop through those 100 points you get the index and you can use that index for maybe a mathematical function right now in in animation nodes we have the loop nodes and it has the index but here we don't but think about it we do have loops in geometry nodes in fact every single node in here is a loop right this is a loop it loops over every single point of the geometry and does something with it it scales the point this is a loop the inte the i mean there's a loop inside of this node it visits every point and instances the icosphere to that point if we look at the attribute nodes let's just pick one attribute math this is a loop it it does something on each point of the geometry that you plug in here so this loops through all of the geometry if somebody says hey we don't have loops in geometry so we can't do anything cool that's not quite right every node is a loop so how can we use that well think about it if for example we have an attribute separate xyz node and we can use the attribute vector position oh by the way this is new i think i downloaded blender yesterday the latest version 2.93 alpha you now get sort of like a selection box of all the possible attributes which is awesome because now i can just simply click on position if i separate the position of each point here into its x y and z components then x is actually the index right because we know that the array modifier uses one meter so the first one is at zero and the second one is at one two three four so if i plug my x position of the point into a new attribute called i for index now i have the index in an attribute so now each point knows at which position in the loop it is and what can we do with that well we can for example use it for a math function attribute math maybe we want to do something very easy sine like those sine waves we take our index i and we plug it into a new attribute called s so now we have a new attribute s which is the result of the sine function and what can we do with it well how about we attribute um combine xyz um we're gonna put the the i that we have so we want an attribute on the x which is i so that they stay in their positions here along the x axis and on the y axis we take the attribute our sign function and the result of our attribute combined here should be the position and then we have the sine wave on our line of dots here now we need a little bit more math right so this is the function that makes everything happen but we have to do some stuff or we can do some stuff before we hand it off to the math function or any other complicated function that you can come up with you can create sort of a complicated note tree in a node group that you plug in here so what can we do well how about um we plug in another attribute math in here and we do something with our i attribute right so we take the i we the result should be the i and we want multiply by the float so if we multiply by one we get our original thing if we multiply by something or if i slide this over to the left you can see i'm sort of compressing my array of 100 dots into a smaller space so if you think about it if if you have like an analog digital converter or something like that you get more samples so this is our factor now to get more samples along the sine wave maybe let's set it to 0.2 then also we can plug in another node here just to show and we set this to add and this lets us slide uh the offset right so multiply is shrink it or stretch it add is always move it along the the x-axis in this case because we're moving the the i uh variable so here we can slide it i probably don't need this node but we can do that and after our sine wave here let me move this over to the side a little after we can also do stuff again we can take a math node and in this case we want to mess around with the s so we want to change s and set s and you can already see here we can set the amplitude okay by multiplying the the sign result the sign is always between negative one and positive one so by multiplying it we can uh increase or decrease the amplitude cool now how can we change the frequency well we are going to have to mess around with the i because the i is uh going on the x-axis which is the frequency so how about we multiply the i with a certain factor and there you go this is the frequency this is the amplitude this one here is sort of the the sampling frequency and this one here is the offset of course this is just a very simple sine function function here but like i said you can do crazy stuff with this now because you now have an index which you can loop or think as if it were a loop right just because we took the the position and we know that we are using one meter on the array modifier which gives us an index now how about we want to make a circle can we do that of course we can all we need is sine and cosine cosine is the the other one right so sine cosine plug that in here and here we take i our index and we sign it assign it to a new attribute c for cosine so now in here coming out of here we have a sine in s cosine in c um maybe let's clean this up a little or i don't know let's we don't need this um this i anymore right we want to multiply the c and result in the c and we're gonna use the c for the x i have to click here and this the cosine the sine or the other way around doesn't matter and we get a circle perfect circle and here we can stretch it along the x and here we can stretch it along the y now why do we get these sort of groups that's because we have way too many dots in our area here so we get this right or we go back here and increase our sampling frequency with our first multiply and we crank up the area here to get back to a circle now we have a nice looking circle am i in top view yes so now here this one stretches along the x and this one stretches along the y your videos are pieces of art wall art print my video extracts up to 20 000 frames from your videos timeline compresses aligns and enhances them and even overlays the audio waveform and carefully bends everything into a perfect circle after they manually optimize and quality check each artwork you can either download a high resolution image file to print at home or at your favorite print shop or they can hand the picture off to a professional printer near you for perfect prints with high quality materials print my video have printing partners all over the world to cut down on shipping costs be environmentally friendly and support local businesses any video can be printed and preserved for eternity your wedding the best vacation ever your favorite music video anything goes head over to printmind.com and hang your own vibrant beautiful one-of-a-kind video print on the wall use the coupon code crispy at checkout to get 10 off now let's do something i haven't tried before but this is exciting we want to see if we can do it in one of my tutorials about animation notes i think it's in one of the beginners series somewhere i have this two-dimensional grid of objects and then i have the sine wave going in in one direction the cosine going in the other direction to create sort of a like a wavy grid of objects or like the surface of water i don't know so let's take this idea that we have here into sort of two or three dimensions right so how do we get started well let's see maybe we just should just start um with let's do i don't know let's add first of all add another array modifier we're gonna have to put that on top here uh on the first one we are going on the x so on this one we have to go on the y to get that two dimensional grid we also we're just gonna do 100 here and 100 here so we know what we have then we get into geometry nodes and what we want to do here is none of this here so we take the position we take the x let's just plug this into x plug the y into the y attribute so now everything is empty of course now at the end here if we if we just mute this for now at the end we want x in the x y and the y again and c probably why isn't this x x right so we have this grid cool okay very nice it's quite big actually but that's okay um and the c is going to be the result of our calculation so let's just plug in our attribute c that we now have to sort of in here you know what i'm just going to delete this because it's confusing um generate right so we're going to take a an attribute math set it to sine take the x position for the sine and result that into c maybe yeah okay so we already have sine going along the x now of course uh we want to change the the frequency here so we're gonna do attribute attribute math i'm going to take our x result in x multiply by a float and then we can stretch this out a little or bring it in a little we also need that stuff in front of the sign another multiply but here we're gonna also mess with the x here okay so let's do this and then stretch it out like this to make it looks nice okay so here i'm increasing the sampling frequency here i'm decreasing the sine frequency so we already have the x done now let's do the same thing with the y uh we can do that just after so we're gonna need a cosine where is it cosine and here we're not taking the x we're taking the y and we're going to result in c which messes completely destroys everything we did in front here so maybe we're going to put this not into c but into s and and the cosine we put into cosine and then we plug it all in back here with another attribute math where we um what should we do shall we add sine and sine and cosine i guess you have to click the click it here you can just type and result in the c and then we have this but just like with the how do i order this a little bit better here so this is cosine add after cosine this is all the sine stuff here let's just put it a little bit together like this and then i need another factor going on the y here so y and result in y ooh and it already looks kind of cool so let's do this maybe and then oh this is the the final ad right so and back here we're gonna multiply the uh the c the cosine and result in cosine so we have the amplitude here let's do something like this and then we have waves going this way and we have waves going this way and so basically we have one note 3 here we don't have loops like in in animation nodes but we can still do the same thing like in that other tutorial that i showed okay now there's one thing i want to mention here with geometry nodes because um i'm still not getting used to it and that's the fact that if you look at this note 3 you have no idea what's happening they're all blue nodes because they're attribute nodes it's all just geometry piping through and you have to follow each note and think about what's happening to know what's happening because it's not it's really not obvious right if i take for example a shader note tree let's look at maybe this one go over to the shader editor here let's look at this big we know that the principled node is a shader node and on top we have the colors in the middle we have sort of the settings like roughness and all of that at the bottom we have the normals so we know that anything coming up in in at the top is going to be colors right so just looking at this note 3 we know that all of this which is coming in at the color here the color input here is somehow responsible for creating colors then we have different nodes and they have different colors and they have different inputs and outputs and the input and output sockets have different colors because they have different data types so it this is very it becomes very easy to read what's happening here because of those differences here we have a vector purple and the purple vector node has a purple socket which goes into a purple vector socket right so looking at this or if you have something down here maybe like a texture noise texture and you plug that into a vector bump node and you plug the color into the height and you plug that into the normal just if you look at this even if you don't see any of the values or settings you know okay this is color this is for bump mapping or something vector related or if it goes in here with a displacement node in between you know it's displacement so this is very easy to read now let's go back to geometry notes and look at this and this is impossible to read it all looks the same it's all just one long spaghetti of the same note doing something and you have no idea what it does unless you start at the beginning and you think about okay here we are ripping the position apart into x y here we are multiplying the x with a float and the result is the same x and then if you go through this then of course you know what's happening but it the the overall uh the image or the the feel that you get when you look at this is very confusing i don't know how about you but this is this is still i'm still struggling with this and i don't know if there is a way to do this differently to visualize this differently to make the note 3 readable especially if i give you this note tree now and you download it from my patreon and i'm not telling you this what i'm telling you here in the in this tutorial you don't know what's happening you can start playing around with the values and then maybe you know what each note is good for right now one cool thing that geometry notes introduces is something i haven't talked about in any tutorial before and that is this little tiny socket here and this is really quite awesome um because just like with material node groups you can pipe certain attributes out here into the group input node and then they become available over here so for example let's say what is this this is our x sample frequency maybe that's not very interesting this is our y now let's take um let's take this one that's the x frequency right the x frequency so i can take this plug it in here and look at that it becomes available over here we can even go in here node go to the b node give it a name call it x frequency and then you have a nice label over here and now you don't have to go back into the note 3 to change something so maybe if you're in the shader editor and you're doing materials you still have that x frequency out here and you can still change it over here and of course you can go back into geometry nodes and you can pipe other options like for example the y frequency also out here again name it y frequency and then you have this slider here and you can change the y frequency of the cosine am i doing this right ah it doesn't matter you get the idea you can pipe stuff out here and now when i saw this the first time that just like with a note group where you can do stuff like that let me show you i'm sure you've seen it before but just to be sort of feature complete here in this tutorial i'm sure i have some sort of material in here where i have a note group let me see yep so this is a note group metallic car paint it has inputs and it has one output and if you go into this node group with tab then this is actually the node group and it has this group input it has this group output and whatever you plug in here here you can also see this empty new socket and whenever you want to pipe something or it makes make an attribute available on for the user of the node group you just plug it in here it becomes a new input and all of the inputs that are here are also here all of the outputs that are here you can plug in more as you can see there's this empty socket here become available here so this is the note group that we've had in the blender note groups or note trees for a very long time but now geometry notes takes this one step further and makes attributes available to the user of the geometry node 3 out here and when i saw that i thought first thing i thought was well why not make this feature available for shader no trees as well let me know in the comments down below if you think this is a good idea i that was the first thing i i thought why doesn't the shader node tree have an input group where i can say okay you know this value here where i already made a value node so that i have one place to change this value why can't i make this available on the outside here maybe somewhere in the the material uh tab so that when i'm on this cutting board material maybe in here somewhere down here i have those values available those sliders so that i don't have to jump into the node editor to change it what do you think let me know in the comments down below i think this would be awesome and also since we're at it and i'm complaining about what i'm thinking about things that could be better please somebody make it so that all of these parameters here have input sockets so that we can pipe them into group inputs and make them available to the outside world to the users i don't know why none of these options here have input sockets and i'm talking about of course the compositor nodes here the compositor is one of my favorite tools in blender but it's very hard to make reusable node groups for other people maybe to use or for yourself to use maybe as an asset in the asset browser just because like most of the inputs in compositor nodes are not available with through input sockets i cannot change this x i have to go in here and change it on the node this is very annoying all right enough i'm done thinking about cool things that blender should have and that i wish were there that's it for this tutorial i hope you learned something new and if you did please give the video a thumbs up consider subscribing to the channel i'm all about blender here if you're interested in animation notes check out all the other tutorials here on my channel it's all free and animation notes is cool i keep getting the question do you think that geometry nodes will replace animation nodes maybe sometime a long time in the future but always think about the name already tells you geometry notes is about geometry and animation notes is so much more you can do everything with animation notes you can script things in animation notes regarding colors and materials and actions and all sorts of things not just geometry so i do think we will see some sort of generators maybe in the future so we don't have to do three array modifiers and all that um maybe we get a grid generator a circle generator something but um i think there will always be a place for add-ons like animation notes okay enough said thanks for watching crispy out [Music] you
Info
Channel: Chris P
Views: 15,846
Rating: undefined out of 5
Keywords: cg, 3d, blender, blender3d, b3d, tutorial, how-to, training, learn, eevee, cycles, geometry nodes, geometry, nodes, array, modifier
Id: Qva1MzGtNC8
Channel Id: undefined
Length: 32min 52sec (1972 seconds)
Published: Sat Mar 06 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.