proceduralism... with 10 NODES - Blender Lengthy

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] [Applause] [Music] so the question is is it possible to achieve very complicated procedural results with very few nodes and it turns out that the answer is yes this procedural result was made with this few i mean exactly 10 nodes which really illustrates the point that if you know where to place your nodes and you know some of the math and the theory behind everything you can kind of achieve arbitrarily complex procedural results with very few mathematical operations and in fact for this result that i'm going to be showing you how to make and i'm going to try to explain everything for this one some of these nodes i wouldn't even say count so you can see i'm making this kind of pulsing very complicated thing i don't know what it is but some of these nodes are the material output node which is something you need to have for every node networks i wouldn't even count that call that nine nodes uh we're repeating this length operation a couple times that's kind of a bit repetitious texture coordinates i don't know if people count that but uh point is there's very few mathematical operations getting us from texture coordinates to here and it's not even something that we don't have control over when i say procedural i mean procedural so for example uh some stuff that we can control is this number which we're i'm going to explain what all this does but i can make this bigger and this gives us like you know a denser grid of circles pulsing or we can make that lower so that's one thing we can control another thing we can control is the speed of this so i can make it nice and slow or faster you know that's up to me that's in my power i can do what i want and finally we have this slider which is kind of like a mystery slider we'll talk about it but just this one slider gives us very very different results depending on the value it even looks like it's nice and slow and then it speeds up so long story short what is this tutorial this tutorial is me empowering you with the weapons to fight people with proceduralism i'm arming you but um maybe don't go to war with this i don't know what i'm talking about let's get started so this is what i'm going to show you how to make and i think it's probably best to start with a new blend file so let's start off with a new blender file i'm using version 2.83 i think that's what i'm using point is just use a version after 2.82 and you'll be fine because we need to do a certain mathematical operation that has been added since 2.82 so basically how do we make this thing it starts off with the modeling let's get rid of the cube and replace it with a plane and you're done you've done the modeling you know that's 50 done with the tutorial already look at you the blender champ so once you have your plane we're going to go to the shading workspace and i'm just going to look at this from above it's fine to use ev you can use cycles i don't really care but as you probably expected all this proceduralism actually comes from the material uh not the modeling so once you have the plane and we're looking at it from above we're just gonna make a nice complicated material and by complicated i mean simple because that's the point of this tutorial okay so let's make a material i'm not going to have anything going to the material output so i'm going to delete that at the sdf so right now nothing is going to the surface and it's black and that makes sense i'm going to shift a to add some texture coordinates and i'm going to try my best to explain what's going on but not kind of hammer you over the head with like oh you don't even know how to move your mouse you idiot um no we're going to keep it like intermediate okay so we are going to be using texture coordinates and the name of the game is how do we go from here to here with the manipulation in between to get that nice result that you saw before so first of all i am using object coordinates why because basically the whole pattern that i showed you before is circles that are getting bigger and smaller it looks like there's more going on but that's really it and to make circles i like them centered at the origin so object coordinates do that whereas generated coordinates if i cannot scroll past it the origin is in the bottom left corner same for uv coordinates so object coordinates have this nice so the first question is how do we make a circle or a torus because you know that that's the thing that we're going to be doing the fast method is you're going to be using something called vector math so instead of doing a mathematical operations on float values x y and z independently we treat this as a vector do it all at the same time that's the idea and if at any point you don't know what's going on just kind of copy the nodes and play with them and you'll get any an intuitive understanding so first of all how do we make a circle i'm going to set this to length which is going to output the length of these vectors which kind of looks like this nice radial cardinal map um it's going to be zero black and the middle because that's where the vectors have a length a magnitude a scale of zero and as we go further out radially and in this case we're talking about 2d because it's a plane but this would also apply to 3d so it's more like a spherical gradient it gets bigger and bigger and bigger closer to white cool so we've gone from a vector to a scalar to a single number which means we can now start using our math nodes and specifically you might use something like greater than or less than to control the radius of the circle forget that we're going to be doing something much better which is the compare node the compare node has two options the first one is going to be something like the radius depends how you want to define it and the second one is going to be the thickness or maybe i have them reversed so let's increase the epsilon and you can see that's giving our taurus a bit of thickness and the first value really is the radius so you can think of this as the you know the size of the torus or the donut and the thickness of it long story short the reason this works is the compare node takes this this first value and compares it to the second and we say okay compare these two and make it white whenever they are within a distance of a radius of 0.19 or whatever epsilon we pick so if we make this epsilon bigger more of that's going to be white and if we change the first value we're going to be comparing different stuff but long story short we made a taurus so now the question is how do we turn this one taurus into multiple tori well this mathematical operation is fine keep it intact but how do we change these object coordinates to be a bunch of object coordinates over and over again so we get a bunch of toruses the trick for this is another vector math node you're going to set this one to scale so we can scale it by any amount which is just going to make it more and more intense the origin is still going to be in the middle so let's say we pick five then we're going to use another vector math node and this is a classic trick i'm about to show you you set this one to fraction and you can see we just got a bunch of texture coordinates now these kind of look like uv coordinates and we'll talk about it but what's happening here is we're taking our object coordinates instead of going from like zero to one to negative one and all that now we're scaling it by 5. so it goes up to 5 and negative 5 and if you fraction it's basically going to round off every time it goes to the next integer so 0 to 5 goes from turns into 0 to 1 0 to 1 0 to 1 a bunch of times over and over which gives us this nice grid however if you plug this into length uh you're going to see that our gradient is centered at the corner instead of at the middle like object coordinates so a tiny adjustment is needed so just set this to add and shift this over by negative 0.5 i believe on x and y and that will center it per the tile okay so we've done that we have the length we have the compare and now we have i mean it looks like a bunch of diamonds but really what it is is a bunch of torai which we can change the radius of so we can actually see the toruses so now you can see we have a donut in each one and this is already the majority of the nodes you can see this thing was only supposed to take ten nodes and we have one two three four five six this one doesn't count seven but i'm just going to keep this viewer node so already uh you might be thinking how do we get from the grid of tori to the procedural uh flashing pulsing thing and this is where it gets interesting so hopefully hopefully you're following along hopefully you're you know you're writing notes here using blender alongside uh let's continue let's continue don't you love it when i put the camera up there and i'm just wasting your time i love it okay so uh long story short uh this uh value or is it the epson basically these control the properties of each taurus equivalently like each taurus is being changed by the same amount they're all copies of each other but if instead of putting in a single number let's say we were to plug in a map well then in that case each taurus would have a different property and that's exactly what i'm going to show you to do so let's use another length node with the object coordinates so again we get this radial map and what i want to do is create a pulsing effect a pulsing map which i'm going to plug into this compare node well how do you do that you're going to need some math notes the first one i'm going to do is i'm going to add which just kind of makes it look like it's getting brighter but you can see how it kind of looks like pulsing if you have the right amount so that's the first thing i'm going to do and we want to add a different amount every frame in fact if we open up our timeline we want this frame number to be pretty much what we add so you just copy so i'm right clicking you copy copy his new driver and then paste driver so you can see right now it's set to 1 then 2 3 4 depending on what frame we're on so that's a driver it controls the value another way to do that is instead if you clear the driver no not copy you clear the driver you can just type in hash frame and it's going to do the same thing and you can see it's kind of getting brighter once you go too high it's hard to tell because it's so white so i'm going to do this i'm going to divide it by 20 so it doesn't happen as quickly and then the trick to make it this nice pulsing thing is you add in one final math node you set this one to either fraction or modulo whatever you want i'm going to use modulo and you can see this is what gives us our nice pulsing result what's happening here is the same way a clock goes from 1 to 12 and then it resets to 1 to 12 to 1 to 12 that's what modulo does it makes it cyclic and since we're adding it's effectively giving us the animation and the modulo is what makes it cyclic and we can make this slower by changing the number to divide by 40 so it's going twice as slow and the nice thing about modulo the nice thing about modulo instead of using something like fraction which is the same idea as up here the fraction the nice thing about modulo is you can control kind of how the modulo works if you have it one it's going to be pretty much fraction or you could have it be 0.1 and it has a lot of rings so once we have this whoops once we have this what we said we wanted to do is use our tori and just kind of use this map to control stuff so if i plug it into epsilon uh i think this is the result that i had in the original you could also plug it into the value and get something entirely different so in this one the tori are changing radius so you can kind of see they're getting bigger and smaller and in this one the thickness is changing and you can see these aren't actually perfect circles they kind of look lopsided a little which is interesting in its own right so you could kind of plug it into either to get interesting results and that's the whole network so let's talk about what we've made and hopefully you can take something away from this so basically wherever you see an exposed number this is something we can control to get a different result since this is procedural for example this is the offset we did to make our grid of coordinates centered now i wouldn't mess with this but if you wanted to you could and it will make different looking results and they're interesting in their own right so that's one thing i'm not going to touch that but it does exist assuming that we have this connected up here so everything we did connected up here you can change the epsilon and get different kinds of stuff also you could do the opposite you could plug it into the second value and change the number we're comparing to to get different results we can also divide by a different number to control the speed of the pulsing and the modulo number to control the density so if we do 0.1 it's going to be the same thing but just 10 times denser and actually that doesn't seem to be the case it seems to be wonky so you can get very very different looking results so here you can see those pulses are very clear with two it's nice and gradual um and in fact if you wanted to i wouldn't recommend this you can always change the coordinates to something like generated and now you have something that looks very different because the circles are converging to the bottom left corner even a bit further since we did that so it looks like it's sweeping from side to side but that's interesting in its own right okay so i feel like you've kind of learned what you need to know one kind of tip that's a little unrelated but could help you're going to notice that when you look at it here it's going to be very strange and this is an eevee artifact if you go to cycles it's not going to have this issue at least not as much but one way to fix this is you just go to edit mode you extrude on the z-axis a tiny bit so you just give it a tiny bit of thickness and it will solve that issue and in fact this is in some sense a three-dimensional effect because all these operations are vector math type of stuff which means it's three-dimensional but you just give it a bit of thickness and that solves that issue so i hope you learned something about the idea of using very few nodes to get procedural results hope you learned something um here here comes the cough didn't do too bad i'm a bit sick but i'm hiding it um if you enjoyed this tutorial the best way to support this channel and i don't want you clicking off i want you to listen to this spiel because i got something important to say if you like these tutorials the best way to support is via patreon why would you want to be a patron other than keeping these channel cg matter in default cube afloat which is a good reason why would you be incentivized to do that well because depending on the tier you could get exclusive tutorials private access discord access as well as bund files project files depending on what i make so you get a bunch of stuff in return just as a product but you also get to directly support these tutorials so that is the best way to support this channel if that is something you're interested in um i appreciate it thank you and for the 400 i like to say 420 but now it's more like a 430. goodbye 420. uh for the 4 30ish active patrons thank you uh for making these tutorials possible and yeah these patrons are keeping this thing afloat join the ship and um yeah i keep these advertisements with you know their personal advertisements at the end to not be distracting for the tutorial i hope you enjoyed i hope you learned something that's it that's the show
Info
Channel: Default Cube
Views: 27,112
Rating: undefined out of 5
Keywords: blender, tutorial, procedural, proceduralism, nodes, node network, material, shader, shader editor, 3d, cg, vfx, cgi, animation, driver, texture coordinates, beginner, eevee, cycles
Id: Dnq2q5-TJeo
Channel Id: undefined
Length: 14min 55sec (895 seconds)
Published: Thu Aug 13 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.