Maya: Intro to node editor

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone this is kind of a break in the regular programming here with my real flow tutorials in this first of many I hope videos I want to promote the will to kind of start looking under the hood and working a little bit with technical director direction and kind of how things work inside Maya when you when you wanted to start doing things procedurally or kind of start thinking about doing things more effectively and so in this first video I wanted to introduce you to the node editor and how that works so that was going to be very basic entry-level thing as long as you have some basic knowledge in Maya so I will kind of assume that you have that and so in this simple scene I have three objects and I must just want to show the node editor right now I have it as a tab here but you if you don't you can go to windows node editor and then you can kind of dock it down here if you want to so the first thing to notice is that whatever you're doing inside of the node editor or in the scene I mean it's gonna be reflected by default in the node editor so as you keep adding objects to your scene the node editor is going to keep getting populated with these objects so it's good to either you know you can you can disable auto add to graph on create if you want to and that's gonna stop that from happening or you can just accept the fact that it's gonna be a little messy like this and then once you actually want to get into action on an object you can use these three buttons here so I could for example clear the button to get rid of everything I can select an object and click the plus button to you know just get the selected object add it to the graph and then I can start laying down my nodes or if you have several objects on the graph and one of them needs to go for some reason or it's cluttering your view you can just select it and click remove selected node from graph so it doesn't delete it from the scene or anything like that it's just filtering out what you're gonna see inside of the graph let's take a look at something like this sphere here where I've done a few operations on it you can use you notice the difference when I click plus I only got the actual node and its corresponding parent in this case or the child I mean because what I'm actually selecting here in the view it's the transform node of that object and if I enable shapes here in my outliner you can see that the child node is actually the shape node and that's usually the one we're more interested in and for that reason there's the opportunity of under display entirely disabling transforms so you won't get transforms and we don't really need them that often we will need them in some cases coming up but a lot of times you can do without so you can click to add just the object or what you can also do is you can use these three buttons which will let you show input connections in and output connections or only output connections let me show you what that means so if i click input and output we're gonna get on the peace fear which has a smooth and an extrude we're gonna get everything that feeds into it and everything that feeds out of it so if I click the sphere shape and only do the output connections you may guess that whatever is in on the right hand side it's gonna be shown and then we can also do the other way around if we undo that we can do input only which is gonna show that if I select the poly smooth face node which is not visible anywhere here and in the scene by default and but you can select any operation any node in here and if I just map the input connections I'm only gonna see the initial poly sphere node so it's good to kind of take a step back and think about what a what nodes are and what kind of gets added here so if I if I just click the new sphere icon in this case you're gonna see that I have P sphere a poly sphere note this is the actual known that mathematically creates the sphere primitive and it has the properties for radius and for how many subdivs you wanted to to have so if I turn on wireframe a shaded you can see that I can change my subdiv axis and height and then there's the shape node and the shape note is kind of like the place where where the geometry information is stored so if there's nothing feeding into it then it's kind of locked in a way and the easiest way to illustrate that is by going you're probably aware of the command inside of Maya called delete history so if you delete history everything that's fitting into it is going to be deleted but we're still gonna have the shape but we can only go back and change the amount of Domitian's let's cook something else up here let's just for example add an extrude oh this UI on the Nexus not impressive at all but if I do that extrude for example and let's just click the sphere and map it you'll see kind of creates a bit of circular dependency here but you can really just take anymore this because this is just for the fact of doing that for the manipulator really so I could actually take this connection and delete it and nothing's going to happen but it would be harder to manipulate it after the fact so but now it's a little easier to read so what is what is going on here really any operation if you go to the channel box you may be you may be used to seeing operations as inputs here you may have a thought to yourself previously that well i triangulated or i smooth it or i extruded but now I've kind of kept working and there's no way of going back and changing that I've even had you know like when I was teaching in classrooms I would sometimes you know have like a student who's you know like I smooth it it but then I realized I didn't need to smooth it so yet or something like that or I change my mind so I just went and put the divisions to zero but the smooth note is still in the hierarchy but let's explore here what if we just click and delete you'll see that there's no longer a smooth note here you can actually kind of undo things by going back in the construction history this is what construction history is you know like a string of pearls or note operations that all connect into the geometry so at any point we can delete we can you know unhook things and bypass them so I can go output and plug that into the input of this node so I can just take the output and plug it straight into the in mesh so now I kind of circumvented that extrude face which would be the same thing as pretty much deleting it but sometimes when you delete a node then things will kind of get deleted downstream or upstream so we couldn't sometimes it can be good to get into the practice of kind of experiencing how to reconnect these things but I'm kind of getting sidetracked here I hope you are still with me I wanted to show you that you can also lay out the graph so if you click that everything is going to be arranged nice and clean if you have a lot of things going on then we have these few buttons here which are pretty good for when it comes to making your graph more readable so in this case for example let's say that I no need whatsoever in seeing what attribute is connected to the in mesh because that's kind of like default behavior I guess is showing you kind of the properties that are connected so you can click the first button here it's gonna hide attributes on selected nodes if I select this one and hide then we only see that there's some sort of connection we don't really know what and we can always hover and see that if we need to second button is show connected attributes as we had it before pretty much and the third one is show primary attributes which are pretty much most most attributes so you can see in case you need to connect something else in here that's good and you can also click in this little box here and filter things out so if I needed only the mesh something input mesh I could filter out so it's only mesh so it's easy because some nodes have a lot of attributes and the fourth button is show attributes from custom attribute view I wouldn't say that I necessarily he actually know what that means I guess you can kind of make presets don't quote me on it I don't really you know yeah and then you can turn off that little filter view and you can also toggle between the the swatch size sometimes it's nice a bigger swatches I should also mention that these operations are available through hot key one two three and four so it's usually one two three and one once I would use what's next bookmarks you can kind of if you have a huge node graph you can create and edit bookmarks and you can kind of do that in a way so you can jump between different places in the graph typically I don't use that very much and then you can shoes - let's see these are this is kind of another filter toggle so display any shapes connected to shading nodes or shading groups display only shapes are connected or this do not graph any shape notes attached to shading nodes so that will get rid of any shape known that has a shading node we're getting a little too specific here not something I play around with too much and we saw before that we can pick in the options to auto add to graph on create this does the same thing as clicking this little padlock here traversal depth is something we can get back to later we're getting a little more advanced here but kind of pertains to how much information you want to see on how many levels especially when you're doing containers and things like that next up is toggling the grid visibility pretty self-explanatory and also you can snap to grid if you like so instead of moving this freely around you may want to be a little more organized and kind of snap to grid lines that could be nice last but not least you can do listing in here so if I wanted to for example show everything that has this is like a like a search word things so if I like I don't know the exact name but I know that it has you know start with something so I put in a star for that or an asterisk and then I typed sphere and enter and then it can end with something else so I don't know what it will end with so now it has like you can start with anything have the the word sphere in it and end with anything as an example or I can say it can start with the world poly or and and with anything wildcard and that wouldn't mean Pauline sphere in this case or if you haven't know the exact name you just want to find it in a huge graph then you can use the search for that it's also worth pointing out that you can do several views in here so usually the way I used an own editor is I usually actually forget this and turned turned on so I will work with the scene and it will get populated with a lot of things in here and then eventually I realized okay now it's time to get to work and kind of set up some nodes then you can create a new tab if you like and I will come into that new tab and I won't always drag in the things that I actually need to work with so I might you know only work with this network here for example and I only have the nodes related to that type mesh for example a SVG mesh in this case and you know like make sure that's that no new nodes get added in here so I could kind of have this as my go-to so I work on the SVG imports here whatever I need to do that maybe I need to add in you know like a triangle a node in here or something like that that can you should easily be done so you can have different tabs for that and the different tabs have different settings for that padlock so you can have the scene automatically add new nodes but in this very tab you can kind of lock it down so nothing nothing gets in there and clutters your view but enough talk about a lot of different things let's just take a look a super basic sample and just you know connect things really so what would you typically do in the node editor I mean what you do is you connect things in order to make your life easier I guess so one example would be lets say you're creating some kind of a geo and you need to sync these values so you may want to change the width to I don't know 32 and then let's say you're going to change the height to the exact same value so you own always want this to be proportional so then we could kind of avoid having to change both values by connecting the two together you you cannot own you don't you're not restricted to only connecting different notes to each other you can create connect the nodes output to notes input on another attribute so let's see how to do that we can take the subdivisions height I just pressed the three key by the way to just list all of the attributes and then I can take the the output of the width just by clicking on that output port and I'm plugging it back in to the height and you can see that it turned yellow now because this is no longer interactive this is now controlled by something else or driven and as I scroll my width property the height property gets updated so I want to show you another example so let's say that I am using let's say I have a scene with some objects disappearing into the distance which created this that fast is in the easiest way I possibly could and we're gonna be using depth of field in this scene so let's say that I enable that on the camera now we can actually see that inside of the viewport so let's see which button that is it's that one so we're doing nope it's not that one okay I kind of get it a little bit which button does what because they're not I know tainted so we could go renderer lighting that's actually in this dialogue I think so I'll just do well maybe I just need to enable it on the camera actually let's say we're doing depth of field yes cool and we need to figure out like how big is the focus distance or maybe I just want to be able to animate that focus distance you know it's it's easy to find out where the focus actually lies we can do display heads-up display and we can do object details and we can see the distance on camera for this very object is 29 so if I select my camera and I go back in onset it's 29 you'll see it's in focus but what if I wanted to be able to keep from this it's gonna be a little messy if I all the time I have to come back to the camera attribute editor and I need to keyframe this value so let's say we want to set up with like a focus pole and automate this process the way you do that is let's clear this and I'm gonna select the camera and add it in here so I have the shape node of the camera which is what we need and you can see that the focus distance is what we want so we can type focus and how do we fetch the value that we are going to feed into that well let's just put an object in here that we're gonna use for this purpose so I'm gonna create a locator because that's not going to be rendered so it's nice to have a locator and since I'm by default adding nodes in here that has been added but this time we actually need those transform nodes so I'm gonna enable transform because what we want now is positions and positions are not stored on shape notes are stored on transform nodes so I can actually get rid of the shape node a locator because the only thing we need from the locator is the position but now we need to actually calculate and how do we calculate well if you know the name of the node that you need you can do nuke Houdini style hit tab and just type so let's say I wanted to multiply something I click start typing multiply and then I can see okay multiply divide node and that's not the case here so we click the left mouse button and enable the create node roll out this is very like shading node focused but all the notes you are gonna want are in here so the utility nodes are we're gonna need in this case you can see that that multiply node for example you can also filter here so that multiply node is in here bunch of different you know inverse add things like that but the one we really need in this case is the distance between and we could kind of figure out that because you know we knew that we needed the distance so I just lay down a distance between nodes and I can hit the three key to twirl it out or in this case three key didn't really do much for me so for key it's gonna take two inputs two points really two distances so I will feed in not a point but the translate value because that is kind of like the value that we have the x y&z translate and that is a vector value with three components and you can see that these two match up because they have the same color so if we were trying to connect for example inverse matrix you can see that there's different different data types so those won't line up easily sometimes you need to convert things or just maybe twirl out and if I were connecting you know only the Z value to a value with only one component then maybe I could break it out like that or use some kind of node in between so now I've connected it so I can press the two key now because it was getting in the way so I only get what I really need here and I can't roll this down and I can connect the translate of the second object into the point and then I hit the two key so we could try there's no real way of like debugging this you could actually kind of get you know you could print out the value with some scripting whatnot you could connect this to something else if you needed to let's say I you know I could connect the distance to the translated value of this node in order to just see it printed out but what I'm going to do really it's just plug the distance into the focus distance and hopefully nothing should change because it's roughly where we want to focus but what we're gonna see if we pull on that locator is that this is now going to update to accommodate our focus change I don't know if it's visible let's go to the f-stop and kind of pull that down and really exaggerate this effect this one of those things that it's a little inverted no it's not okay so it's a really small f-stop and now we can pull this around and we could animate it if we wanted to and that's kind of how you would get started in laying down nodes and using utility nodes and connecting things up to your advantage it does nothing necessarily mean you actually have to have you know an object in between let's say that this was you know sometimes you just want to you want data to flow through your scene in a way that is hard to do without creating you know sometimes you can get away with constraints but what if I had let's say that these two were cob wheels doesn't really look like cob wheels now but if I lay them out like that the Y value if they were car wheels of this wheel would drive the Z value of this will and if I wanted to to lay that out we already know the answer obviously because we've been doing this for a while now so let's see the Y value here of the rotate it's gonna go into the Z value of the rotate and then if I rotate this one the other one is gonna be rotated it's a little hard to see actually because I didn't leave very much detail and that's a linear and obviously I'm out of focus though let's snap my camera pole over here so maybe it's a little more okay I see I think I changed something else now pull up that focus reading scale and maybe pull up the f-stop so we can see this in focus and maybe just for illustrating let's pull up for example the oh yeah that was a duplicate so I don't have that construction history there what I was trying to do by the way once you learned learn about these buttons for example this these icons up here make total sense they were kind of new to me in the beginning so you can use these buttons if I select it you know that does have history to navigate between output and input for example so I select the shape node I go to the input node that's gonna take me to the policy linear now you kind of traverse the construction history like that if you want to yeah but let me just do some some changes then to this node and we can see that there's a going on all the way around this is just a quick demo so now we've connected two objects together and obviously you know there are a lot of ways to do these things you could script it if that's faster than why not there are different ways of connecting as well sometimes even you know when you aren't connecting things inside of the node editor you will get another dialog called the connection editor let me just show you how that works so just approve a point I will delete that connection that I had and I will go Windows general editors and connection editor and that's it's an entirely different beast but sometimes it's really handy so I can go down to obviously I don't really need a shape down here but you know that's not what I have so I will go to you can either do them in default order I tend to sometimes want these in alphabetical because it's hard to know the way that they're laid out so I will do rotate Y and plug that and you see as soon as I highlight that a lot of different attributes gets grayed out because they're not compatible with the data type so we have a single value and for that reason rotate is grayed out but if I twirl it out you can see that I can now connect rotate Y to rotate set and that's gonna do the exact same thing as we did before like that yeah and you can see down here just a very fine that has created a link so I hope this was a kind of an overview if you haven't played around with the Noda editor before we're gonna do a lot more practical examples of this and we're gonna plug additional things and this also poses the question of procedural ISM and non-destructive versus destructive and I use so one might argue for example that Maya is not a procedural tool and so what does someone mean when they're saying that well I guess you know to some degree it is procedural because you can keep the construction history even though typically you're you're encouraged to get rid of construction history as much as possible but let's say that I go in and I you know extrude this here and I select these edges and I battle them and I bevel the top node here as well and I select these edges and I extrude them inwards and then I select this edge loop and this edge loop in this edge loop so now we just made some kind of model some kind of model so one might argue that you know we have now set this up in a way by not deleting our history that is gonna allow us to procedurally change things around it's a little hard to navigate this one specifically because of all of those connections to the manipulator matrix so let me just get rid of those in order for us to see what we're doing this is really kind of overkill for this little tutorial but as you want it to be easily readable so we can see we have an extruded face into a bevel and two into an extrude face into a bevel but everything might look dandy and you might think I can now go back and say well I didn't need all this Geo I can pull down to subdivision access for example but think for a second what's gonna happen when we do that and when you're done thinking take a look as I pull on these different attributes you see all of a sudden the entire objects is changing shape and sometimes we have an alien hand grenade and sometimes we have the Tower of Babel Babylon and why is that if I go back to my default subdivision axis of 20 which I had before everything is back to normal and that's because this poly bevel is restricted to a certain number of components and it's going to be you know every component has a number and it's not really easy right now but I will do that in a later video but if I lay down a plane for example you could just arbitrarily argue that at some point there's gonna be like the first vertices and there's gonna be 0 1 2 3 4 5 6 7 8 and it's just gonna go through the entire thing until we reach 10 by 10 which is 100 and you could do the same thing this is the first edge second third fourth and cetera so when I say that I want to extrude this edge I'm really saying that I want to be extruding edge number 1 2 3 4 5 6 but if I change the subdivision axes and all of a sudden everything is gonna get redistributed and edge 1 and 2 and you know maybe edge x and y are not going to be next to each other anymore which is exactly what happened here and then it's just exponentially spirals out of control because these number of components that were beveled were based on this and that is now out of order because this number changed and then that propagates through the entire stack so while you could say that Maya is non destructive and to some degree procedural you really know you really need to know what you're doing in order to keep that proceed listen so if I were doing this in Houdini for example I'm not gonna bring up with you now but I could for example feed a group node into that bevel and say these are the components I need I need to well and then if something changed I could go back to that group node and reselect and nothing would break and that really isn't in the default functionality Maya but that being said you can do a lot of those operations if you just plug in the soup toolkit to your my installation in soup is kind of a like I'm I often refer to it as a mini Houdini inside of Maya and that's something I want to get into in later tutorials as well as a lot of other things that are in Maya by default but soup is going to enable us to do things like define group selections that we can then come back and edit in order to keep the functionality in our stack here because the way that it's set up now is yeah sure it's non-destructive but if I do need to actually change this subdivision number in the beginning then if I do that and let's say I really need the supervisor it comes and tells me this needs to be 12 access well I might as well just delete everything else and start over with the extrudes and the bevels while in Houdini or with soup I could redefine the group selection and I would be good or I could use something like an attribute transfer which like it with a volumetric object like some kind of a just a sphere a NURBS sphere I could define that anything anything inside here is going to be extruded inwards for example so there are a lot of ways that we can can do that we can do groups by you know you know like common expressions bounding objects things like that if we build if we just upgrade the functionality of Maya for a bit so I don't know if that answers the questions but generally I would say that like in Houdini you typically work by putting down these nodes you can work by shelf tools but then you kind of go back and and you adit what you have in your node tree while in Maya you typically work with the shelf tools and then you have this functionality if you need it but it's kind of a caveat that you might not be able to really change it the way you might want to so oftentimes the only thing this contributes is a more complex scene that is more prone to to kind of breaking and this is actually a good illustration also something that a lot of times it's the reason for things to break is that we have too much history and Mayas really built to keep all of that history once the scene complexity starts building up yeah so that's why we kind of oftentimes delete all of the history let's say before handing over our model to a colleague that it's kind of assemble the main scene or something like that but I think we're gonna call it quits for now this has been an intro to the node editor laying down nodes and you know kind of the way things work under the hood in Maya I hope you found it useful if there's anything you think I could improve in the videos feel free to let me know in the comments below and if you think that the video was good then feel free to share it with someone you know who might be interested in prying under the hood inside of Maya I would love to get your input or a thumbs up if that's the case feel free to subscribe if you want more videos like this I will be kind of alternating between my realflow series and this series inside of Maya so that's it for now see you next time
Info
Channel: Davesplaining
Views: 1,037
Rating: undefined out of 5
Keywords: fx, effects, maya, autodesk, cg, vfx, procedural, node based
Id: 4Ym__-F7FgE
Channel Id: undefined
Length: 34min 6sec (2046 seconds)
Published: Wed Sep 25 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.