Blender Shortest Path / Geometry Nodes Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
now we are going to talk about the shortest path so I've just import 3D model from this website it got a lot of sculptures 3D scan model it's really high quality scale it down a little bit first take a look at this boyfriend it got a lot of detail which is good because path is demonstrated by your wireframe it will not go through the face it will only go on the edge so detail is good but we can make it less detail faster process use this modifier and just make it less detail now we create a plan that's for our geometry node I call it path we want to use this to create the shortest path so let's create a geometry note and new we will not need this that is like a anti-geometry note let's take a look what we are going to do so for the shortest path just type path so you will see these three let's take all out so that's the three note or the shortest path first we will see that is the main one drawing out the shortest pack and we will see this one pretty similar to this they do the same thing just the one is for the selection one is for throwing out the actual curve don't worry about this first let's worry about these two so these two they work together you will see there is like a start vertex and the N vertex so we will want to give a star vertex and the N vertex so we can draw a line or a path that work together right away we can just plug this to the next vertex because they have the same name so just have to plug this in so you see this n vertex so we just try to type vertex so we use this Edge vertex and use a vector math and set this to be distance and plug these two thing and plug this to the cost so what this do is it calculate all the edge every Edge is demonstrated by two vertex so which you have this vertex 1 and vertex two and position one and precision two so you will take out the position of two point and you use this get the distance so we will feed that to the Edge cost that is the usual setup for this so now track this into our geometry node and set this to be relative and we use this for the mesh I'll put that so now if we hide our original sculpture we will see nothing that's because we have not given out the start vertex and the end vertex so we can give a random value to try you set this to be Boolean and to see have any result so now we have some random Edge that being drawn out that's because some of the start point of the end point and they will connect them as the shortest path so now we know it's working so that's through something that is easier to understand so that's set some of the point to be the start point I want to buy this because I want to go to the other mode so I have to apply that I go to Adamo and I select some of the point this point to be the stop point so I give a Vertex group [Music] SP for start point and I assign that okay so select so it's been select another one over here okay so and make this to be endpoint outside that is the end point that is the start point so let's go to the geometry node on this path so we can use this named attribute to hold out the group on this geometry which is this so if we see here we can see there is these two attribute on here so set this to be Boolean and we can plug this use the start point and use this to the end point if you hide this we can see we're actually drawing a path use curve to mesh or Circle to draw it out or we can see it so now we can see we actually drawing our path and let's try something plug this random Boolean to the start point we got something that looks pretty cool you have to set this possibility to be really low because if it's really high it will draw too much and it will crush your computer so just be careful about this let's take a look if we go down to the end point will that do the same it will not do the same it will be a little bit different so let's discussed what is the difference between we plug this to the start point or the end point so now if I plug it back to be like this so we use this random point to be the third point so which is like everywhere that you see this kind of it seems to be the end but actually is the start point every point it will go to the same end over here so everywhere you see this The Edge is the start point from here to all the way to there we have a lot of start point and if we plug this to the end point start point like this it means we have a lot of end point but we only have one stop point the start point it should be here and you will find only one shortest point when you find it it just stops so the start Point means it definitely will be drawn out and from there it will find the endpoint an end point kind of like your gold but when you meet the closer endpoint the start point will just stop drawing so now we know this we can very quickly have this cool result but uh if you see it like a closer if you see here it means it's kind of like overlapped together here it's only one and we meet here this stop point and this start point it made over here and they overlap together and we keep drawing when it goes to here it made all the things from here and this it means like a small branch and they all meet together so you have a lot of unnecessary vertex in this case we will need to merge them together so that's just you search by distance they're much by distance it don't work with the Curve the output is curved so we have to invert that to be mesh so curve to mesh now it's been merged but and now we have to invert that to be curve again so now we will not have that unnecessary overlap then if we want to we can use trim curve trim curve we work with curve so it had to be before the curve to mesh so if we put it here and try to drag this uh it's not what we want it will trim from the connect point which is everywhere you have Branch it's not ideal we will have to put it in the beginning and let's try to do that so now it's like rolling out so you can have some very cool animation for this but uh it's not perfect because if you see the wireframe you can tell it's not quite perfect yet so this it needs a lot of customization for make it to be perfect so actually I'm still developing that now it's just like the most simple idea so let's try to make one more endpoint to see what will be different maybe we put one more end point and one more here so now we have three endpoint so all the points that being select from here being joined to this three endpoint so let's see if we use the start point because we only have one stop point over here and the closest endpoint is over here so it's only draw to there so let's see if we make a closer endpoint let's see if that will being connected here so aside yes so that is the shortest than this and this and this so you go there so let's make one more start point so if we make it took here I believe here will be one more line so that's C right because I know here is the end point and this path will be close it will not connect to here because here's more closer so we can try to have more and more I believe it will be drawn to here somewhere here yes so that is basic demonstration of the start point and the end point let's try to give us some material yes so that is the basic demonstration shortest path because this is like very powerful new note for the 3.3 so I might discover more things about this this is just a quick idea for you to understand hope to see you in the next video bye bye foreign
Info
Channel: NENGHUO
Views: 25,076
Rating: undefined out of 5
Keywords: blender, Tutorial, Geometry Nodes, Curve, 3d, Effect, Render, render, CG, GeometryNode, VFX, Art, Procedural, GeometryNodes
Id: nISHVJQAwD4
Channel Id: undefined
Length: 10min 54sec (654 seconds)
Published: Tue Oct 18 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.