So in this session I think that I will give you a short introduction to the vector mask as well. 我想我还将向您简要介绍矢量蒙版
So start right away.
And what I get to do is hexagon. 我要做的是六角形
I stopped by an input so shift a. 我停止了输入，shift a
And then I go to input texture comment and I will use object. 然后我输入纹理注释，然后使用对象
And if you're thinking about the hexagon you can see that it's mirrored the same side or left the right 而且，如果您正在考虑六角形， 则可以看到它在同一侧镜像
is just the opposite side. 或者在左侧是右侧，而在另一侧
So we can use object and I can also use absolute to get married. 因此，我们可以使用对象， 也可以使用绝对对象来结婚
So Shift A and go to convert. 因此，Shift A并进行转换
But when I select the absolute I will not get the math. 但是，当我选择绝对值时，我将无法获得数学值
I would go to vector math so if I could do math I also have to absolute in the vector math. 我会去矢量数学，所以如果我能做数学， 我也必须绝对是矢量数学
And that means that if I use it like this I can very easily transform any negative number in any direction 这意味着，如果我这样使用它， 我可以很容易地将任何方向上的
to be a non negative number. 任何负数转换为非负数
So I put that into the object and now I'm guaranteed to never have a negative number that comes out 因此，我将其放入对象中， 现在可以保证永远不会出现负数
from that one.
So that's an easy way to do it. 因此，这是一种简单的方法
And that's your first vector math. 这是您的第一个向量数学
I believe if we take away the length that we had in the last session but after that I will do a separation 我相信，如果我们除去上一届会议的长度， 但是在那之后，我将以某种方式进行分离
in a way so I press shift a code to convert and separate x y set. 因此我按shift键即可转换并分离x y集
So we have something to work with him and then I will start to use not a thing. 因此，我们需要与他合作，然后我将不再使用任何东西
I will use something called a dot product. 我将使用一种称为点积的产品
So I press shift.
I get that.
And here I would have vector math and I would take the vector from here and I will add dot to the top 在这里，我将进行矢量数学运算，然后从此处获取矢量
product. 然后将点添加到顶级产品中
So we have it.
And I will also change this to product. 我也将其更改为product
And as you can see the output is blue it's gray. 如您所见，输出为蓝色，为灰色
So it's a value and a value we get is the angle of difference between this vector that comes in and 因此，这是一个值，我们得到的值是 传入的向量与此处的向量之间的差角
this vector here and I can show you a bit about that. 我可以向您介绍一下
So if I take a corner up here and shift a convert. 因此，如果我在这里拐弯并转移一位转换者
Colorado.
So we have something to get color from. 因此，我们需要一些东西来获得色彩
Put the vector to. 将向量放入
And take that and say Yes I have rendered view then you can say it's right now very black but if I Shange 并说是，我已经渲染了视图，那么您可以说它现在 非常黑，但是如果我想这样把您的观点分开两个
this to like your point to separate two and I dragged it out like this then you can say we get this 然后像这样将其拖出，则可以说我们得到了这个形状
shape here.
That is because I used the absolute here. 那是因为我在这里使用了绝对值
If if I take your way to absolute to get killed directly here right. 如果我走绝对路线直接在这里被杀
Then you can say it's a diagonal line here. 然后您可以说这是一条对角线
If I use that number and exactly where that line should be I can increase the value and I can increase 如果使用该数字以及该行的确切位置
the value. 则可以增加该值，也可以增加该值
So if those value are the same it will be making out a vector which sees its value. 因此，如果这些值相同， 它将构成一个向量，该向量可以看到其值
Here goes all the way with increasing value all the time. 一直伴随着价值的不断增长
Then you will get like these 45 degrees. 然后，您将获得这些45度角
Then you can change that direction with the dot product. 然后，您可以使用点积更改该方向
By changing these values here so you can make it go on any direction as you want to. 通过在此处更改这些值，可以使它朝任意方向移动
So the product is really useful to draw things with since you can change the direction of the output 因此，该产品对绘画很有用， 因为您可以在此处更改输出的方向
here and you can also put in a non static value here to get shapes that are not straight lies. 也可以在此处输入非静态值以获取非直线形的形状
But now we are working with the hexagon so we should do a straight line. 但是现在我们正在使用六角形， 因此我们应该做一条直线
However we should not do 45 degrees because we will have a straight line first but then it should go 但是，我们不应该做45度，因为首先要有一条直线
down a bit and then we have a straight line. 然后再下降一点，然后才有一条直线
And since we have a part here that is a little bit less than 45 degrees we need to do some math here. 由于这里的零件比45度小一点， 因此我们需要在这里做一些数学运算
I will go back to. 我会回去
So we're using the absolute here. 所以我们在这里使用绝对值
So take the object and put that in there and I then take the absolute here and in to this one so we 因此，将对象放入其中， 然后我将绝对值放入该对象中
get some value here. 以便在此处获得一些价值
And now you can see we are back to are square formation here where we can play with things to get correct 现在您可以看到我们回到此处是正方形的形式
and get for a hexagon. 在这里我们可以玩弄正确的东西并获得六边形
We should put in an X over 1 and Y all the square root of 3 and I can write the square root number right 我们应该在X上加1，在Y上加所有3的平方根
here. 然后我就可以在这里写平方根号了
If I know it and then calculated or I can use Square it. 如果我知道它然后进行计算，或者我可以使用Square
So I think I would use a square root to do it. 所以我想我会使用平方根来做到这一点
I put in a combined festivals up a shift a then I go to convert. 我把节日合并起来，然后去转换
And here I have combined x y since I put that in here. 自从我将x y放在这里以来， 我在这里将x y结合起来
And as I said the X should be 1 and a Y should be the square root of 3. 就像我说的，X应该是1，Y应该是3的平方根
So then I used yes to use the math of square root shift a convert and go to math. 因此，然后我使用yes来对平方根移位 进行转换并进行数学运算
So how did the math here. 那么这里的数学怎么样
And put that into the y axis and then I just changed to add into square root and I can now put in a 并将其放入y轴，然后我更改为加到平方根， 现在可以输入一个值
value so I can't write three here to get the face or you can try that out. 这样我就不能在此处写三个值来获得面， 或者可以尝试一下
You can see it's bigger like this. 您会看到它像这样更大
So now we have more space for that one. 所以现在我们有更多的空间来容纳那个
So now you can say the angle is not 45 degrees. 所以现在您可以说角度不是45度
It's a little bit less right now. 现在少了一点
So we now fixed that one and then we should do something more. 因此，我们现在修复了该问题， 然后我们应该做更多的事情
We should say so the vector is never longer than one. 我们应该说，向量永远不会超过一个
So to do that you use something called normalize. 因此，您可以使用称为标准化的东西
It's often used in vector math. 它通常用于向量数学中
So I would put in that in here before we get that value out here it will not do any difference here 因此，我会在此处输入值，然后再获取该值， 此处不会有任何区别，但最终会有所帮助
but it will do in the end result and I will show you the difference for and off goes on. 我将向您展示前后的区别
But right now I just perceive pay cash to convert and then I put in vector math I put it in here and 但是现在我只是感觉到要转换的现金， 然后我将向量数学放在这里
here I change it into normalize normalize. 在这里将其更改为归一化归一化
Only have one value in. 只有一个值
You can see it got bigger now than it was before. 您可以看到它现在变得比以前更大了
And what it does is as I said you have some y direction you have some extraction or so on. 正如我说的那样，它的作用是您有某些方向， 有一些提取等内容
And in those cases that it's bigger than run it recalculate everything. 在那些大于运行的情况下，它会重新计算所有内容
So get a value of maximum one but you keep the direction. 因此获得最大的值，但您保持方向
So if it's pointing if a hanging angle of like 30 degrees or whatever if you compare to x and y axis 因此，如果指向的是30度左右的悬挂角， 或者与x和y轴进行比较
it still will be 30 degrees afterwards but you can be assured that nothing is bigger than one in length. 则仍然是30度，但是可以确保长度不超过一个
So that is how I use normalize and that is so we can get these shapes to always be perfect for our hexagon. 这就是我使用归一化的方式，这样我们就可以 使这些形状始终完美地适合我们的六角形
So now we have that and the only thing we need now is that we need to put in like straight lines here 因此，现在我们有了这个，现在唯一需要做的 就是我们需要在这里像直线一样放置
and that we can do by combining and comparing what we get from out here we get here. 并且我们可以通过组合和 比较从这里得到的东西到这里来做到
So if they were cast if it takes us the maximum value it will fade out automatically when it's time 因此，如果强制要求我们使用最大值
to get some say. 则在需要发言时它们会自动消失
So what they will do is obtain a maximum between him. 因此，他们将要做的就是在他之间获得最大的回报
So he has squeezed chipped again and they're not pretty and convert to a math and one add here and I 所以他又挤了一些筹码， 它们不漂亮，转换成数学
would use X here combined hours and now Cassie to shrink the bed here change this into maximum right 然后在这里加一，我在这里用X加上几个小时， 现在在这里，Cassie缩小了床
now. 现在将其变成最大
Have this hexagon. 有这个六角形
So not so many notes but still kept it. 因此，没有那么多笔记，但仍然保留了下来
And you can get put constant here if you want to have it like that. 如果您希望拥有这样的常量，可以在此处放置常量
So and then you can change the size and so on so you get it like that. 如此一来，您可以更改大小，依此类推
So now you've tried using some of the dot products and also using normal lives and using absolutes. 因此，现在您已经尝试使用一些点乘积， 也使用正常寿命和绝对值
We are now working with the vector math and you can do as I said a lot more with dot products. 我们现在正在使用向量数学， 您可以像我说的那样使用点积做更多的事情
If I put in a value that is not static you can see that it's not a straight line because now we have 如果我输入的值不是静态的， 则可以看到它不是一条直线
two vectors. 因为现在有两个向量
The difference between them will be shown in the dot product which means that you can use that product 它们之间的差异将显示在点积中， 这意味着您在构建新纹理时
to a lot of stuff when you are building new textures. 可以将其用于很多东西
But right now we just use static values and we use the angle for calculating this hexagon and absolute 但是现在，我们仅使用静态值，并使用角度来计算此六边形
yes doctor knows since before and normalize it so that we only have a length of 1 when everything comes 因此，是的，从那以后，医生肯定会知道并对其进行归一化
out. 因此，当一切出现时，我们的长度仅为1
So I hope you have learned anything right now and seen how you can were quick with vector math and I 因此，我希望您现在已经学到任何东西， 并了解如何快速使用矢量数学
will continue with some vector math even in mixed sessions. 即使在混合课程中，我也将继续一些矢量数学
See you then.
Bye for now.