ULTIMATE Christmas Tree - Blender 3.0

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey there everybody and welcome back to another blender tutorial it's a beautiful morning and i woke up not uh 10 minutes ago and i'm like yes it's time to make procedural christmas trees so in this tutorial i will teach you not only how to make a christmas tree like a dummy uh but i'm gonna teach you how to make an infinite variation of christmas trees because uh the whole thing is can be mathematical procedural and you know how we do in this channel we're not like any of those uh p word channels or in the first 30 seconds so no swearing uh let's get to it so uh i'm going to be using blender version 3.1 alpha although i think every single node i'll be using here is in 3.0 so don't feel uh left out or scared or uh demasculated uh if i'm using 3.1 that doesn't matter so christmas trees how do we make them why are they important well first of all they're important because uh jesus was reborn uh on the date of christmas i believe i i don't i don't know the lore uh but how do we make them i know a lot more about that so we're gonna take the cube turn it into a geo nodes and delete the initial geometry and when we see christmas trees what are they really they're basically a bunch of twigs that have leaves sprouting out of them but more specifically it's kind of like a cone shape that kind of tapers up and then we have leaves sticking out of it and we're going to be taking that shortcut so in other words we're going to be using a mesh primitive which one um a cone because it's kind of most similar uh to a christmas tree to begin with and i know what you're thinking is this really going to be the big it is it's gonna look good though uh with this cone we have a lot of control we have the height of it uh we can actually control the tapering at the top the radius at the bottom we can actually save the project i'm gonna call it i have a patreon because i do link in the description and you can get the final blend file there but we can control a whole bunch of stuff so first thing i'm gonna do is i'm gonna add some extra division so i'm gonna make it more round so now there's a hundred rotational segments and i'm also gonna add some side segments which we're not going to be able to see but you're thinking why are you adding side segments i'm kind of adding loop cuts it's because we're going to take this cone and kind of add some character to it i want to displace it so we have this cone let's displace it whenever we're altering the mesh i always like to use set position in fact i don't know if there's many other ways to do it set position is of course going to let us um alter the actual you know geometry of this so you can see i'm shifting it here here whatever what i want to do is add a bit of randomness whenever we want randomness i just like to throw in a noise texture so we're going to offset this by some noise which you can see it does displace it but it also kind of shifts everything upwards a very simple solution to this we're going to take a vector math and subtract by 0.5 on every axis because on average noise texture adds 0.5 on average to each axis so if we undo that it's going to re-center everything so here's the before and after and then uh to make this knot look like a thrown away condom we're gonna take the scale and just bring that down so you can see we have some more mild displacement here in fact if we bring down the scale we can make this much more tasteful family friendly which is something for my channel but there we go so this is kind of the base for our christmas tree we can kind of control the noise by the way four dimensional is gonna be what gives us the variation of trees uh so we have that and of course we can control kind of the quality of this so i'm thinking we're gonna make a tree about this high uh with some amount of noise we can always go back and edit this because it's procedural okay uh next order of business is on this cone uh what i want to do is instance a bunch of uh leaves i think they're pine um although why can't you make a christmas tree out of an oak or maybe you dude imagine people get crazy with christmas trees they're going outside chopping down telephone poles bringing them home they're like yes this is a christmas tree are you bringing a traffic cone i mean it's whatever you want it to be you just slap a star on top of it either way i want to to make a twig so a pine leaf twig an instance that so let's do that now i'm gonna start off with the cylinder so just like last time we're kind of picking the primitive that looks the most similar to what we want and i'm just going to bring down the radius and the idea is we're going to make kind of this branch or twig with a bunch of leaves sticking out of it in fact if you saw my tutorial about christmas wreaths it's a pretty similar process but i'm going to up the ante for this one so i've made a kind of thin twig in fact it doesn't need this many vertices let's just have it be eight so it's kind of a octagon like a stop sign going down um and just like last time i'm going to be adding some distortion so let's add a couple side segments maybe 15 and uh no need to i mean we could even make this a node group but for now i'm just going to duplicate all this no need to you know reput every node you can just copy them so we're going to set position and just kind of reuse all this and you can see that displaces our twig makes it look a lot more natural for this one though i can kind of change the settings like maybe i want a larger scale something like that and we can change the quality of this bring down the scale so it's kind of low frequency detail and do something like that and i'm happy with this you know we could add a bit more variation and all that but i think it looks good uh maybe let's bump up the detail a bit um so on this twig what we want to do is have a bunch of pine leaves how do we do that well we need to distribute a bunch of points and on every point on that surface we have a leaf coming out of it so how do we do it well i told you so stop asking you distribute distribute points on faces boop there's a bunch of points on each of these points we are going to instance on the point you literally you just tell blender what you're saying soon it's going to be a text to no a speech to text kind of thing you just say it and then blender does it so on each of these points i want to instance well uh we could model a leaf or we could just use a plane which is easier so you can see now we have a bunch of planes to make it look a bit better i'm going to make these a bit thinner and that should be good enough so we're going to take this we're going to join it with the original so you can now see we have a bunch of leaves coming out of our twig does it look like garbage yes uh but we'll fix that uh first order a business um so there was a lot of debate do we want the leaves kind of intersecting this or do we want um the leaves really coming out of here if we were to want that you just transform this on the x-axis that's up to you for now i'm going to have them coming in the middle uh we want to add some stuff going on here so let's see if we connect the rotation that's already something so now we have the rotation uh somewhat randomized really it's coming off the normal of the surface so that's already looking more organic um but it could look better so let's make it look better first of all i'm going to up the density so we have more leaves coming out of this for the rotation i want to first fix this so by the way what i did over here is i took the this rotation is the normal vector turned into an euler rotation you take it you connect it to the rotation it's going to make the rotation good but either way i'm going to add something in the middle to kind of fix this orientation so that it's facing the way i want it to and i believe that's what i want i want it by 90 degrees which is pi over 2 radians that's a start but also i want to randomize this because they're all kind of like perfectly flat parallel to the floor x y plane so what i'm going to do is i'm going to start importing in our random values this is kind of the bread and butter of making things look real it just adds randomness and i'm going to turn this into a vector we're going to add again and the idea here is we're going to be adding a random rotation so i connect this and boop it looks much more random to control this we're just going to bring this down just so it's a bit more tasteful so here's before and after and i know what you're thinking how is this going to look like a christmas tree just trust in the process okay have some of that christmas spirit okay you can believe or you cannot believe you can be an atheist you really can but do you really know that there is no good looking christmas tree out there i don't know let's also randomize the scale for this one i'm using a float value so that we have uniform scaling same on x y z and i'm gonna make it random between i don't know point seven and one so that they're all pretty big but here's without and here's with so they're not all necessarily the same size maybe even make it like that okay and we can always go back and fix this from the um displacement of it which will make kind of different looking pine needles in fact i do like a bit of variability on this we can go up and increase the number of you know instances uh we can go back and fix this but point being uh this now let me just move all this stuff from before um is our node group uh when it comes to generating the thing the twigs i don't want this selected ah why is it so hard why is life so hard there we go uh so i'm gonna shift p frame that uh this is our twig and what's the name of the game the name of the game is taking this cone and putting a whole bunch of pine leaves on it so let's do that just like before we distribute it by first distributing points on surface in fact this time we're going to have a lot of points probably even more than that actually i know more than that and then on each of these we are going to instance on points so what are we going to copy we are going to copy the twig which makes it look like um i don't know kind of looks like you ever see monsters inc i forget the name of the main character like the blue and purple guy mike no wazowski's the other guy was his name jimmy i don't know it doesn't look good uh so we need to fix this by messing with the scale the orientation whatever so just like last time take rotation connect this here this is going to make them branching off of the normals which you can't tell yet but it's going to make it look a lot better what's making this look so weird is each of these twigs is so large and by the way if you start seeing some lag on your end if you're following along in the tutorial or on my end on the recording it's expected there's a lot of geometry but you can see this is making it look a lot better um but we do have an issue and it's kind of hard to tell what it is because it's a mess so i'll make it a bit more clear so i'll connect this with the cone you can see we have these twigs coming out but i believe they should be yes they're kind of inside the mesh too you see what i mean um they need to be not intersecting it just like we had the leaves intersecting the thing so simple solution actually very simple solution we need to move these instances outward so again the issue is they're kind of coming through our mesh so we fix this with a transoit instances this is literally going to let us move our instances using some math and we're going to move them outwards in other words relative to the normal the surface normal so literally just connect this and that is going to make them come outwards i believe so let's see here is before and there's after so i believe that did it and we can actually control this just like any other time with some vector math uh with some scaling and the bigger we make the scale whoa that's doing some weird stuff i believe that's because actually we did our rotation already so let me just do a bit of an experiment if i get rid of the rotation yeah there we go now it's going outwards so we do have a bit of a compromise um i'm thinking let's actually solve this in a smarter way off the cuff problem solving that this is what it is what it's going to be uh so before we instance it i think what we can do is we can actually just transform it and that should actually be less expensive as well so i'm just going to move it up on the z-axis and that does it as well yeah that's right i recommended the wrong solution and then found the right solution what about it uh so i'm actually moving the instance the the twig before we copy it and that's gonna make it look better okay so now we have that problem solved although it still looks like a piece of garbage that problem is not solved so let's try to fix that a couple things to make this look better bring up the density so we have a more kind of dense thing going on and now we just want to randomize this which is what's going to actually make it look good so just like before we want to randomize scale and rotation so for the scale connect that whoa that is huge so i i guess the maximum scale should be 0.06 and the minimum can be zero and already that's looking a bit better so here's before and after it's looking like it has a bit more you know character going on and again we're gonna expect some lag so don't don't complain about that we're going to do that and then kind of the piece de resistance is going to be adding that random rotation so just trust in the process guys it's always going to look good in the end so we're going to randomize by a random vector and uh for this one [Music] just pick a number so this was actually kind of the thing so i know it's not looking perfect yet but this is what made it not look like garbage so here's uh before looks it looks bad and after now it actually looks like like you can tell what we're going for there is more work to be done but you can see what's happening here um so at this point we actually want to be shaping our cone so you can kind of see the underlying cone here and again the whole idea behind the setup is we change the cone it's going to redistribute the points and make a cool looking thing so i just want to kind of reshape this until i like the look of it so i want to make this a tiny bit taller i want to increase my randomness just so it looks a bit more chaotic and you can see this is what really adds the character to our tree in fact it's not even crazy to make it uh that big the randomness but i'm just gonna make it like not as intense so you can see this is kind of the thing and especially once we start adding in those shadows and once you start seeing the render so hopefully this renders quickly let's see so we're going to be doing cycles gpu yeah there we go now it's looking like a christmas tree you doubted me didn't you loser no i i know what i'm doing um so again there's lag are we gonna complain no uh so let's uh change our lighting setup to an hdri uh because it looks better um so christmas trees are usually indoors surprisingly at least once they're cut they're endorsed i'm just gonna pick an indoor hdri film transparent boop okay so that that's looking pretty legit so soon we're going to be done with modeling and we're going to move on to the materials now in fact because this has the basic default white material it almost looks like a christmas tree a pine tree that's been snowed on which i think is kind of cute um but whatever um so what do we have so far we have our pine uh we could add a bit more character to this when it wouldn't be a crime maybe randomize the scale a bit more no that's a bit too much you can go and edit these values until it looks like what you want it to look like but i'm gonna say that i'm happy with this so let's move on to the next step of the process so i guess let's do a bit more modeling and then we'll move on to the materials which is what's going to really kind of be like whoa we made a thing i'm thinking we got to make a star we got to make some like christmas lights or orbs or ornaments and most importantly we got to make a trunk because right now it's just floating leaves and in fact you could actually make the whole branching and twig network in here but i'm going uh i'm using the fact that a christmas tree is so dense with leaves that you can't see through it uh to our advantage right there's nothing under here but it doesn't matter um so let's just make a trunk in fact a trunk uh is it not kind of a reuse of what we did over here i believe it is so let's kind of do that so as a cylinder because if you think about it so let's actually view this this should make the lag much better once it actually cooperates if i have to restart blunder i'm gonna freak ah there we go you gotta remember i'm also recording at the same time uh so it's a cylinder that's uh distorted basically so i'm just gonna take these nodes i'm going to copy i'm going to paste outside of here hopefully that works there we go frames are weird and we're just going to do the same thing so we're going to be distorting a cylinder for our trunk so we're going to offset it and just like last time we need geometry i'm so worried by the way i'm just going to let you into my process and to my brain a little for a second i'm so worried that the recording will freeze as i'm doing this in fact i'm always worried that um i do this thing to make my camera move and i'm worried that i don't do it at the beginning of the tutorial because that means i've wasted a recording but i just said that so i could check of course but what are we doing we're making a tree trunk so add some segments uh with our distortion let's also add some more rotational segments and you can see um we have a trunk set up uh to make it not look faceted by the way we haven't had to deal with this yet a simple solution you just set shades smooth boop it looks like garbage on the top and bottom but we don't really care about that we care about everything in between for this i actually want a lot more geometry so let's add more geo here and more around and the reason for that is it's going to let us have more detail in our noise specifically if i literally take the detail slider and bring it up it should if i go from like a low number to a high number you can see how it's actually adding visible detail and i think if we up our divisions like even more yeah now you can really see it uh we don't need to go crazy here though so 70 120 that's quite a bit of geo i'll be happy with that so there's our trunk again we can control the radius of it whatever it's basically the same thing as the twig we want to take this and we want to join it with our thing and is our trunk too big no of course it is uh so let's uh bring the radius down until i'm happy with the look of it and let's also now this is a good point to probably have a bit of reference because i don't really know what a christmas tree looks like in my brain but you just want to mess with the depth and the uh whatever until it feels like it looks right so in the final render that you probably already saw in the beginning of the tutorial i'll probably hone this in a lot more but for now we're just going to kind of get a good enough result now the only issue is i can kind of see the trunk through the leaves there are two ways to solve that of course you can add more leaves uh which it would work but it's already lagging quite a bit so what i'm actually going to do is i'm going to actually add in our cone as kind of a bit base layer even though it's bragging that we don't need it so we just join it and now you can't really see through it so what we could do is we could give this cone kind of the same material this leafy material so that we don't notice it i mean i don't really love seeing it to be honest i think some things that will make it look better is we add more geometry to it and maybe we also throw it through a set shade smooth but we might go back and get rid of it okay let's see what this looks like in rendered mode probably looks better it does but it also looks like we need more instances okay you know what you asked for it i'll deliver 600 yes more 800 more um no 800 is probably fine if anything we can probably decrease the number of leaves per thing okay so that's pretty good uh at this point let's start doing materials and maybe we'll model the star and the ornaments after we do the leaves once we we get a base so for the leaves uh we could either add the material here because this is what we instance the twigs and all this or what probably makes more sense is we probably want to add in the material before so when we're making our twig so let's do that in other words we need a set material we're going to have one for the leaves and one for the twig because yes we're going to have you know a brown twig and green leaves and wow the lag is so crazy it's so crazy okay but better than making like a three million polygon thing am i right uh so we're gonna have a leaf material we're also going to have make a new one we're also going to have a twig material and let's just see what we got going on here so we should have a principle to be sdf for each of these and what i want to do is i want to apply these so we can actually see them uh so with the leaves um i don't know i i guess just make it a leaf i don't know why i froze there like i was contemplating like the radius of the universe which is always changing um pretty simple stuff uh we have a material for each of these so i believe now when we go to rendered mode when it takes a year to do that uh we should just be able to let's see base color change it to red okay it takes a while but you can see yes it is indeed working so what i want to do is i want to kind of give this a translucent green material but i also want to give every leaf a different color we want to randomize this now i kind of regret what i'm about to do but we need to do it uh to be able to um randomize the leaves we need to make sure it's actual geometry not just an instance so what we have to do regrettably is we gotta realize instance which is gonna make it laggy really well i believe what this is gonna do is it's gonna make our twig geometry have separate planes that we can then randomize oh boy i might have to do a cut in the uh tutorial here and we're back it actually seemed like the uh realized instances made everything a lot faster so it was a necessary evil it took a lot of time to compute uh but now we don't have like unbaked instance on unbaked instance like we've realized some of this so it's actually much faster to deal with wow i wish i kind of did that sooner um either way what was i saying uh we have a material for this but now we have the luxury and this is something i read in one of the comments we have the luxury of using uh certain tricks from shader editor so random per island what does it do let's zoom in it's going to give each of our leaves a number between 0 and 1. again the reason this works is because we randomized this and now actually maybe i'm crazy but because this is going so much faster so realize those instances boys because it's going so much faster i think we can actually increase our density without it being a big deal beautiful okay so we've randomized the leaves um kind of important point i realized instances here instead of after we distributed the twigs because that's kind of like a n squared versus n situation you want to realize the instance the twig and then copy it instead of doing this massive thing where we copied twice but either way we're getting off point random per island is going to let us get a different leaf color for each of these but now let's start building our material so it's going to be a translucent bsdf so again what we're doing here in case i rambled for too long and we lost uh track is we're just making a material for our leaves so kind of basic way to do this is you mix a translucent and a transparent bsdf and you can kind of control how much of each we have going on here and what we want to do is kind of pick a translucent bsdf color that kind of looks green of course not like that so we're going to color ramp again because we have the luxury of random color so let me just kind of show you what i'm talking about so i'm going to connect this we can pick two totally different colors and have a gradient in between so let's do red and blue for example and you can see how we get some red leaves some blue leaves some purple leaves and it just adds a nice amount of variation of course i want to pick more christmasy colors i'm going to kind of pick two shades of greenish yellow uh one of them is going to be a bit darker and fairly desaturated and one of them is going to be more like a light snowy green color now at this point i'm seeing that we do not have enough leaves or or what we can do is we can make the twigs bigger so they're kind of bushier but we need to cover our cone a bit more so let's just bring up the instances i don't care doesn't bother me so something like that and let's also just make them a smidge bigger there we go that looks pretty good and uh now we can mess with our materials a bit more so i want it maybe a bit more saturated than that we can always go back and change these things but you can see how it's starting to look quite uh christmas tree-like so i'm happy with that there we go um only other thing though is i'm seeing a bit too much predictability here so did we really um oh we never no i was about to say did we not randomize our things we totally did i'm just gonna randomize them even more to make it look a bit more broken up there we go that's nice and bushy um so there's our thing uh that's one material we also need to do our twig material and we'll probably come back and edit this so remember we made two materials one for these cylinder twigs coming out which are adding to a lot of the white that we want to get rid of and one to the leaves so for the twig let's just make sure yeah we make it red it's changing all these so this is another thing that's going to up the believability so i'm going to make this a kind of brown color until it kind of feels like it blends in what's going to make this look real well it's got to be rough so it's not reflecting so much light it's got to be substantially darker something like that and i'm happy with that um and in fact what we can do since we have the base cylinder maybe this is going to help blend it so remember this is our cylinder that we distorted we can also apply the material here i believe so let's set material make it the twig brown and there we go now the tree doesn't feel so see-through because the cone underneath is just this brown thing so let's hone in our materials a bit more i know i'm a bit all over the place here but what are you going to do so we want to hone this in and i feel like we also want to hone in the lighting it could just be that we have an hdri that there there we go that hdri suits this a lot better it gives a lot more depth in our shadows and just a better look so sometimes it's the lighting okay so we want that oh and of course we also want to apply this to our trunk there we go in fact what we can do now that we have like a big piece of this exposed is we can get this looking a lot better since we have a big chunk to work with so i think we want to make it a bit brighter because a trunk isn't like pitch black something like that and you can see it kind of just looks like a brown piece of plastic or kind of like a soft poop uh we gotta add a bit of detail here so i'm gonna do that with a normal map to do this i'm going to use a noise texture not a white noise texture but a noise texture by the way if you've made it this deep into the tutorial and you're still watching good on you because i feel like i am scrambled oh hold up just as i'm saying that i feel like super scrambled in all this i get like a text message and i changed my text tone to literally be like an audio clip of me saying something either way if you made it this deep into the tutorial good on you because i feel like i'm all over the place but hopefully i'm conveying the information well uh so what we want to do at this point is add a bit of um detail uh to our brown material our twig material so i'm doing that with a noise texture so we need to bring up the scale a lot it seems and now you can see some of this noise texture i'm going to make it higher contrast and the end goal here is we're going to use this random detail to generate a bump map is what i was trying to go for so let's up the detail another thing that's going to make this look good is um trees tend to grow upwards i know it's crazy uh so the the idea of vertical z-axis stretching might look good so i'm just going to use the coordinate system here to we're using generated coordinates apparently whatever uh to scale on the z-axis nope on the y-axis on the x-axis there we go apparently was the x-axis i don't know i i like the idea of this stretching i think it's going to make it look much more realistic so we're going to do something like that maybe add in a bit of distortion a lot of distortion and a half amount of distortion and that's going to give us you know this thing flowing up it and also on the twigs and all that so the idea here is if we use this on the height map yeah there we go now we have this a generated normal so let's see what this looks like so it's a little hard to tell because it's dark but if i was to bump up the light you can see that this has a lot more character to it and looks a lot more real so i'm just gonna pick a color that looks kind of real i think the only thing that's kind of giving our way our trunk is it's not like the size it would be in fact i believe it's even thinner these things have a very tiny legs to stand on there we go uh okay let's also bring down our saturation it's almost like too colorful and bring up the lightness yeah that was it that's what needed to be done okay okay so we we've gone all over the place uh we have leaves uh we've made a material for our twigs and our trunk i'm gonna make it a bit darker and all this uh now let's start doing some easy stuff that's going to make this look super good so we could do ornaments or we could do lights i'm thinking we're going to do lights for this because i did ornaments for the wreaths so what we're going to end up doing is basically instancing a bunch of spheres and they're going to be these glowy materials and we could do that super simply uh you could instance on this leaf system we made but just like before we don't want to instance on instances it just gets expensive so i'm going to take our distorted cylinder we're going to distribute some points not nearly as many um and on this we're going to instance some spheres so at this point i believe we know the drill since this whole tutorial is basically just instancing so we're going to instance a uv sphere because that's kind of the closest to the shape we want we want these spherical lights we take it we join it the spheres are going to be too big so we bring down the radius and you can see this is going to be a randomly generated light system that already is kind of looks correct to me and we gotta make them tinier but not that tiny there we go and we can randomize it a bit later so something like that and uh we want to make these glow so i'm going to give this a new material you know the drill i'm getting tired even though i just woke up whatever what about it uh we're going to give this an emission material so let's select that here now what you could do for the submission material is you could just kind of throw in an emission bsdf or i guess it's just a emission you know maybe it is a bsdf you could do it like that but i found much better results by using the principled bsdf and then using the emission settings so we're going to make this full emission kind of a yellowy color a bit brighter and to make it not look ridiculous we gotta make it smaller and i'm gonna do that with the random scale so we're gonna do this and that not only randomizes them but it's on average gonna make them a bit tinier so something like that so there we go we have lights we can make it more intense now the brightness of our lights kind of depends on our lighting setup outside of it so it kind of depends on what hdri we choose so i think we'll probably stick with the one that i liked from before but i'm just trying to make sure that i'm set on one before we like change stuff up wow that's an outdoors one uh what did we want we wanted this one i believe so you want to pick a emission that's good if it's too bright it's going to kind of leak through this a bit too much so something like that i want it to be kind of a hotter white color and look at that we have lights um just like last time what we can do especially since we didn't change the rotation this time is we can move them a bit outwards towards the normal so again we have this normal vector we can translate this is going to push them outwards and we control the extent of that with some vector math so i'm just going to scale this down until they're poking out but not so much so because they'd kind of be more on the outside of the tree so here is uh before they're kind of very inside and after let me kind of do a halfway in between okay we got our lights should they even be a bit smaller probably okay we got our lights we could actually randomize them using the same method as before you know what screw it i'm going to randomize them watch me whip watch me nae nae realize instances now we should have this uh random per island attribute that one i believe we do it's kind of hard to tell wait realize ah it's because we need to realize after we translate instances there we go i believe that should have done it uh this might let us get random colors if not i'm just gonna abandon this because i feel like this is we've entered train wreck mode in this tutorial which is a thing that happens every once in a while so let's see let's try red and green lights yeah that's a quite random and what we want to do is we want to throw this through a constant so it's literally one or the other with nothing in between so you can see we have some red lights some green lights throw this into the emission color view it there we go christmasy colors yay if anything they're a bit too bright something like that and should we even throw in some hot white ones like we yellowish white ones like we did before i guess so distribute from left and now we got more colors going on and at this point we can play with how many lights do we want do we want a stupid amount of them what have i done ah that looks cool i think we do but not as many that looks great i'm very happy with that actually okay we've done lighting and by the way all of this again is dependent on our original cone so if we make this tree taller it will take a long time to think about it but look at that it all just works the trunk could use more work though either way a final thing let's just throw a star up top here and just call it a day okay i'm i'm so done with this um so the interesting thing about making a star is you might think oh you kind of use the star curve and then you extrude it and then you make it glow yes however we don't have an extrude or a solidify node in geonodes um so we're going to have to do something a bit complicated but it will be a learning experience so what i'm going to do is i'm going to start off with a star curve oh it's so much nicer to just see one thing we're going to start off with the star curve and kind of sculpt this into the thing we want so i believe a christmas star has five points and what we want to do is we want to somehow give this depth even though we don't have extrude or solidify so i was thinking about how to do this and i originally used volume to mesh mesh to volume but i think i've got a clever less expensive way so we have this i'm going to turn it into actual geometry by filling in the curve with triangles so the way i want you to imagine this is we have the star and then an edit mode it's going to have a bunch of triangles that i think should converge on the middle this idea might not work i'm just going to throw this out there but let's just see what happens if we now set position which is going to let us move this geometry and we want to isolate it so we're only moving the middle point then maybe let's try it so we're gonna look at the position and i want the ones that are in the center so in other words the one with a length near zero so let's see what that gives us we want the length and we wanna so again what i'm doing is i'm basically making a mask again this might not work and that isolates the middle point so we want all the ones with a position a point value very close to the center so now i'm going to make that my selection and let's see what happens nothing is that what we wanted no um is it because we don't have geometry there let's try subdividing no it just does not oh wait it does not like that what if we increase this there we go now it's doing something well i i assume this is not the way to go okay back to plan a or i guess it was plan b no this was plan b so here's how we do it here's the weird ass solution i found for extruding without extruding so we're going to fill curve we're then going to subdivide this because i guess it's basically kind of scattered vertices so i want the vertices to be pretty well distributed along here and then we're going to do mesh to volume volume to mesh so it's a crazy way to do it but whatever until we get our extrude node this is what we got points to volume is going to basically create this dense volume with the sphere on each point which is why i divided this so you can see the more points we have the more well distributed this is so this is actually going to give it thickness in a sense because if we now do a volume to mesh so mesh to volume volume to mesh we now get this thing with thickness i thought it was actually pretty clever uh when i came up with it so set shade smooth we got a nice star and we can actually modify it so something like that you can think of this as our resolution slider here so something like this and we could try doing the same thing as before now that we have a kind of a uniform distribution of a points here we can try kind of pinching it in words and outwards i don't know i don't know if i even want to but we good you know what [Music] no no no i'm happy with it it's a start uh so now what we want to do you got to know when to give up uh we want to take this apply a material kind of reposition it and all that and kind of slap it on top of our tree and just call it call it a day maybe negative 90. so we orient our star to make this higher res i believe we bring down our voxel amount no we bring it up there we go that'll make it nice and smooth so let's try 150. i like the look of that we take it we join it with our tree you notice that it's huge so we fix it and i'll actually show you a neat little trick that i uh have come up with so once we god uh once we have our tiny star that is so tiny that i guess it's in the tree uh we need a way to kind of put it on the top of the tree and more so um we need a way to okay we need a way to put it on top of the tree but when we modify the height and redistort our cylinder which again is driving the tree that height is going to change so we need a way to procedurally update this here's what i've come up with it's very simple but i think it's effective so remember way back here on day one 30 minutes ago we had this distorted cone if we can extract what the top point of this is the z coordinate then we can use that to custom modify our star at any moment so that's what we're going to do we're going to throw an attribute statistic i'm so spent attribute statistic is going to let us get information about any attribute including the maximum of it which is kind of what we care about so we're going to take this geometry we're going to say what attribute do we care about we want the position but more than that we care about how tall this is so we're going to look at the z coordinate so we're going to extract that and now we have this max value that we can use to translate this you see so we move this on the z axis so again what i've done here is i've extracted the largest z coordinate no matter how we edit this meaning if we i'm just going to throw this through a separate translate i can connect this here and maybe we just got to add a bit more to make it appear oh wait it's because we're not viewing it dummy let's view the geometry so i think our star is somewhere there i i beg that it's somewhere there we're gonna vector math add a tiny bit more where's our star oh wait wait i know what's wrong i know what's wrong we gotta undo all of this should be set to zero zero zero there we go um so now ours no wait this is one there we go i found our star uh so now it's you can notice it's already been teleported to the exact top of our of our tree but because the thing was already centered i am a mess it's going to move the center to that point so i'm just going to offset it by a tiny bit before then there we go and now the key inside is what was the point of all this the point of all this is if we change the depth or the quality of our tree our star is always going to move with it oh yeah you distort it still gonna work beautiful um so i guess let's just make the star not look like garbage is that a plan yeah so i believe uh it's smaller it's probably a bit lower so it actually looks like it's part of the tree like it's actually tied into one of those leaves and i'm just going to move it a bit on the y-axis other direction there we go and uh we just got to apply a nice little material look at that cute little star and by the way the entire thing's procedural you want a seven pointed star boom seven pointed um we need to throw this through a material so finally set material uh we could kind of bank on the glow material working but it could be red or green it's green we could just be happy with it or you know we could just make a material for this but i kind of like the look of green maybe i'm crazy um let's just make a star material throw it through the star get rid of this use the base color here make it a bit more yellow and there we go so final test of this christmas tree what can we do here can we make it stupidly short yes can we make it much taller yes and with that much taller can we give it more character so it doesn't look like a stupid cone yeah that looks great yes can we change the amount of um lights we can can we add a stupid amount of lights it might take a minute might take a lot of minutes but we can yes this is the victory lap boys enjoy it while you have it um and okay you know what i know when a tutorial is done you you get the points at this point you just take all the values all these procedural bits and knobs this is too long of a tutorial you take them and you modify them until it looks like the tree that you want but this is the uh 95 of the work to get you there so now you just want to pick numbers that look good so either way this monster tutorial is over um i want to thank the patrons at this point my god i mentioned in the beginning that this blend file is going to be available on patreon and that's going to be the case you might want to pick this one up because it takes a while to set up either way patreon there's some something like 720 at the moment active patrons i want to thank all of you in the credits and why should you as a viewer who made it through this 45 minute tutorial why should you care why should you click that link in the description and join patreon well there's a lot of benefits one is you get to support this and the cg matter channel it's the main way it's funded but also blend files and at this point i've a couple hundred blend files you can download all at once so blend files early access to tutorials you could have seen this early yes this was posted a day or two before you saw it um exclusive tutorials i recently did a um it was a long one a 45 minute again tutorial about the ritz cracker thing i went in depth so you can check that one out too a lot of tricks in that one um all of those things are there so if you're interested in kind of taking up your membership to the next level you're a large penis individual and you belong on my patreon then you know what i'll be happy to see you there i'm done with this thank you for watching and a merry christmas when that happens
Info
Channel: Default Cube
Views: 11,091
Rating: undefined out of 5
Keywords: blender, tutorial, 3.0, geometry nodes, geonodes, tree, christmas tree, procedural, nodes, cg, cgi, eevee, cycles, 3.1, vfx
Id: uJCmdcaZih4
Channel Id: undefined
Length: 47min 48sec (2868 seconds)
Published: Sat Dec 18 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.