[Tut] Align Euler to Vector Node Explained - Blender Geometry Nodes 3.0 Field

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everyone this is bradley so today this is a sudden thought to make a tutorial talking about align ruler to vector node within geometry nodes this is very important for you to have a correct rotation or correct alignment when you're instancing objects so let's start so here we're in blender and this is a pretty simple setup that i have a curved circle and i instance comb onto each point of my curved circle so i can change the amount this is completely procedural usually when we instance the object on a circle we want to have a specific orientation for example in this case i wanted the points of my comb to face outwards of the circle okay in such kind of case you always need to use the node which is called align euler to vector i frequently call this as a line rotation to vector because i think it's easy to recognize but we still need to understand what's the definition of euler and what's the definition of vector vector is also commonly being called as x y z within blender a basic idea is you have a three any numbers in terms of x y z axis it's just that simple but the rule is also very similar but the only difference is ruler contains units of either radius or degree in this case if i rotate these columns 180 degree on x-axis they they just flip the downwards and you can see these changes about how they actually flip their direction okay and if i type in 180 degree in this xyz you won't be able to have the same effect the reason is this xyz will be interpreted in terms of radius radius is a units converting to degree and the conversion is about a pi equals to 180 degree okay so in this case instead of typing 180 to have the same effect we need to type actually pi which is one point one three points of 142 and so on so forth okay so this is the idea vector or xyz commonly refers to a location in our 3d space vector auto function as a way to indicate the direction of how objects will look at for example if i directly plug this rotation to rotation and we can see all these half changes happening immediately since we're going to move all this console pointing over comb then i'm going to switch that to z and immediately we do not see any significant change compared to the most beginning in which we do not have rotation but at this moment we are actually asking the cone to look at upwards which is zero zero one so if i delete this zero zero one and i asked to one zero zero then you can see all this kind of comes is looking right if i go to negative value then it goes to left if i goes to y values then they're going up and going down okay so these are the way that we manipulate or discount for orientation of all these components but none of them bring us to our final goal that's to have these cons facing outwards so here we are going to access some direction attribute that has been provided by from all this kind of curve so there are two kinds of direction a curve can offer one is normal which is always tangent to the direction of its flow another is the tangent which is following the direction of a curves flow so we can call the normal as normal and the other attribute is curve tangent you can see the difference between these two kind of vector attributes one is not specifying the curve normal because this attribute is also used for polygon and the vertices the other tangent however is really used for a curve for the moment okay so since we are asking all the sound kong to facing outwards then we are going to plug this normal to vector and immediately we have our results a very frequently mistake that i've seen people doing is that they plug the normal into rotation and they say hey this node is not working for me so please really pay attention to the name of this node which is called align ruler which means align rotation to vector so you need to actually assign everything to vector instead of rotation you're using vector to assign the rotation not using the rotation to use the rotation okay so this is a very important concept and here we can actually try with the tangent as a vector so that you follow the direction of our curve flow or you can use the normal in all the other cases what if i want to ask our cons to face inwards you can definitely factor mass and scale down our normals to a negative values but obviously you can see there is a better method that's just by manipulating this factor to negative one okay so this is kind of idea here let's move on to another example that i started with a cube and i want to instance our comb onto the polygon center of our cubes so i use the mesh to point so that i generate all these components on the faces and then i'm going to instance the comb onto these kind of polygon points however even if we do the normals and align ruler to vector these are not working at all okay if we disable these meshed points then everything we're instancing is on the vertices of our cube and the rotation is actually correct so what's the problem happening here the problem is very simple that once we convert a mesh into points we lose all this kind of direction like normals or tangent or whatever stuff okay so in this case uh what should we actually do we need to capture the attribute this has been explained in my capture attribute tutorials already and since we're going to capture attributes on the face then we just capture our face okay so this is how we do there's another method that you can do is the transfer attribute either you transfer the attribute from your original mesh or other mesh it does not really matter but the idea is basically the same just uh so if we keep these and it does not work correctly the reason is that the points need to convert the phases so in this particular case i think a capture attribute is much more sufficient than the transfer attribute to actually work with so here let's move on to our third example that i have a spiral spiral curve and i instantly call on to your sound points this is kind of basic setup we have normal aligned ruler to vector however there is something wrong with this setup you can see all this software initially all this half cone is facing inwards but later they started facing inwards and downwards so there is some consistency of their direction but something's wrong and this kind of issue is more prominent if you try to rotate this rotation so you need to actually understand the difference between vector and rotation at different time points when we're using this online euler to vector so that you can have a different idea of what we're working with usually if you're working with rotation it will be better if you're rotate ruler again is the rotation so it means rotate rotation there are objects more than the local modes i usually recommend the local mode because it's it's probably the usage for most cases and if we rotate on this y you can see how this coin is rotating on their local axis so each of these kind of cone is having their own local axis for them to rotate and now you can actually see the issue becomes more prominent that some of the comb is looking upwards some of the cone is looking downwards so there is a inconsistency of their rotation but why so this comes down to the reason of the kind of limitation of a line euler to vector so here is an example that i have an empty uh for example let's take this at arrow and what is aligned euler to vector node is doing is basically to ask this entity to look at a specific direction with one of its axis so in this case like we're asking the z-axis to looking upwards so this is what it's doing however thinking another scenario that i have another empty and i rotate the a little bit so now this empty is also looking up the axis but its xly orientation is completely different from the first one and we can even duplicate another uh empties and we are having a completely different orientation again and there are unlimited possibilities so basically this story tells us that just a lot locking one axis is not sufficient enough okay so here what we can actually we need to actually do is we need a lot another align ruler two vector nodes and in this case you either lock on x or x lock on y and we're going to plug these rotations to the rotation so what's another vector that we need to actually assign in this case as i mentioned earlier there is another direction we can access for the curve which is curve tangent right now immediately it may not be very obvious how it actually changes or improve your setup but if we turn on this rotated ruler then you can compare with or without the linkage of this curved tangent and the align rotation to vector so we actually achieve more kind of uniformity if we have a second locking of axis compared to only just one locking off axis so you can play around with different kind of a spiral or curves so that you can actually see how this kind of setup is actually benefiting you another very important thing is our curve is not really showing any difference between its x and the y but if you're using kind of empties i think it will just be shown better okay but either way you can play around you know three times i'm going to move on with our last example our third example is basically talking about a grid and empty basically i want to achieve an effect of track two constraints so i have tons of objects and track two constraints is basically asking the object to look at a specific object for example maybe a grasp looking at the cameras or other things okay and in this case instead of using normals as a function of direction i'm using the location of our controller which is an empty as a direction to look at so now by manipulating these empties actually they are not looking at my empty at all because the point is should really go that direction that direction that direction that direction but these are not working this way but if i move empty there are some effects but it's it's still not very accurate so what's wrong with this setup okay previously you probably already realized how we actually assign this vector to control this kind of orientation so basically all this kind of orientation is determined not by actually one vector but the two vector so there is a heading vector which is zero zero zero at water origin and all this half direction is relative to the wood origin that's why if you use zero zero one then you are drawing a direction which is facing upwards okay this also means whatever vector that you input is not relative to each individual position of our instance in this case what we actually need to do is to actually take a vector mass and subtract their original location so let's take the position attribute then immediately you can see we achieve the effect of track to modifier so basically by subtracting their original position we are resetting the origin back to the word origin so we eliminate the all this kind of discrepancy between their positions but the location of object is kept consistent you may not really need to understand all these kind of theoretical backgrounds but this is how you do if you're trying to make a track to modifier so i think that these are everything that you need to know for a line relative vector i basically covered every kind of usage whether it's on a curve a polygon surfaces or track two constraints so if you have any questions you can comment below or join my discord server i hope you enjoyed this tutorial and probably see you next time bye you
Info
Channel: Bradley Animation
Views: 2,999
Rating: undefined out of 5
Keywords: blender, b3d, eevee, procedural, animation nodes, mograph, motiongraophics
Id: 0E1K9j9zoik
Channel Id: undefined
Length: 14min 22sec (862 seconds)
Published: Wed Nov 10 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.