[Tut] Recursive Subdivision - Blender Geometry Nodes 3.0 Field

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello everyone this project so today this is a tutorial or actually more of a voice recording of this kind of a recursive subdivision animation i'm not going to cover all the topics i'm only going to discuss the major parts so that how you can actually replicate this kind of architecture and in the past i've done a similar kind of concept in animation notes using houdini's approach but due to many limitations in geometry notes we're going to take another approach which is essentially inspired by bbn 19 on twitter so let's start so here we're in blender and the first thing i'm going to do is to make a plane and within this plane we are going to do several things so let's firstly go to the top view and it goes through the item because this plane is a 2 2 dimension which i do not need so let's change this dimension to a one and another thing that you realize we changed the dimension but which didn't change the skill so let's apply ctrl a and apply the skill so that scale is one way otherwise the value is still not correct next thing i'm going to go to edit the mode and i think i'm going to shift it by 1 1 oh no 0.5.5 yes now this is correct okay this is because i want to make sure the values i'm using is 0 0 and 1 1. once we're more comfortable with the whole setup then we can make data back to like a 2 2 without offset or something like that it does not really matter but as a starter i think this is the best to go so let's go to no links uh i'm going to duplicate this object and let's rename the other as a visual uh and the the first plane is gm because we're going to add a geometry noise modifier onto that the second object we're going to go through viewports display and change the color into red so that we can see that better if we change the viewport shading to object mode okay so goes to the top view and our original plan is blocking our view which is okay because uh soon we won't see this plane at all because you have to cut this line okay next thing i'm going to do is take a mesh line this is actually already my second time of recording because uh i did a recording yesterday nights i was very tired and it didn't run well one side is because it's this is kind of very difficult on the other hand it's uh sometimes when you're tired you just don't know what you're doing okay so now this is fine currently we have this radius so it shows the points and then we are going to redefine these points with this position like a set of point five okay so this is good this is good another thing that i'm going to do next is to set up points somewhere between here and there okay so this value must be smaller than one as we know so let's rename let's name this as a value x so if i make a x here then the other part is 1 minus x so this is a little kind of kind of simple math how we're going to do is basically take a random value combine x xyz plug these x values take the positions geometry into mesh and we can see it now so this random value being generated is i wanted zero points uh yeah it says id okay fine something like 0.9 i guess and let's join geometry okay then if we [Music] so if i'm having this kind of distance then for our grid that being instanced points instancing on at instance two points will be the scale will be x as well so here we're going to plug this random value to the place and to the radius because radius can help deal with the the scale of our object later so we can plug that to the scale after combining x y z because we are only going to affect the x not the other part okay so here i think i think we can put our original plane into the instance okay it's not so let's generate our own plane so let's take a grid and i'm going to offset that by 0.5 0.5 so plot fc and let's i think uh uh let's firstly see our plane plane is here and let's rename move that to 0.5 and then another 0.5 no actually this will be fine okay then let's geometries into instances okay so now this is okay this is okay but uh we see we did we actually generate a good geometry yes we have two points which is matching each other and you can definitely change the seed and it starts not working because if we change the seed you can see we finish the one part which is okay but the other part is not fitting the area because we didn't not use the one minus x so let's do that take a mass and they subtract 1 minus our x and then plug into the radius and this is actually this runs pretty well so if we change the seed it always match so this is kind of a basic cutting of a single plane here just to remind you that this random value is not very good for animation because the change in the city is kind of abrupt change uh however what you can do is you can use any kind of texture and frequency i think the noise texture would should be fine and you can use the factor to replace the value and you can either animate this w as a way of animation or you can actually combine x y z and dealing with the vector to deal with the animation either way you like for the moment i will just still use this random value for demonstration purposes because later we're going to talk about the concept of id or iteration or index uh and before we head into the further steps to really cut multi uh cut this uh multiple times which is really kind of recursion uh i would like to briefly talk about the principle of this first cutting so it feels like we are cutting a square into two pieces but the reality is that we are just the instancing two grids with different scales so this is very important as we are doing the next step because you need to realize that whatever we are having is a grid so that we can actually rotate the grid to have a different axis of cutting and you will see more just a few minutes later so let's move on to the next step that we're going to do this kind of recursive cutting and let's change the organization a little bit okay okay uh talking about the because blender does not provide any uh function of loop yet so we have to do that a little bit manually i will discuss the similar kind of things in my previous tutorial in which we're talking about that expanding headaches and i've shown you the presets and the menu means you have to duplicate these kind of group nodes of the same function manually and then you have to connect each of sockets the good part is that you can select all this kind of node and keep getting f so that you connect all the sockets to the function so it's not as painful as i would imagine uh but it's still not a 100 procedural especially but on the other hand i don't think you're going to really do the recursion for thousands of times because technically speaking the amount of cardboard x will increase exponentially so probably five or six cards are the maximum that it will go which is not too difficult to just shift d and duplicate okay so this is kind of idea so let's move on to do the recursion uh for the time being i'm going to delete this noise texture just to clean up the trees a little bit more and then i'm going because i need a group node so i'm just select all this node and hit control g so they're pulling them into a new group node within these new group nodes firstly i'm going to create a a geometry because we're going to input the geometry from the last last loop and next thing i'm going to create is i'm going to probably plug this id uh into the place i'm going to expose this value but we're not going to really use that there are several important things so this cause the entire concept of looping is that you just put the you put the result of your last calculation and to the next time and run the same operation and keep going keep going so this is the idea of loop in this particular case it's very important to know whether this is the first node that you use or the second node you use third node you use fourth node you use fifth node you use so you have to keep an id or whatever things you call but you need to have this kind of value to indicate in this case we started from zero and for our first node its a value will be one and of course the second node this value will be two this also causes a different seed with it within the random value at some point but it's uh this part is not very significant uh i will show you why but uh firstly let's just output this value to the group output and then i'm going to change the name into id this is just for kind of recognization purposes and the rest i think that this is all done uh there's only one thing that i want to mention is for our first loop we definitely would like to make sure we're cutting using the grid and for the second loop we are going to use this product to instance that inside this part okay so this is kind of idea of this whole thing which means we need to make a switch to distinguish if this is the first loop for the compare if this is our first loop which means the index equals to 1 then you use the grid otherwise it will use the geometry from the loop input and then we replace this entire linkage and immediately we should be able to see the effect let's name that as a unit or you can name whatever you want it does not really matter and then duplicate this for one time and immediately you can see there is multiple cuttings more cutting than we see originally we have one cuts now we have three cuts and we can keep doing this so that we have more and more cuts we will deal with kind of uh randomization a little bit later but now the first important thing is you realize hey there's actually a bug every time we are trying to increase amount of cut there is a movement towards the y axis okay so here we also need to do another switch this kind of movement is mostly caused by this 0.5 increment so here what we do is we're going to change that to fluid and using the same comparison so let's move this a little bit left if this is the first loop and then we're going to use this 0.5 otherwise we no longer need to use these 0.5 not everything has been recovered talking about the variances the major issue here is that we're actually doing instancing instead of creating new geometry that's why over the time you can actually see there is a kind of clearly repetitive patterns from time to time and this is kind of unavoidable i think this is also why houdini is not using these methods rather they are trying to access points a and the point b anybody times and to generate a new x with their loop function this is also how animations really approach this function but in general nodes currently we cannot really do this if especially if we're using this kind of methods however we can still cheat to make it looks like we're generating random value every time and this is what we're trying to discuss later the method that we will use to cheat uh is the rotation previously i already mentioned the importance of having the square as our starting in geometry because no matter how you rotate a square on plane axis it's still a square so you do not notice the rotation in this case if i rotate this square then the cutting will be displaced rotating another 90 degree will be that place rodina another 90 degree will be that place so it feels like the rotation gives you an illusion that it changes the direction of cutting it also change the magnitude of cutting so this is an illusion but it does works um to really implement this so let's go to unit i'm firstly going to create a fourth state of these rotations using the point instance and so let's take the point instance and i'm going to instance the four times the method i'm going to use is just to take the four mesh lines and the geometry into points and because we already have an offset at one so if we change the view then this is what it looks like next thing if i directly rotate this entire whole thing something will change uh mo the most the actual reason is that we're not only rotating our instances from the previous inputs but also our grid because we do not want to rotate this grid uh as we are working so here what we can do is that we can tell the so we first say we're going to use the locate instances and i'm going to disable this local space and now i'm going to tell a switch if this is the first loop in which we're using the grid as the instances then we're not going to we're not going to rotate so this is the vector that we have however if this is our second time of this kind of rotation a second time of instances then we're going to rotate and i'm going to change the pivot to 0.5 so this is the idea and if we try to instance it then we can see the rotation that occurs and let's rotate our 190 degree actually the rotation is not so let's this is pi divided by 2 so this is 90 degree so the input you give is essentially in radius instead of the inside of the degree so you need to do a little bit of conversion so here i'm going to take a float range and every time i'm going to rotate it by uh pi divided by 2 which is still about 1.5 okay and then i'm going to combine xyz hit this take the vector so now i have a lot of instances being generated at this moment it's fine uh if this is acceptable uh more important thing is that i'm going to pick instances and this is what i'm getting from the top view and it does not really work if we close the plane view because we mesh line have and cause this kind of offset so just to recover that and this is what we get so if we repeat the same process and keep continuing that then you can see this becomes like this okay and because id changes instead of this float range what we can also do is just to use the random value and because previously our id will change every time for the loop so we can just plug this id and just plug whatever values maybe one million or one thousand it does not really matter but what we need to do is to snap that to the pi half of pi so use the snap function where is the snap snap and the pi divided by 2 and plug that to z so that every time it is different say rotation supposedly and this id needs to add with index okay so that you have different rotations so this is probably the last step that instead of using the random value we're really going to use the noise texture at this step so that we can start to animate everything in the object using the random value and basically we can plug the id directly into vector we can use the 4d instead so that we can actually start to animate it so basically dc is the point you can realize difference between this random value and the noise texture if this is i think because this render value is more likely to generate this kind of value at the extreme this is not really a kind of uh equal probability there is no fairness within this node that's why sometimes it gives kind of feeling which is very weird but the noise texture is more kind of soft you can also try to use other texture maybe wave texture magic texture voronoi texture they probably will generate very nice and interesting results depends on what you actually deal with do we actually have white noise white noise is also an option the only issue is probably you can still animate that with the w actually so if we change the white noise and then we animate this w uh this is probably too abrupt so probably no still either you use noise or other functions which is probably more proposable in my opinion okay as i've previously mentioned that you do not necessarily only to animate by using w you can also use the vector there are even other things that you can potentially do is to use the float curve so that you can change the number to something more kind of extreme uh for example this and that so that's yeah sometimes just to play around with all these kind of settings i do not know what you would like to do but i think there are tons of possibility i don't want to really just stop here because i want to add some more kind of interesting features so here let's do several things let's go to go outside the geometry null trees and after dc entire knowledge tree because we are only having actually two instances so i'm going to realize the entire whole thing because this is a step we realize the whole thing is and we realize uh because this is this setup is being so perfect so the plane is really tightly attaching to each other so we do not really see any gap between them this is this is pretty very interesting um so here i'm just going to make a little bit of gaps in between here what i'm going to do is to a setup position this is basically the polygon transition that you can do so attribute capture to the face and take the vector positions and mix rgb uh i think i will discuss this kind of concept in more details in the future but at this moment you can just follow what i'm doing so basically what you do is you get a kind of a the center point or the polygon center and then you mix the vertices towards the polygon center it feels like kind of shrinkage but just a little bit a little bit gap should be enough uh another thing is i real we do not have the extruded node in 2.0 so you either wait for 2.1 to do the extrusion using the similar method that we're using the capture attributes at the face domain or the method that you can potentially cheat is i'm going to take a vector mass and then i'm going to combine xyz and take the random value this random value also should have a random index based on what we are having so let's take the integral uh actually now the integral index plug this index to id if we do not do that and then we directly do the dc everything just has been crashed so badly but if we plug this face id into the place then different base should have been elevated differently we do see some issue with the setup this is probably because of the fact that when we create this grid there's face contact is not good next we just uh extrude it with the solidify modifier and i'm going to just increase the amount to infinite and then finally add a new geometry of trees after the solidify modifier let's rename that as clamp so here what we can do is just to simple mask set the position a position separate x y z combine x y z and use a math note to tell that there's no number on the z-axis should be lower than zero and the finally plug this vector into so now we have compliance we can definitely animate this more interesting by using four to determine this kind of extruding amount so for example in this case we can use the proximity for and take a controller and take a mass take multiply and using these custom positions which is for the face origin as a way to evaluate finally let's just scale down these empties and then you can actually animate this whole thing and it's also possible that you have a very same very tiny controller and then you expand it up just increase its values then everything has been grow like a city or something like that you probably would like to subdivide your this square a little bit more so that it becomes more interesting but this is kind of idea other than working with the fold there are many more things that you can do as i've mentioned in my animations tutorial basically so now whatever we have here is basically like a plane and if we ignore all these kind of parts of extrusion what we can also do is firstly let's transform this back to negative 0.5 so we have the origin and then another transform so everything set to zero and rotate this 90 degree actually probably the other way around and let's turn away this extrusion so rotate 90 degree and then we can use the simple deform modifier we can bend on the axis so that we can make a cylinder shape 360 degree we can even turn that into a sphere just to know that you always need a lot more subdivision surfaces and then also the ratios may be important there are really lots of things that you can potentially do it's just something you have to try by yourself so that you can also form a kind of a sphere if you want something like that so i would say vcc yet uh the rest you can try by yourself so i hope you enjoyed this tutorial probably see you next time bye you
Info
Channel: Bradley Animation
Views: 3,414
Rating: undefined out of 5
Keywords: blender, b3d, eevee, procedural, animation nodes, mograph, motiongraophics
Id: PgZrIToTdJE
Channel Id: undefined
Length: 28min 15sec (1695 seconds)
Published: Sun Oct 31 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.