Create Plants and Trees in Blender 4.0! (Geometry Nodes Tutorial | Part 1)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back today I have something fun in mind there's a cat here looking for attention in the meanwhile there he is and today we're going to make something that a few of you mify users have requested it is how to create assets like that right a lot of the Assets in um in mify are procedural they are geometry note based so we're going to work on that a little bit I'm going to show you how to approach that how to make it procedural and how to give it the inputs that you want as well now about 90% of you guys aren't subscribed yet so if you like the videos please leave a like subscribe leave a comment and let's dive right into it so I'm going to delete my Cube I'm going to hit shift a and I'm going to start with a curve and that curve is going to be a bizer curve so what I usually do is just go to a side view in edit modes I'm going to select everything with a delete and delete all my vertices right then with the draw tool there at the left I'm just going to draw my own little curve right just to get an idea of how it's going to look I want it to be in the direction I want with a little bit of a bent in the stem as well and then I'm going to open up my geometry notes window I'm going to close this down a little bit set this to Geometry notes and we got a new geometry note there we go so this is the official blender release right now 4.0.2 I think so we're working with that so in our left viewport what we want to be seeing the 3D viewport in the right one geometry note and to start this off so how do we get this into like a little plant for example and you can work in different steps so with the pl what we need first is we need some sub branching going on right I want some stuff to um well to come out of our original stem so what I will do at first is I will resample my curve because if you use a bizier then you work with the points you have here right so you got the starting point a middle point and an end point right now which means that if we would distribute new branches on this then we would basically only be able to specify those three points and I want to be able to really get into how many branches I want to have so what I will do there is I'm going to just draw this out and find a resample curve right and then we're just going to join this backup join geometry there we go and connect this back up right so now we have two curves one is basically the low poly and one is going to be like the high poly curve right so quite beautiful so what I want to do is this resample curve one has the points that I want to well distribute my branches on right so I don't want to just have this curve but I want to add some instances on there so shift a search for an instance on points there we go now those curve points are instanced and we don't have an instance so what do we want to distribute on that curve we want some new curves right right so the sub branches are also going to be curves so drag your incense out to a curve line that works fine and right away you can see that they are pointing all in the up Direction that's not really what we want is it so we want this to be aligned to the tangent not really the normal direction of the curve and this is going to be the tangent direction that follows the curve right let me draw that with arrows this is the direction of the tangents and of the normals is going to be straight out there right so so it follows the normals of the curves now of course it is just a 2d kind of thing right now all right so our tangents follow the curve and our normals will be aligned in like a 2d plane pretty much so if I set this so the rotation if I can drag that out and just set this to be a tangent like a curve tangent this one you can see that it follows the tangent of our curve of our primary curve quite beautifully already now I want this to be the normal normal Direction let me just make up some room all right so we got this I don't want to be the tangent but I want to have the normal so how do we do that well we need to realign this Vector so shift a and we're going to find an align Oiler to Vector node add that in between and now the vector is just going to be the vector of the tangent right away you can see something beautiful happening right so the Z direction is generally the direction that you put in there right so our tangent now and then we can conect it to the Y and that's going to be like a well little little random still and the x is going to be pointing to the normal Direction beautiful so how do we make that a little bit more random right so we want this to be a bit more random so let's hit shift a and instead we're going to find a rotate Oiler all right or rotate your Oiler around a specific axis right so we can set this to axis angle and then we have some options that we can take care of right so we can try different axes here but we can just set the angle first to a little bit of a different value and see what happens so if we just rotate it around the Zed axis you can see that it's already working quite well and the only issue is that it doesn't keep itself aligned to the normal direction right as you can see so what I will do is I will just crank in this tangent into the AIS as well and there you go now it may look weird from a 2d perspective but in 3D you can see that it's going to rotate around the curve but it will stick to the normal Direction at any time which is pretty much what we want now to make this random I'm going to drag this out and find a random value note right and I don't want this to be from zero to one but we are working in a degrees amount which means that I want to have this in pi right this is going to be radians this is going to be degrees so our full circle is basically going to be PI right from minus pi to plus pi that's going to be a full rotation and we get some nice random alignments there now you can always just change that seed if you're not happy with the results but you can see it works quite nicely all right so next up I got well I got a good feeling that I want to align this more to the actual tangent Direction anyway which means that we need to do a little bit of a mixing here right so if I drag this out down a little bit what do we have right now we got our tangent input of the curve we're aligning that to the normals and then we're rotating that around the tangent again okay and I want to align these a bit more into the tangent direction right so if you hit shift a we actually got a vector math mix or vector mix I guess if we just find a mix and then Vector mix Vector we can actually mix two vectors together all right so what I'm going to do is I'm going to just duplicate this I guess right align Oiler to Vector um I'm going to duplicate these two right control shift d and I'm going to replace this to the Z Direction which is going to be the tangent Direction and now for the random value I want them to be both random but if we use the same random value input for both rotations then they will have got the same input for every in instance pretty much right so both Oilers will have the same seat for every instance now we can mix these two together right so I'm going to correct this in B this an a this in B and I can actually just realign that to the rotation all right so you can see that how further we take this into the Z or the factor One Direction the tangent Direction the more they're going to be aligned with the tangent as you can see all right and if I crank this more to zero it's going to be more into that normal direction right so this is going to be like a value you can control yourself pretty much right so this is going to be an input of our geometry not three at some point so something like this is looking quite decent and then we can just do a different seat if we like that to be happening there we go this is a great start I'm going to save my file real quick and call it plant gen I guess plant generator so now we got that rotation and and the alignment set up pretty nicely so what do we do next all right so I want to create different inputs for my plants because I want to be able to control this later so right away I'm going to start making some inputs and cleaning up my geometry noes a little bit so for my input first thing I want is the amount of branches right so I'm going to drag this into the count right and I'm going to hit shift a or not shift a I'm going to select my input go to the group section and I'm going to name this sub Branch density there we go so now if I go to my modifiers and crank that number up we're going to have more sub branches and that is beautiful all right so if you want that to be a little bit more random we can always just crank out that selection and go to a random value right and crank the Boolean let's say up a little bit to. 75 maybe right that means that for a quarter of our points on the curve there won't be any branches gives a little bit more Randomness there okay so this section right here this this and this is going to bring well let's contrl J that to create a new frame and this is going to be our sub Branch spound all right it's pounds and then this is going to take care of the rotations right so I'm going to group that all together or well just in a frame there we go this is going to be F2 our rotation value beautiful right so now at least we know what's happening in which part amazing so I want to have a different seat as well there we go random seed that's always nice for any kind of setup okay so that will control that and then this factor is something I want to control as well so add that to the group input and name this um rotation alignment right that will do that will at least tell me what I need to know so beautiful now we got a little bit of a setup and we're going to go to the next step which is going to be making those branches a little bit more diverse a little bit more random so to do that I will need to First realize those instances right so otherwise we won't be able to access all the information individually but we will be able to control well each branch will be controlled at the same value right because it's all the same instance so we need to realize that so realize instance there we go and now we can control each and every one of those so what I want to do first is let's say we want to add a little bit of a gravity right so the branches are a little bit more down at those end points because we will have some density from leaves and stuff which means that our Branch will bend down a little bit so how do we do that well right now we added a curve line and keep in mind that a curv line only will have two points a start and an end point so if you want to create some like something like a curve shape we need more points so shift a and resample your curve to a value well let's start off with 10 it doesn't matter so let's just drag this out and now we can actually set a position of our curve right so shift a sets position there we go and now for the offset we want this Z value to be a little bit different for every point on the curve right so let's drag this out to a combined XY and Z which means we can control the Z value individually now I drag this down to like 6 you can see our entire sub branching is going to move down which is not really what we want to do what I want to do is to only have my end points move down all right so how do we do that well we are going to use a little bit of a vector math so shift a vector math all right there we go and we're going to set this to scale and if I set this to zero now you can see nothing is going to move down set this to one everything moves down and what I want to do is I want to control this skill with the position of the point on that curve right which means that the starting point here I don't want that to move down and the end point here I want that to move down right and that is something we can control with the spline parameter the factor right so if we have the factor value the spline parameter so if I add that R quick spine parameter this Factor value is basically going to be zero at the start of our curve to one at the end of the curve right and all the values of course in between there and that means that if we use that for the scale inputs we are actually going to be able to scale the starting points with zero and the end points with one right so if I do that if I use the factor for the scale there you can see that right away something is happening right those end points are going to be moving down right you can see only the end points the starting points will stay right in place on the curve now right now that is a straight line right that's not really what what we want to have we want to be a bit curvy there so how do we do that well the factor is something we can use to control um well a float curve right so if you hit shift a and find a float curve here and drag that in between we can actually start controlling the curve of how this looks right so that depends on the shape of plant you want to have so if I go with basic um basic gravity pretty much I'm just going to set it like this right the it's going to go on and on and on it's it's heavier and heavier the farther it is and thinner and thinner the further it is as well right branches usually are thinner at the end points than they are at the starting points and then they will bend more because they will have more weight but less strength to keep it in place right so something like this looks pretty decent to me all right so next up I actually want to be able to control this a bit more all right so this let's just join this up real quick contrl J this is going to be our Branch gravity I guess and this has to be in that frame too there we go Branch gravity and that is something we will use later as well so just drag that down a little bit so what I want to do first is every Branch right now has the same exact length right and that's not really something that I want to have I want to have a little bit of a variety in length and we can do that two ways right we can trim a curve or we can actually rescale our line before we turn it into a resampled curve right both ways work but if we use a trim curve here at the end let's see maybe we can use it in front of the resample that will actually be perfect if we now crank down this end point you can see that we can actually scale down our curves a little bit and they will be trimmed down to zero pretty much right so if I mute my set position and I will trim this down you can see that our length eventually will be zero beautiful so this is something that works quite well now I want this trim curve to be random right so I'm going to set this to be a random value there we go random value for my trim curve and I want this to be from like. 3 to one now I don't want my short curves to have the same strength of gravity I want them to be a little bit less bending down so how do we do that quite easy all we need to do is get the spline length after the trim curve we're ending up with the different lengths of our spline right each each planine will have its own length and we can use that to Well Control the gravity as well the longer this spine the more it is affected by gravity so we need another scale value there and we're going to scale this and I want to scale this value with the length of my spline so drag that out spline length there we go so the longer the spline is the stronger our gravity is going to be right so look at this short curve there if I disconnect this it's going to be moving a lot more down and if I actually add this in between it's going to be better all right beautiful and we can even just affect this value a little bit if we'd like that so I think it is a bit too much aligned to our Val we're kill this with just crank little at first right that's just going to be the same we can always Crank that up if we'd like that's up to you right so that was part one it's not really a plant or a tree yet but we got the the foundation set up right it's the important part the actual curve part the part that is going to be procedural meaning that we can just draw curves and the entire plant or tree will be formed from that single curve that is the real goal so if you like this please leave a like a comment subscribe I'll enjoy any one of those and I'll see you in the next part cheers
Info
Channel: Nino
Views: 1,029
Rating: undefined out of 5
Keywords: blender, blender 4.0, procedural, generator, geometry nodes, nature, plants, plant, tree, trees, bushes, succulents, shrubs, leafs, environment, how to, tutorial, 3.6, easy, simple, lesson, curves, blender 3.6, autodesk
Id: a1g6NBxHf5A
Channel Id: undefined
Length: 17min 24sec (1044 seconds)
Published: Thu Feb 01 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.