Blender Geometry Nodes: Vertex Normals - Alien Orb

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hey this is manuel with intagma and here i am with a new geometry nodes tutorial the development of geometry nodes does not stop and so they added a new feature to geometry nodes into blender with one of the latest builds and that is the support for vertex normals long awaited now that it is here i thought take it and build a little setup around it so let's try to build this alien vertex normal space blob inside of blender using geometry nodes this setup is a little bit more complicated than usual because it relies on three levels of geometry nodes so we will have one object featuring geometry nodes that feeds into the next object with geometry nodes and a third object with geometry nodes and the three objects combined gives this little effect so let's dive in and start building before we start let's have a look at the blender version that is the version that i am currently using make sure to use at least this version or a later one i think that is the first one that supports vertex normals now let's start delete the default cube instead go and add an ico sphere let's up the resolution to five that will be our base object this surface will be used to distribute the points so double click the object and call it zero one it's the first step and call it base let's get ourselves a new editor and switch it to be a geometry node editor we need a new node graph and call the node graph base 2. the very first step now is to distribute points on this surface so let's get a point point distribute node and connect it here it starts to be random i don't want it to be that random so let's switch over to poisson disk and it's up the density to say 50. now it's far too dense so use a distance slider to get less points but this time evenly distributed that is what i want to work with to animate these procedurally i need the current frame as a variable inside my geometry nodes network and there is currently no node outputting the frame so we have to use a workaround create a utilities math node switch to multiply we need this later i just created to be able to drag this to this hollow port here and that creates a new port on my group input it can be found here and you can rename it to frame you don't have to rename it to frame it's just for clarity that creates a new value here on my modifier called frame i can use a driver to drive this value procedurally so click here and type hash and then frame that automatically creates a driver that's why it turns purple if you now scrub the timeline you see this value is updating with the current frame and this is piped into the geometry nodes network so now we have the current frame inside of geometry nodes let's create a new math node attribute math and let's switch it to sine because i want to calculate the sign of the current frame switch this one here to float connect the frame connect the geometry to this node and the output to the output geometry let's call the result sine now we have a sine but we do not have any movement yet see that means we have to use this sine to scale a displacement vector and this displacement vector is our vertex normal so let's create a new attribute vector math in this case because we are dealing with a vector the vertex normally is a vector switch it to multiply because we want to scale the vertex normal click here switch this to be vertex normal the second attribute b should be sine and the result goes into a new attribute called disk for displacement now we have a vector that is modulated by the sign the last step is to add this vector to the current position of the points to make the move duplicate this attribute vector mass by pressing shift d change the attributes now i want to start with position i want to add to the position and i want to add our disp vector and all of this goes into position again see the position changed and now if i move the timeline you see that i have a little procedural animation of course these points do the full range of animation it's too much for my taste so let's multiply the sign down a little in front of these two attribute vector masses let's create a standard attribute mass to just deal with the scale of the sine and switch it over to multiply we want to start with a sine to multiply it by a float switch b to float and type 0.5 here and this goes into sine you see that the movement is not that extreme anymore okay that's nice but everything is moving together and i would like to have a little offset for the individual points well we could use a random value for the individual points for this create a attribute randomize node and put it at the very beginning of our graph let's create a new attribute called arend for random it should probably go in a range between 0 and 3 and now we can add this random value to the incoming frame number to create an individual time for each of these points create a new attribute math node put it here directly after the attribute randomize and i want to use the r and d variable the random the second one i will switch to float and i will connect the frame with this b here and now this frame number will be added to the random and the random will be between 0 and 3. that means we have an offset of maximum three frames for the individual points the result of this operation goes to a new attribute called frame let's add it frame and instead of using the frame directly here on the attribute math let's instead switch this back to be an attribute click here and use frame instead and now let's see what happens and you see now we have a nice little offset for our animation that is our base layer but at the moment it's very static the points are only wobbling around would be nice if they do a little more so why not rotate them so let's go to the very end here add a transform node and let's make use of the rotation part of this transform node you see that the rotation part is a vector so we have to create a vector for the rotation for this we'll need a vector combine x y z there it is let's connect this to the rotation now we can dial in the rotation along the axis we set this to zero we don't want to put these numbers in manually instead we want to use the incoming frame to drive these values if we just connect the frame to one of these values everything goes insane because it's now rotating very fast so instead of using an f-curve we can use a range map so let's go to utilities map range let's connect the incoming frame to the value of this map range and now we can remap the incoming time i am planning on doing a 300 frame animation so let's say from 0 to maximum 300 will be transformed to a value between 0 and eventually i want the entire thing to rotate once over the course of 300 frames but this rotation part here is using radians so a full rotation will be 2 pi so type 2 times pi here this will be calculated and results in 6.283 that is a full rotation in radians so let's connect this to x and let's see what happens if we press play and you see now the points are wobbling and at the same time they are rotating slowly still not interesting enough so let's duplicate this range map node let's connect the frame again this time we connect the output to the z rotation and i don't want to have exactly the same speed of rotation so instead of going from 0 to 300 i would go from 0 to 150 and make sure to tick off clamp otherwise it just stops at 150. let's see what we have here and you see now we have a nice organic animation of wobbling points it's still a little fast if you ask me but virtually we can change that by just changing the value here to 0.05 say now let's have a look and that is better now it's slow and beautiful the next step is to replace these dots these points with actual objects i could in theory just put a point instance node directly into this graph but that has a downside because i want to use these points later inside of a second graph to drive the animation of the sphere for this i need individual points and not objects that is why i do the instancing in a different object just create a new say plane it really doesn't matter because the geometry will be overridden and let's create a new geometry nodes graph let's call this instance let's call the object 02 instance and let's build a instancing setup for that we will need an instance object so let's create another mesh icon sphere this will be the instance like so switch into edit mode and scale this down quite a bit and now switch back to our zero two instance i need these points that are created in this base object so let's create an input object info let's select the base object the points are incoming of this geometry port here i can now create a point instance connected to this geometry and connect the output to this geometry the plane immediately vanishes but as soon as i now select our the instance object for the instance the geometry is replaced with these instances and now we have a beautiful animation of not points wobbling around but spheres wobbling around to create the third and last part of this effect let's create a new icosphere like a sphere it needs quite some resolution so i'll go up to seven with the subdivisions because we want to displace it and for that we need a lot of points let's rename it to zero three third part of the effect displays give it a new note graph and call this displace2 to keep everything organized and now we need the base points to drive the effect so let's create an input object info and bring in the base points i plan on creating a distance function on the surface of the sphere so let's create a attribute proximity node first switch it over to points because the targets are points and now connect these base points to target and the geometry of the theater geometry i want to create a float function so put an attribute next to distance and call it dist and connect it up to the geometry output at the moment we don't see anything so let's use the same trick as in all tutorials create an attribute color ramp connect it here and remap the dist to a new attribute called call to visualize this go to the object data properties open vertex colors create a new vertex color layer it is called call by default and because this attribute in this layer here have the same name this data gets written to this layer to see it in the viewport we have to switch over to vertex here and you see now we have this distance function and it updates because everything is procedural but we don't want these reptile skin mask regions here on the surface instead we want little circles around the spheres and for that we can use the attribute color ramp and if you just move over this white spot here you limit the area of influence and get these circles now let's use this for displacement we shouldn't use the color directly for displacement because color is a vector we want a single value to scale the displacement vector so let's use an attribute separate x y z to separate this color vector into its components so color and let's call the components val x for value x well y and you guessed it val v we only will use val x though and now for displacement you know by now how this goes we need an attribute vector math switch it to multiply and we want to use a base displacement vector in this case it is the vertex normal of the sphere because we want to displace it along the normals we multiply by this value here val x and the result goes into a new displacement vector called disp and now we want to use this displacement vector so duplicate this node switch it over to add we start with the position of the points we add the displacement vector to the position and everything goes into position again and here you have the displacement but we have a problem at the moment the object doubled in size because remember we use this node here for the value distance the value disk describing the displacement that means the value dist is going between 0 and 1 because black means a vector of 0 0 0 and white means a vector of 1 1 1. the displacement starts at the surface and then goes outwards 1 unit what we want instead is a value range between -1 and 1. and because we don't have a range map attribute node yet we have to do it manually so let's create a new attribute math and put it here between the attributes separate and the displacement nodes that move these over to the right first let's transform the range zero to one to the range zero to two by just multiplying by a float and this float is two we want to multiply the alex and let's just write the result to val x we just exaggerated the effect but now we duplicate this node switch it to subtract and subtract 1 from it we have now a range between -1 and 1 so the displacement goes inside and outside still it is very very very pronounced but now we can change that by just using the colors of this attribute color ramp if you go here to this color you see it has a value of 1 and if we go down with this value to 0.5 we have no change anymore now it is only displacing to the inside that is what we want it's just that this is not necessarily that interesting it would be nice if these little craters here would have a little rim around them we can perfectly do this by just introducing a new stop here into this gradient like so say a little further outwards like so then switch these around and you see you have the total freedom of designing your displacement effect to make this look a little bit more pretty let's switch the interpolation from linear to ease that gives more roundish results shade everything smooth that is quite interesting because now these little spheres here make the craters form and open and if the spheres are exactly on the surface the crater is the widest and that it just eats this little sphere which looks funny okay so finally the only thing that is left to do is to make this color that we have on the surface a little bit more interesting we can do that by just duplicating this color ramp node and putting it at the very very end overwriting the color with something else so we have the distance function here again and we want to override it with something that we can use for shading and for that i will get rid of this one and make this one white again like so and by moving these knots you can decide from where to where it goes and now we have a nice gradient that stretches black at the very very center deep inside of the displacement and then goes to white and the surface itself is white and that can be used for creating a shader later on switch over to the shader editor with a 303 displays object selected create a new shader and let's switch over to look def we want to use a vertex color that we wrote onto the object to develop a shader that means we need a color ramp so create a color ramp to remap these colors we need a vertex color node to read the vertex color the colors we want to read are called call so we can use these vertex colors to drive this color ramp and the color ramp goes to the base color of our shader and here is our vertex color again but now we have the freedom to define colors as we like so because we have this gradient here on the surface we can now use the color ramp to design a nice shader so let's go for a nice dark red here let's add a few stops to this gradient let's use some vibrant colors like an orange here and maybe a pink here nice pink and another orange you're totally free to pick whatever you like of course and maybe let's use the blue for here like so and now you have a nice remapping of these colors and you defined a nice color scheme for your sphere and there you have it a nice alien blob effect if you like what we are doing please consider becoming a patreon for supporting us and for access to more in-depth courses on topics like volume techniques or a pdg or vellum and more to everybody who is already supporting us thank you so much without your continuous support and tigma would not be possible
Info
Channel: Entagma
Views: 39,542
Rating: 4.9810514 out of 5
Keywords:
Id: DQVYieRfQBY
Channel Id: undefined
Length: 18min 27sec (1107 seconds)
Published: Mon Mar 22 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.