Blender Tutorial: Procedural Cobblestones using Geometry Nodes

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey folks in this tutorial i'm going to show you how to create this cobblestone style effect this is something that you can't get through instancing to get this tight packing this is using a lot of the new notes in 3.1 like merge by distance dual mesh scale elements i'm going to control the packing and then the mesh island node gives us an attribute that can be then used in the material to adjust those random colors and this will work on any sort of geometry so it's quite a versatile technique so let's make a start on the tutorial let's start with the usual setup cube new network delete the first node start with a grid and make that a little bit larger three by three and 20 by 20 vertices i'm just going to turn on the wire frame so you can see what's happening with the mesh first thing i want to do there is actually merge some of these points together it's a really useful node so if i crank that up start saying we're getting this very interesting triangulated style mesh i'm going to put a line about 0.3 to start with and i want to follow that with the dual mesh so mesh dual mesh and you can see what that's done it has basically turned all the vertices into a face so again this very organic looking layout here certainly wouldn't be able to get it any other way and then what i want to do is split out each of these ngon faces so i just want to grab the split edges doesn't look like anything's happened there but if i then bring in the scale elements and put that down you can see what the split edges has done basically split up each face into its own separate mesh island so now we've got that there just a matter of smoothing that out so i'm just going to use subdivision subdivision surface just on a level of one and then i want to extrude that so extrude mesh bring that down and i'm just going to come into evie mode here the i o on and probably don't need to see that wireframe anymore so you can see the start of that cobblestone look now it's just a matter of subdividing that again so i'm just going to shift to duplicate by default the extrude is actually on individual which kind of does give an interesting look but quite what i'm after this time and then i want to smooth that out that's basically just got rid of the faceting it's giving us some smooth shading now we've got that we can start bringing in the color so new node got mesh mesh island what this does is creates an index for each island so i'm not sure which order it's going to go in basically each one of these individual islands is going to have an index from 0 to whatever the count is so this gives the index and this gives the total number of islands so by using both of them you can get a value between 0 and 1 to then drive a shader so to use map range what we want out is zero to one so here's the index island in here and the island count into the from max because that's basically saying from zero to how many there are there let's say that there's 30. remap 0 to 30 to 0 to 1. then that result going to put that into the group output node so i generally like to change that name i'm going to call that island and now that shows up in the modified properties here island still need to give that an actual attribute name i just tend to match them open up the shader editor and so i'm just going to put the default material on it's going to pin that and then use attribute up here and match that name island and that color you can go into the base color i think it's not doing anything yet because need to apply a material to this geometry knows network set material put in the material and you can start seeing something's happening there and i probably should have done the factor doesn't really make any difference but seeing that is a floating point better off using the factor there you can see the gray being converted by blender to the yellow of course the yellow being a color socket and just run that through a color ramp you can see what's happening there don't be misled that's not a gradient of going across it is giving a unique solid color to each one of those mesh islands which you can see there if i kind of crunch that up so most of the time you're probably going to want more of a random distribution of these colors actually a simple trick to do that i'm going to grab the white noise and that result going to go into the vector and the value into the island because that white noise is essentially just giving a random value between zero and one and that vector is really acting as the random seed and so as we're getting a different number in there per island getting a different randomized value there you can change these color knots to whatever you'd like let's say a red to a pink and maybe one knot in the middle to an orange we're going to change to something more interesting mesh wise just so you know this works on things that other than a plane just gonna put in good old monkey drag that into the network and swap out the plane for the monkey and hide it you're getting this very interesting effect and as you can see if you put that distance down and then play with the scale elements and that's going to shrink them in so you're trying to get it to the point where they're touching but not quite going all the way through he's not working so well around your eyes because they are actually separate objects in that monkey try any other mesh in here and you'll see it generally does work kind of depends on the original distribution of the polygons and then you can also play around with for instance you could put a noise into this you put noise texture into that extrude and then map that range change that from 0.3 2.8 because that's generally the range of the noise texture it doesn't go below 0.3 or above 0.8 and then we can just fiddle with that so we're going to give a little bit more randomization to that depending on how you have that scale that's the end of the tutorial hopefully that was useful thanks for watching
Info
Channel: Redjam9
Views: 20,254
Rating: undefined out of 5
Keywords:
Id: LJD3nvFXCLE
Channel Id: undefined
Length: 13min 39sec (819 seconds)
Published: Tue Aug 02 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.