Make a Procedural Snowflake in Blender

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so recently for my work i've been doing some fractals which means i have to make patterns that are repeating over in the organ so i thought let's try to make something in blender as well which might not be you know as simple because blender isn't like very fractalish program but with geometry notes we can do something we're not gonna delete the cube which is pretty rare don't you think so so i'm gonna scale this cube down to for about this size so basically we're trying to form this kind of a crystal here as you see and i'm gonna scale it like that let's say eight and now i'm gonna do so that i'm gonna scale this on the y-axis so we have like this kind of a shape so the next thing what we have to do now is that i'm gonna go to the face mode select these faces here and also the face is down here and press i which means i'm going to inset those and as you see we have this like a problem here this isn't insetting like in a very nice way so what you need to do is to apply the scale and try again and now this is better and i'm gonna scale those on the y-axis no on the z-axis right so we have a crystal shape here which is looking pretty okay and also i added like a little indent in the middle here what we need to do is to inset once more and then extrude but actually command z let's not extrude right now let's select from this menu here extrude along normals which means i'm going to extrude those inside and those inside as well but they're going to extrude in the opposing directions right so extrudes like that you're going to see from the sides and this is our crystal so how do we add a geometry node thing now so first let's add something we can add those geometry nodes onto for example this cube here geometry nodes select the cube and add a new set of geometry nodes and let's delete this group input here and let's add an object info node which means we're gonna input this detail here into the set so now we have this uh finger i can hide this detail and also hide this one and now what you have to do is to add a branch uh or like where is i it's here what we need to do is that we need to add a branch like here and also here so this is like the most simple way of making a snowflake so let's do that let's add it transform node because we have to transform it and let's add also a join geometry node let's drag this one here let's track this one here and now i'm gonna move this one for example on the x axis and you see we have a different copy of this uh detail but the problem is that if i want to rotate it for example it rotates like that and this isn't very good because it has to rotate from the point here not from the middle point here because then it's going to like stick out properly so to fix that i'm going to take the detail thing here i'm going to move this on the y axis so that it has the origin point down there so something like that and now i'm gonna hide it again and let's see how we can move this little branch here so move this up for about here and if you look at snowflakes you see they have pretty much like the angle of 60 degrees there so i'm gonna add the angle of 60 degrees here and now we also have to make it smaller so for that i'm going to add a value because this is going to allow me to scale on all the axes at once but we don't want to scale on all the axises at once because you know on the z axis they should remain for about the same scale you know so i'm going to combine x y z combine x y z and on the x and on the y i'm gonna scale this but on the z i'm gonna keep it the same thing and let's say this is our scale so for about let's say 0.5 let's see how it looks it looks like that we need the second one also so i'm going to take the same transform nodes and track from the geometry to here and connect it to the join geometry and rotate it minus 60 degrees and also add the same scaling from this combine xyz and you know here we have the same thing maybe on the x they should be actually in zero so this is our snowflake and also you see the c scale should be a bit smaller so i'm gonna go to this combine x y z and make them a bit more reasonable on the z axis so we have the first iteration already like this first step of our snowflake and this is actually gonna work from this from this very moment so i'm gonna do like that so shift drag and i'm gonna add those dots here so that now when i group this whole thing together everything together here uh these dots are gonna stay inside and you're gonna see what i mean by that command g and dots are inside and we have you know this value and all those other nodes outside and the dots are going to make make it so that we don't have like a million inputs here so dots are here very handy things and i'm going to take the x scale here which is going to be our scale i'm going to call this scale and i'm going to drag this to the output of the group so that now the group has the geometry input and geometry output and also the scale output and why is this important you're asking me well if you take the node group and you put it here then nothing happens but if you connect the scale here you see we have another repetition of those so for example if you could have like a different number here we could have different scale also and you can play around with that i'm going to keep the same scale and i'm going to duplicate those notes so that we have a reasonable branch of a snowflake for example something like that maybe we can even add one more yes this is looking very nice without with yes this is definitely better so this is the branch and now we're gonna add the whole snowflake so for that let's add another plane for example it doesn't matter and i'm gonna add a set of geometry nodes where i again delete the group input and add a circle so the circular should have six vertices because this is gonna be the basis of our snowflake on each of those points we're going to have one of those branches and to do that well we need a point instance node point instance let's instance the branch bump we have a circle but as you see all of those like little branches are facing in this direction or yes in this direction so to fix that what we have to do is to use an align rotation vector node and set the vector here down here to attribute and use the attribute as the position so this means that from the center here where the circle is the center point of the circle we're going to draw some vectors to each of those points and the this node here is going to try to align all of those branches to those vectors so right now we're aligning on the x-axis let's try z doesn't work does something like that let's try y and this does work so this fixed let's just increase or decrease the scale so that we have a really nice little uh snowflake like that very nice i'm gonna move the branch through it here and let's see they are intersecting quite a bit so this might be what you want me well i don't want that so what i'm gonna do is that i'm going to move those branches up a bit like that like 10 meters and also i'm going to decrease the scale like that let's check what my snowflake looked like it looked like that so basically it had some more uh more iterations and more repetitions so uh i duplicated this note group here and this looks like that and i'm gonna add a joint geometry node in the end here so basically what i did here is that i took the node group and i made a separate node group out of that which means pressing on the six here so this is the node group zero zero one and i'm gonna make it negative so now we have the negative crystals growing here and i'm gonna add another repetition with the same scale duplicating those like that so basically this is like that maybe we should also increase like do something like that this looks maybe not the best but anyways this is how i made this thing here also it seems to me that this detail here is way too thick so i'm gonna take it on the x-axis and scale it down like that and now we have the snowflake and the very important part of a snowflake is the material so go to the shading workspace and here you're not going to add the material to this object here or this object you're going to add material to this object here so this is called material right now i'm going to call this ice and delete this thing here and also switch to cycles because cyclist is a lot better for this kind of caustic and glass and ice stuff and now let's switch to the hdr which is a bit more like a world or winter type hdr here like that and now let's add a material to this object here which is going to be a glass material you guessed that right and we have the snowflake goodbye the tutorial is finished no it actually isn't we're gonna make a a nice effect on that one actually this is like the correct way snowflake should look on the pictures with like made of the microscope the snowflake looks pretty much like this thing here but we're gonna make it a bit more artistic so for that we need a geometry node right because we're making everything with geometry nodes and switch to the parametric thing here which is going to triangulate the faces and basically it's going to give us like this like a crystal type of a of a bump so i'm going to add a normal map node here and do something like that and now it looks very very bad i'm going to plug it in normal this is way too strong so let's decrease this to 4.2 and now you see these crystals look a lot more like snow crystals so without it was like that like a very plain thing and with it looks like that it has more interest now also the ior or the refraction index of the ice isn't one point one point i just forgot the numbers in english 1.45 it isn't 1.45 it is 1.306 6 for about this kind of refraction so this made it look more like ice at least in theory and it seems to me that also in practice and what we're going to do now is that i'm going to add a noise texture so a noise texture is basically gonna give us like a bump that looks like that you know it's gonna basically form these kinds of like things like this kind of pattern here and you're gonna ask me how do you do that well i'm gonna show you in a minute so first you need texture coordinates for each noise texture you need some coordinates you know and connect the object to the vector and right now the noise texture looks like that not anything like this pattern here so to fix that i'm gonna add a mapping node put it here and now we can move this for example on the y-axis which means um we must switch to ev for a minute so that you can see this in real time so the noise looks like that and we can move this on the y axis here which means it's gonna move but what we want to do is to move it only on the y axis on the sides here we don't want to move this in the center so that it forms like this kind of a shape and for that we have an attribute separate xyz node so separate xyz to take the object put it here and you have the x separation here so let's use a combine xyz node now and let's use this as the y movement as we want it to happen so right now the noise texture looks like that it's like tilted so it's basically having like this movement or this tilt on one side of the crystal but it's not having this on the other side of the crystal so to do that we need a math operation called absolute so absolute nodes x without absolute looks like that but with absolute it looks like that so this is gonna make it so that the noise texture in the end is gonna look like that but it's not very like it's inverted and in my opinion it looks better if it is like if the like the cones are in the in another direction so what i'm going to do is that i'm going to add a subtraction node and subtract this whole gradient here from the value of 1. so this inverted it and also let's see how this noise texture looks right now and this looks exactly as we have wanted so if you want to make this stronger what you can do is that you can just take a multiplication node and multiply it and it starts to look like that very nice maybe i'm going to multiply it with 2 and then it is finished let's switch to cycles again and let's use this noise here as the bump for this thing so i'm going to take the bump the normal due to normal and the factor or the color to the height so the bump right now looks like that quite some nice bump for a snow crystal and i'm gonna decrease the strength to 4.5 the distance to 0.5 and the strength to for about point 15 maybe even more maybe let's say point let's say 0.2 so this is the thing here and it's maybe a bit uh too dense so i'm gonna decrease scale for about two and this seems to be finished so let's see how the glass looks pretty nice so this was the tutorial and if you're interested in the project file this is available on patreon and then i also have discord where you can chat with some people doing also blender and some procedural stuff mathematics asking for help all that stuff so this is the discord if you're interested check this out and i guess that's pretty much the story here
Info
Channel: Bad Normals
Views: 6,515
Rating: undefined out of 5
Keywords: #geometry nodes
Id: l4nai4Cr1to
Channel Id: undefined
Length: 15min 17sec (917 seconds)
Published: Mon Jul 19 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.