What are Fields? - Geometry Nodes 101

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to geometry nodes 101 in this session we're going to be learning about how the new field system is actually computed what nodes like position and index those new input nodes what do they do and also what the new ui elements mean you know we have diamond sockets we have dashed lines let's start at the start what do i actually mean when i say field well a field is essentially a function which is calculated at a particular point in space the easiest way for me to demonstrate this is actually with a shader if we have a look at my shader graph here i have a geometry input node which passes the world position into a noise texture so we can think of this as being very similar to the noise texture field in geometry nodes if i grab this plane object and i move it in the x direction we can see that the noise field stays still and if i move it around in 3d space you can see that it is essentially finding out what value the noise has on the surface of the mesh that is very important the noise is not being calculated everywhere you know this field doesn't exist everywhere at the same time it is specifically being computed on the points of the mesh now with a shader this is kind of continuous all over it however with geometry nodes this is going to be limited to particular mesh elements so generally this is going to be vertices but you will also find that you use faces and edges and splines and things as sort of the domain on which you calculate your field so when we say position field all geometry nodes is doing is it's going to return us the position column in the spreadsheet right so that's that's all that's going on now this is also where it gets a little bit confusing the position node itself doesn't really contain any data it's the geometry nodes these ones which have the green header bars these ones are what are computing the field calculation i've got a nice easy way for us to demonstrate this what i have here is kind of a simple setup for displacement i have a noise texture which is being driven by the position and i'm using this noise texture to scale my normal vector and the normal vector is just the direction a unit vector with so a vector with length one away from the surface of that mesh we scale this and put it through a set position as the offset then we get some displacement on that surface so this is all fairly kind of straightforward readable logic we can see the position the noise normal and scale and this might be behaving in a way that you would expect however if i was to go ahead and add a mesh primitive let's take an ico sphere and maybe i'm going to move this one sideways use a transform node and i'm going to join these up and i'm just going to move this one in the x-axis i'm going to give it some more vertices to play with if i add another set position over here right so i have my ico sphere and my cube in parallel i can use the same field calculation on my ico sphere and it's correct it's working correctly and this might seem a little bit counter-intuitive to begin with because it's worked for our cube even though our cube has a different number of vertices it has different face normals so how is it able to work for our icosphere as well which has fewer vertices and different normals how does that work well it's because the position and normal node they hold no data there is nothing in these nodes what's going on is the geometry node the set position here it is reading backwards so the set position is looking at this field calculation and it is putting it in the context of the spreadsheet at this point all it's doing is coming in here and it's saying okay i've got something plugged in i'm going to look at it it's saying this calculation and because of the context of this node it's going to be looking at its spreadsheet at this point and it's going to be saying okay the position is this and the normal is this and when we use it over here in this other position node it's looking at it in the context of the icosphere so it can take a little bit of time to get your head around this you know if we're working with something like spur chalk or even in the old geometry nodes you're working kind of a much more front to back way where you have a list of things and you're processing it as a list in this case we can work a little bit more abstractly that offers a whole load of new opportunities and i would just recommend that you have a little play with it and get accustomed to being able to use your field calculations in multiple different places the important thing to remember is that they are in the context of these green headed nodes so wherever they join into your geometry they are essentially being referenced at that point so that's how geometry nodes is computing data essentially it goes along this geometry line which we can see is now in green and each step of the way it will read backwards if there is a field so it will compile this into the context of the note that it plugs into now the other elephant in the room with the new geometry node system is diamond sockets and also dashed noodles not forget those so what do these mean so we have three types of socket and two types of noodle now the colors we can ignore for now these are pretty kind of consistent essentially the color goes from and two different types of socket if i was to plug in this yellow into this blue down here then we can see that we get that gradient from a yellow to a blue so all that's happening is it's helping us visualize the data flow and the data conversions the sockets themselves though are a little bit more interesting if i were to bring up a bounding box node so this is under geometry bounding box then we can see that we have circle sockets so these round sockets for geometry these are always going to be round for other things like vectors whether it's round or diamond makes a bit of a difference so in the case of a bounding box and in fact let me show you this if i put a bounding box around everything here and view the output then you can see that we have a single box around everything and so in this case the minimum and maximum vector just referring to this point and this point these are a single piece of information these are a single value so it is talking about a specific item and that is what a round socket is a round socket tells you that it is a single piece of information being passed out or in to a node so what about diamond sockets well if i go ahead and add a let's go ahead and add an index here we have a diamond socket coming out the diamond socket just means that this is a field this information is going to be different per mesh element in this case we're talking about the index so it is going to be talking about the row in the spreadsheet if we look at the spreadsheet up here on the left we can see the index is written down the left hand side so each row corresponds to a value in that left hand column 0 to 7 and that is what this index passes out so that is a diamond socket but we also have a third kind of socket which is a diamond with a dot in it if i go ahead and add a utility math node then we can see these here so the diamond with a dot in it means that it can take a field but currently it only contains a single piece of information so for example we have 0.5 here that is just 0.5 it's not a field but it could be this node can handle fields if i plug this index into this socket then we can see that that socket loses the dot so it now shows that this is in fact a field and indeed the output as well we can see that it will be passing out a field the second socket here is still only 0.5 everywhere and so that has the diamond with a dot in it in fact i suppose to add an input value node then we can see we have a circle socket because this always puts out a single piece of information and if i join this up then we have a diamond with a dot because it's a single piece of information but it could take a field and this brings us nicely onto the different kinds of noodle dashed noodles are fields so dash noodles contain multiple bits of information and solid noodles contain a single bit of information so that is the difference there we also have the joy of being able to now hover over sockets to compute their data so if i hover over this bounding box i can see that vector being displayed there just before i finish here i do want to mention my geometry node toolkit if you're looking at geometry nodes and you want to do a little bit more with it i've created i think 84 or 85 maybe new nodes specifically for geometry knows which just do a whole bunch of different things you can find that in the link down in the description below alright in the next video we're going to be having a look at the attribute capture node i'll see you there [Music] you
Info
Channel: Erindale
Views: 13,445
Rating: undefined out of 5
Keywords: geometry nodes, fields, gn, b3d, blender3d, introduction, crash course, basics, tutorial, nodevember, geometry, procedural, parametric, learn, easy
Id: 8FCHcbpnFss
Channel Id: undefined
Length: 8min 57sec (537 seconds)
Published: Thu Oct 28 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.