#CGTip | How Do I Understand Maya's Nodes & Node Editor?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello there and welcome to another video what I want to try and do in this video is give you more of an in-depth overview of the node editor now I have actually tried to record this video about three times before and each time I've kind of ended up getting myself confused so I don't see how that could help me explain it to you guys so I'm hoping that this time I'll be able to explain it in a bit more of a simpler way so when it comes to the node editor the way I like to think of it is that it's more of an extension of the connection editor so if I just create a couple of nodes or create a couple of models so let's just create a polygon sphere we'll move that over there and we will create a polygon cube so we've got two objects here if we just go to the general editors connection editor just so we can see this so basically this editor just allows you to connect one attribute to another so one attribute drives another so if I select the cube and click reload left we get the attributes here that are going to drive another one we can open these up so that we can see each the X Y Zed X Y Zed there now if I load the sphere into the right and open these up as well what we can do is we can say the translate X may be from the cube I want the sphere to match that perfectly so if I click on translate X on this side because we're connecting the cubes translate X to the spheres translate X you'll see the sphere has popped back to exactly the same position as the cube if I just undo just make sure that's disconnected now the reason it's done that is because on the cube the translate values are zero zero zero now because we move the sphere we had a value added onto the translate x value and when we're connecting the cube to the sphere we're telling the sphere to use the exact same values as the cube so that's why the sphere snaps back to zero zero zero because that's what the cube is set up now obviously if we wanted to maintain that offset we could just freeze the transforms to zero out those values and then if we connected translate X on the cube to translate X on the sphere we've maintained that offset so now we can move the cube and the sphere is moving in exactly the same way we can also just connect all the attributes at once by selecting translate here translate there and now we can move it in all directions and the sphere is going to match those values exactly so that's just a connection editor and as you can see it's quite basic you just connect one attribute to another or a series of attributes to a series of others and they just match those values exactly the problem is that's all you can do connect from this side to this side we can't do anything in between to adjust these values so that's just disconnect those and obviously we're only looking at the translate rotate and scale here we can show all the attributes associated with each of these objects so we don't just need to work on the translate values so there's all these other values and attributes that are there so let's just close that and let's open up the node editor windows general editors oh there is windows node editor so here we have the new editor so it's a nice window with a grid pattern on the background and here it says press tab to create a node well we're not going to do that just yet what we're gonna do instead is we're just going to bring these to it so I'm gonna select them both and then I'm just gonna click on this plus icon up here and that will bring those in now it will bring the shared nodes in as well but what we can do is you can use - up here and that will remove nodes from the node editor doesn't actually delete them from the scene it just removes them from the node editor so here we can see we still have our connection I open that up which we added previously so let's just delete that for now so we can select and delete that line which will delete that connection so we can open up these to show us the attributes we can click on this little icon here and then you've got those different stages so you can decide how many of the attributes you want to see you can also do the same up here just clicking on these and that's just the same as clicking on these icons to collapse or expand each node so just like we did with the connection editor we can connect translate from the cube to translate on the sphere and in the node editor all you do is you click on the little dot next to the translate attribute and then you will get this yellow line and then you connect that to something else so we can connect that to translate over here and I can select the sphere and then the channel box I can see that it's tagged yellow which means it's got a connection coming into it so just like before we now have the Translate connected on either side now you're probably thinking we've got these attributes here but when we looked in the connect in the connection editor that when we expanded the attributes and we showed the non-key able there were so many more in there well that's what this fee is for up here if you can't see the attributes you need down here you can click on this sphere and then it will bring up all these and you can also go to other and then you've got access to all these attributes here so we could cook select any of those and then we could connect them over here or we could do the same and use this input sphere here and go to other and then you can select a different input in this side and obviously just like a one panel of the connection editor so you can show and hide various attributes over here as well so it just comes all that so like I say it's exactly the same what we've just done is exactly the same as what we did in the connection editor we simply connected one attribute to another this just makes it a bit more graphical and maybe a bit more user friendly because you can see the actual nodes and you can move them around and you can connect them with those nice lines and everything so let's do the translates again connect one to the other and now we've got the sphere matching the exact translations of the cube and we could do it with the rotations as well and we can do it with scale we can even do it with the visibility if we wanted so now the sphere is going to match now I'm using real tape there but we can't really see what's happening so I'm just gonna go to wireframe on shaded C and now we can see that it's rotating as well now it's rotating over here you say we move the cube because they were rotating around its local pivot point so as you can see when I select it the rotational axis is around the middle of the sphere here so that's why we're getting that rotation it's not rotating around the cube as you kind of would if you use the parent constraint so there we're just connecting those attributes so you can collect them all like that and we can just delete them all again so let's go back to our translate so yeah like I said exactly the same as a connection editor you can connect one attribute to another or a series of attributes to others but what makes the node editor a lot more powerful is that instead of just having this connection we could maybe say well I want the cube to move but I don't want the sphere to move as much as the cube maybe I want it to move half the distance well in the node editor we can add in utility nodes in between here and that will allow us to take the values that are coming out of the cube do something to them in the middle and then output them again into the sphere so like I say if we wanted to half the amount that the translate X value is from the cube and then input it into the sphere we can add a utility node in here now the quickest way to get to the utility nodes as we saw when we opened up the node editor in it originally is to press tab now this brings up this little box and if we know the utility nodes that we want to use we can just start typing the name so I know that I want to either multiply or divide the apt the translation values from the cube so that we can change them when they get input into the sphere so I know I need a multiply divide node and as you can see as I'm typing it will just brings up all those associated nodes with those letters so I can select a multiply divide node here and I'll just expand this all right less and I'm just going to open the attribute editor as well so we can see a little bit closer in fact I'm gonna close the outliner we don't need that anymore so the moment nothing's connected so we want to take the translate values out of the cube and then we're going to put them into the multiply divide node now down here we've got input x y&z so we could connect X Y and Zed we could connect X to Z we could connect Y to X the names don't really matter they only matter if I connect a translate here to input 1 then that's automatic automatically for us connecting X to X Y to y and z to Zed we could delete that and if we wanted to change it individually we could connect X to Z Y to X Z to Y so you don't need to do it directly X to X you know do you don't need to match them up so you can pretty much ignore what the X Y Z down here is unless you are sort of working and you want to know that translate X goes into input X which will then output X and it just keeps things a little neater for you so for us let's just connect translates to input 1 if I select that node we can see up here input 1 and this is getting the X Y Z translations from the cube and underneath we can see we have input 2 now the operation is set to multiply but you can also have change it to divide or power depending on what you it is you that you're wanting to do what this will do is it will multiply this input 1 value here which is in the X column by 1 it will also multiply the Y value by 1 and the Z value by 1 so we can change those to whatever we want and they will be multiplied by the they values which are in the input one column what will happen then is once they've been multiplied or divided depending on what you want to set it to it will then use the output value here to spit out that value and then you can connect that to something else so let's just connect output to translate because we just would want to work on all X Y Z on all three attributes so if I go back to the channel box so at the moment if I move this we're getting exactly the same result because we've basically said we want to connect it one-for-one so just like the connection editor and that's because a multiply divide node is telling these values to be multiplied by what down here but what we can do is I can say well I want that to only move half as much so let's multiply it by not point five so now when I move this you see the sphere is only moving half as much because it's taking the translate values multiplying them by heart what multiplying them by not point five using this multiply divide node and then outputting that into the sphere so that's just an easy way of adjusting the amount one object is moving if it's being told to follow another like I say you can choose various different operations so if we set that to divide you see now it's moving twice as much we can then change it to power and it's just shut off somewhere else because that value is obviously just far too high so I'll switch it back to multiply and these attributes down here input to the input to XY and Z we could add an attribute onto the cube which then connects to these attributes here so we can adjust that nor point-five value without having to physically select the multiply divide node but that's something a bit more advanced you know if you're building a rig and you're using controls rather than having the animator have to go in and select the actual utility nodes so that's just one node and that's one that I use quite often another node I use quite a lot is the reverse node and what that will do is that will take one value and basically flip it you can also do that in the multiply divide node you can set this to minus one maybe so rather than one we'll set them all to minus one and then that's going to invert how this moves as you can see I move up the sphere moves down I move in the sphere moves in because it's moving in the opposite direction so we can do that with that as well so if I delete this and I type reverse we can create a reverse node here and as you can see it's only got one input because we don't need another value to compare it against because this node just says just reverse it so if I input the translate into the input so again X is going to X Y is going to Y Ted is going to Zed and then let's just take the output and put that into the translate value of the sphere you see we're getting a similar result so if you're wanting to invert a value you can just use that or you can use a multiply divide nerd it depends on the rig you are building and what you're wanting it to do what I tend to use reverse nodes for a lot is if I'm building a system where I need to switch values between 0 and 1 so if you look at some of my earlier videos particularly with AI K and FK blending if you've got an attribute that you're blending between 0 and 1 which will blend between AI K and FK you can use a reverse node with a constraint node and if you've got two weights on that constraint node you can sort of invert one value so one constraint will be 1 and the other one will be 0 and vice versa but that's probably getting a bit more complicated for this particular video again if you want to see a lot of these nodes in action please just look back over my rigging in Maya series I show how to use them a bit more in depth like so this video is just a basic overview of just the node editor and some of the nodes I use a lot just trying to get across those key principles behind it so the reverse node is a good one let's just reset these so another node that I use a lot of is the condition node and this is getting a little bit more sort of complicated now so let's type in condition now there is a color condition but I want the actual main condition nerd so if we open this up there's lots of attributes in here so this can get a little bit confusing so I'll try my best to explain it across to you as well so what the condition nerve does is it basically takes two values which it uses the first term and the second term and it will compare them using the operation so in this case for the first term and second term it will check if they're equal and then it will do one of these values down here which is true if it's not equal then it will output these values down here which are false so if I move down here we can see lots of different operations so we've got not equal greater than greater or equal less than or less or equal so let's say we wanted to check if the first term is greater than the second term then it does outputs the color if true value here if it's not greater than the second term then it will use the color if false value down here and down here we have three attributes just like everything else and these are your X Y Zed and down here X Y Z but if you look at the condition node itself it calls it RGB and down here RGB now that itself can be a little bit confusing but you've just got to put that what put that aside and kind of ignore the naming conventions if we input the translate into color a false for example we're outputting XYZ and it's going to go into RGB but it's going to think that that's XYZ so like I say you have to sort of put aside the naming conventions because they can themselves be a little bit confusing they're named like this because they're traditionally used more for building shading networks and things so that's why a lot of the nodes will be referred to as RGB rather than XYZ but like I say just try and ignore that and put it to one side and if I'm using something and I'm outputting XYZ values in my head I'm automatically converting RGB to XYZ so that can be a bit confusing but you've just got to sort of ignore it in a way so let's get rid of this so let's put this into practice so let's say if if I move this Q Bob I want the sphere to move up as well but if the cube moves down I want the sphere to stay where it is so we know we're working off the cubes translate Y value so that's the main attribute so let's output translate y into first term so now if I raise a cube in the condition node we're getting that translate Y value here which is four point not six one so what this is going to do because this is going to say if the first term is greater than the second term which it is at the moment because it's plus four then we want to use this value here are all three of these values depending on what you're going to do if I move this down so now the first term is less than the second term so it's going to output false because it's not true you know it's the opposite because it's less than so what we can do now is we can say well we want the Y value we want the sphere to match the Y value of the cube so I know that if the first term is greater than the second term then we want to use this value so we want to use the Y value of the cube so I can connect this to color if true are appear so we want the translate Y value color if true are which is that so if the first term is greater than the second term then use the cubes translate Y to drive the sphere if the value is not greater then use color if false now we don't want this set to one because well let's just leave it at one and see what happens so now I've got that set up I can use my output attributes here and because we're using the first column that's out color R so let's just connect that to translate Y on the sphere so now you see it's jumped up if I move the cube down you see the sphere stops moving once the cube hits a negative value if I move it up again the sphere continues moving now there is a little bit of a jump there and that is because we're telling it to use color if false when this is a negative value so that is getting automatically set to wand when it's told to ignore the cube so if we set that to zero it will put the sphere back on the floor level so now we can raise that up and the sphere follows we can drop it down and then the sphere stops so that's just a very basic overview of the condition node and it's just really good for being able to check two values against each other and then you do something depending on how those values differ in this instance we were just checking if the first term was greater than zero so that if the cubes translate Y is greater than zero then the sphere uses that translate Y value if not leave the sphere at zero and obviously you've got all these other operations here to play around with to get those results that you're looking for so there's one of the nodes that I do use quite a lot of as well so let's just delete this condition node let's just make sure those are all zeroed out that's it so let's say we had two objects so let's create another sphere actually let's create another cube move this over here so let's say I wanted the sphere which we have here to follow this cube but I also want it to follow this cube as well and I want to be able to blend between the two and decide which cube I would prefer to follow or maybe I want to follow a 1 cube a little bit more than the other so let's just get rid of these but you using this - up here actually I think should have kept that cube in get rid of the shape nerd open this up so let's move these two over here maybe speaker so I want the sphere to follow up both of these now we could use a constrain you know and use a parent constraint and constrain it between the two and then rig up some sort of attribute which controls those weight values and blends between the two maybe using a reverse node like I talked about earlier but instead I'm going to use a blend colors node so I'm going to type in blend now we have blend colors so I'm gonna open all these up and again there's lots to play around with here but you're starting to see some familiarities between this and the other nodes again we've got RGB instead of XYZ and that's because this is like I said traditionally used for shaders for working with RGB values but we can also input translate XYZ values well anything X Y Zed values into any of these so we want the sphere to match the values and go between the cubes so it makes sense that we need to pipe in the translate values and we've got color 1 and color 2 so that's basically object one and object 2 so we want to reuse the translation values so let's connect the translate attributes to color one and then on the other cube the translate value to color 2 so here we can see up in the channel box we've got color 1 RGB color to RGB but as we're using them they're XYZ so what we can do now is we can use the output and connect that to the sphere so that's moved here now if I move these cubes around you can see the sphere is following that cube and it's also following that cube and it's kind of moving halfway between either of them and that's because if we go back to the blend colors node the blender attribute is set to not point five so that is making sure that these values here it's kind of going halfway between each value so that's why I getting half the movement now what we could do is set blender value to one and then that's just going to tell the sphere to only follow that cube we can set the value to zero and that's going to blend it back to color too so then it's not going to follow this cube it will follow this cube so we can then adjust that to any kind of value so maybe we just want a slight influence from this cube with more of an influence from this one and we can do the opposite and increase that so we've got the opposite happening a slight influence from this cube and more of an influence from this one so there we could connect the blender attribute again to a control node or a control curve or anything basically and then you can add an animate a friendly name to it like blend or I kfk blend or something and then the animator can just blend between two of those two nodes or those in this case those two cubes so this is a really handy attribute to have as well now there are lots and lots of other nodes available if I go to the hyper graph or the hypershade sorry we open this up so if I look down here and go to where are you utilities basically these are all the utility nodes you can use if I scroll down you can see there's just so many of them but a lot of these can be really useful depending on the kind of rig that you're using but I can understand why looking at all these you could feel you know it can be quite intimidating just looking at these different nodes to be honest a lot of these I'm not even sure what they do because I've never used them a knife in all my years of rigging I've never felt the need to use them what I do like to do occasionally though it's just experiment with them I'll just create a couple of nerds like we have here or a couple of objects like a sphere and a cube and I'll just throw these in to the nerd editor and I'll just play around with them just so I can get an idea of what they do and then when I know what they do I can then imagine oh actually that's how I could incorporate it into a rig so that I can make this process easier you know so I would recommend experimenting with these nerds but the Nerds I've shown you so far are the key ones that I always use and I think they're very important and it's good to have a good idea of what each of one of those does just so that you can then like I say stop thinking ahead to how you can incorporate them into your rigs now that is just a really basic overview of the node editor I mean obviously we've got lots of other things up here we've got the menus you know we've even got things like you can add in extra tabs if you want to keep these particular nodes in this window here so that you can get back to them quickly you can create another tab and add another nerds in here you know so these there's extra little things like that but with this video I just wanted to keep it really to the basics and get the ideas behind how you use nodes I don't want to start getting into more advanced areas where we describe what every one of these buttons does because to be honest a lot of these I never use so I don't see the point in explaining things that I don't use I'm just you know just to make this video a bit longer at the end of the day so long as you know how to create utility nodes how to connect them up and you've got a basic idea of what the nodes do and how you can use them on your rigs then I'm quite happy that you know that because you can then expand upon your own knowledge and find out more later on or watch some of my other videos where I do go into a lot more detail about these nodes and you can see them in action as I build the the various rigs with them but I think for now I am going to end this video here if there's something you're still not clear about then please get in touch or feel free to join my facebook group because I answer I find it a lot easier to answer questions through that because you can post pictures and videos and things it's easier to visualize things than using you know YouTube comments they're quite restricted so if you've got any questions I suggest you sign up there and just throw them in there at the end of the day it's a group so if there's something I can't answer somebody else in the group could probably answer it so I hope you've enjoyed this video if you have please let me know in the comments below also let me know if you have any questions and tell me what future videos you would like to see and why not say thanks and also an exclusive rewards with a small donation via my coffee page as always remember to like this tutorial and subscribe to my channel and remember to hit that Bell icon so you're kept up to date with notifications on future videos and posts this is aunt C GI signing off and I will see you on the next one you you
Info
Channel: antCGi
Views: 9,267
Rating: undefined out of 5
Keywords: rigging, maya, autodesk, maya3d, rigging in maya, utility nodes, condition, multiplydivide, connections, rig, multiply divide, node editor, nodes, 2019, maya 2019, gamedev, game art, game development, game rig, game rigging, blendcolors, blend colours, reverse, how do I
Id: fTfUlTmlGtk
Channel Id: undefined
Length: 34min 17sec (2057 seconds)
Published: Thu Dec 12 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.