so we now have a complete character rig but we are missing one aspect of our rig 所以我们现在有了一个完整的角色装备，但我们缺少装备的一个方面，
which has to do with our hands and our legs depending on uh if you chose to set 这与我们的手和腿有关，这取决于呃，如果你选择
it up or not if we rotate our wrist here we get this really 设置它或不设置它，如果我们在这里旋转手腕，我们会变得非常
ugly skin weighting because we have those twist bones right now that are 丑陋 皮肤权重，因为我们现在有那些
simply not being used so the only thing that's rotating when 根本没有被使用的扭曲骨骼，所以当
we rotate our wrist is the the wrist weight in all of these 我们旋转手腕时唯一旋转的是所有这些
skin bones all these twist bones rather aren't rotating with our wrist at all 皮肤骨骼中的手腕重量，所有这些扭曲骨骼都不会随着我们的手腕旋转
so let's go ahead and set that up this was possibly one of the 无论如何，让我们继续进行设置，
more challenging things to set up when I was looking at things as a primary Maya 当我作为主要 Maya 用户查看事物时，这可能是设置中更具挑战性的事情之一，
user I wanted to find a solution that maybe didn't require so much coding or 我想找到一个可能不需要太多编码或
other Vex Solutions and I I would guess a good 其他内容的解决方案Vex Solutions 和我，我猜
number of the students here are also primary my users coming into Houdini to 这里的很多学生也是我的主要用户，他们进入 Houdini 来
learn um what rigging looks like in this 了解这个包中的索具是什么样子，
package so let's try our best to set up a 所以让我们尽力设置
a Twist joints without needing to do much coding 一个 Twist 关节，
when I was exploring this there were many ways I did it 当我 正在探索这个问题，我有很多方法，
but the simplest way that I found to do it 但我发现最简单的方法
was creating uh a simple 是创建一个简单的
ik spline solution we saw when we set up our our chest here that when we use the ik 样条解决方案，我们在此处设置胸部时看到，当我们
quaternion solving on our chest we had a nice down the chain twist 在胸部使用四元数求解时，我们有 当我们用脊柱编辑 ik 样条线时，这是一个很好的链条扭转，
as we edited the ik spline with our spine
so let's try and do so just after the arms and before the hands because our 所以让我们尝试在手臂之后和手之前这样做，因为我们的
arms are where we take our values let's try and solve this and think it through 手臂是我们获取价值观的地方，让我们尝试解决这个问题并
so first I'm going to take our delete joints as we always do to start 首先思考它 我将像往常一样开始删除关节，
and for now I'm just going to focus on creating the twist between my elbow and 现在我将专注于在我的肘部和手腕之间创建扭曲，
my wrist so I'm going to take these guys 所以我将采取这些人，
and I'm also actually going to take the twist joints 我实际上也将 采取扭转关节，
so we have all of our arm parts that we need we have them at our point after our 这样我们就有了我们需要的所有手臂部分，我们在
arm pose so if our wrists were posed at any point it would have been at our 手臂姿势之后将它们放在我们的点上，所以如果我们的手腕在任何点上摆姿势，它都会在
point of our arm yet with our ik or FK solution here 我们手臂的点上，但用我们的ik 或 FK 解决方案在这里，
so we're going to grab lower arm 所以我们现在要从这里抓住下臂，
now from here I might want to split up maybe 我可能想分开
our arms or we can just keep them together 我们的手臂，或者我们可以将它们保持在一起，
actually let's try it just together for this to work 实际上让我们一起尝试一下，以实现此目的，
I'm going to put down a parent chain here and just make sure that all of our 我要放下父母在这里链条，只要确保我们所有的
joints are parented one after another going down the chain just like our spine 关节都被一个接一个地沿着链条向下设置，就像我们的脊柱一样，
was if at any point you parented all of your twist joints to be under your elbow 如果在任何时候你将所有扭转关节都设置在你的肘部下方，
that's sometimes a rigging structure I've seen you're going to want to make 这有时是我见过的一种索具结构 你会想要
sure we parent things straight forward just like we did with our spine 确保我们直接父级事物，就像我们对脊柱所做的那样，我们
our our uh joints are already set up that way so we don't need to do anything 的呃关节已经这样设置了，所以我们不需要做任何事情，
but I will put down a new delete joints node where we will just get our end 但我会放下一个新的删除关节节点 我们将在这里得到我们的末端
joints 关节，
because these are going to be the controllers 因为这些将成为
for our 我们样
our spline ik our our solution here so once we've done so we just have our 条线的控制器，就像我们的解决方案一样，所以一旦我们完成了，我们就只有
endpoints and then we have all of our points on the left side here and our 端点，然后我们的所有点都在左侧 我们的
control points on the right side here we'll want to create a rigvop 控制点在右侧，我们想要创建一个 rigvop，
because we'll be creating that constraint system 因为我们将创建该约束系统，
so we have a rigvop here we're going to call this 所以我们在这里有一个 rigvop，我们将称之为
[Music] um [音乐]嗯
curve solver Maybe 曲线解算器 也许
we'll dive inside 我们会潜水
so we'll put down our curve solve 所以我们现在将用这个曲线求解来放下我们的曲线求解，
now with this curve solve we're naturally grabbing all of our targets 我们自然地
and all of our controls from our first and second inputs but we don't 从我们的第一个和第二个输入中获取所有目标和所有控件，但我们
necessarily want that we just want uh for this solver we only want to solve 不一定希望我们只想要这个求解器 我们只想
for one side at a time so we'll have two solves 一次解决一侧，所以我们总共有两个解决方案，
in total one for the left side and one for the right side 一个用于左侧，一个用于右侧，
so let's take our Target points 所以让我们获取目标点，
and maybe we can set down a get Point transforms 也许我们可以设置一个 getPoint 变换，
and from here we can you know we can either start to 然后从这里开始 我们可以知道，我们可以开始
get all of our points via point value or by Point name 通过点值或点名称来获取所有点，
but it's not as easy to select with this thing 但是用工具自然地选择这个东西并不那么容易，
with the tools naturally so instead what I'm going to 所以我要做的
do is up here 是在这里
we have our end joints 我们有我们的 末端关节，
and we have our lower arm 我们有我们的下臂，
instead what I'm going to do is copy these nodes over 而不是我要做的就是复制这些节点，
just create a duplicate for them just like so coming from the same input 只需为它们创建一个副本，就像来自相同的输入一样，
we can call this grab lower arm r 我们可以将其称为抓取下臂r
and these ones can be our left side ，这些节点可以是我们的左侧
so we'll just grab 所以我们只抓住
just our left side over here 这里的左侧
and this will naturally uh since our right ，这很自然，因为我们的
elbow and wrist aren't here anymore it doesn't delete them but we also don't 右肘和手腕不再在这里，它不会删除它们，但我们也不会
grab them and it just remains with our joints that we could 抓住它们，它只保留在我们的关节中 我们可以
delete or select so here we'll just take our 删除或选择，所以在这里我们只取
right side of things 右侧的东西，
and now when we look at one side we have just the right side and over here we 现在当我们看一侧时，我们只有右侧，而这里我们
have just the left side now we could put this input into input 3 只有左侧，现在我们可以将此输入放入输入3
in this input into input four and when we dive into our Bop 在输入四的输入中，当我们深入到 Bop 中
for solving for our left side we can simply say all of our targets are our 求解左侧时，我们可以简单地说我们所有的目标都是我们的
first input all of our controls are our second input for our solve right we can 第一个输入，所有的控件都是我们解决右方的第二个输入，我们可以
say all of our targets are our third input and all of our controls are our 说我们的所有目标 是我们的第三个输入，我们所有的控件都是我们的
fourth input we don't have to go through the effort 第四个输入，我们不必费力
of entering all the point values or grabbing the correct names 输入所有点值或获取正确的名称
or whatnot so let's start by trying to solve for 或诸如此类的东西，所以让我们首先尝试解决
our right side or sorry our left side here 我们的右侧问题，否则对不起我们的 在左侧，
the first thing we'll need to put down is a set point transform just so we can 我们需要放下的第一件事是设定点变换，这样我们就可以
see our effects here 看到我们的效果，在这里
we'll hook in our points and our X forms 我们将挂钩我们的点和我们的 X 形式
hooking our points and our X forms 挂钩我们的点和我们的 X 形式，
and already we can see we get something kind of weird going on 我们已经可以看到我们 发生一些奇怪的事情，
and it's thanks to our axes if we display our joint axes we can see kind 这要归功于我们的轴，如果我们显示关节轴，我们可以看到
of what might be going on 可能发生的情况，
and we'll end up playing with the right side a lot more than we do the left side 并且我们最终会比左侧玩更多的游戏，
since it's mirror joints our axes aren't in kind of a normal space anymore 因为 这是镜像关节，我们的轴不再处于正常空间，
but that doesn't we can still for solve for it that doesn't bother us 但这不是我们仍然可以解决的问题，这不会打扰我们，
so first we're going to solve our left side here our 所以首先我们要解决我们的左侧，我们的
joints are pointing down the chain with a z positive 关节朝下 具有z 正值的链，
so let's make sure we change this to Z positive as our look at 所以让我们确保将其更改为 Z正值，就像我们看到的那样，
and our up is generally the Y here so we can keep that at y 我们的向上通常是这里的 Y，所以我们现在可以将其保持在 y
now of course the curve that we create from our control points which are just 当然，我们从控制点创建的曲线就是
these two points right here isn't really a curve it's just a 这些 这里的两点并不是真正的曲线，它只是一条
straight line and also we have to make sure it doesn't 直线，而且我们必须确保它
have four points in it so we want to make sure we turn that down to two 没有四个点，所以我们要确保将其减少到两个，
and we want our twist mode to be quaternions right 并且我们希望扭曲模式为
if you don't know what quaternions are luckily Rebel way has a whole course on 如果你不知道什么是四元数，那就是四元数吧，幸运的是，Rebel Way 有完整的数学课程
math and how it's applied 以及它如何
in digital art so go check that out but essentially for 在数字艺术中应用，所以去看看，但本质上对
us quaternions equals a nicer rotation down the chain that isn't linear and 我们来说四元数等于沿着非线性链条更好的旋转 总的来说，
altogether
we want our root orientation to be based on our control and our tip orientation 我们希望我们的根方向基于我们的控件，我们的尖端方向
to be based on our control which our root and our tip are just the two 基于我们的控制，我们的根和我们的尖端只是两个
endpoints right since we only have our two controls there 端点，因为我们只有两个控件
and we'll want to see if our current settings work just by posing the arm ，我们希望看到 如果我们当前的设置只是通过摆出手臂的姿势来工作，那么
just let's try and twist the arm here just like that 让我们尝试像这样扭转手臂，
and we'll see if this has solved our rotation which it hasn't we can see that 我们会看看这是否已经解决了我们的旋转问题，但它还没有解决我们可以看到
our y up on our elbow is good and we see that rotation because we did about a 90 我们的肘部的y向上是好的， 我们看到旋转是因为我们做了大约 90
degree rotation so our y is now pointing backwards but for some 度的旋转，所以我们的 y现在指向向后，但由于某种
reason our settings haven't quite worked for us yet 原因，我们的设置还没有完全为我们工作，
so let's try changing our curve type a bezier curve kind of needs more 所以让我们尝试改变我们的曲线类型，贝塞尔曲线需要更多
information but maybe a polygons line does not 信息，但也许 多边形线
okay so I ran into an issue here where our solution should be working at this 不行，所以我在这里遇到了一个问题，我们的解决方案此时应该可以工作，
point but I noticed when I put down a rig pose 但我注意到当我在 Bop 之后放下装备姿势时，
after our Bop here our only chain that's selectable is our 我们唯一可选择的链是我们的
uh left arm which is even on the wrong side 呃左臂，它甚至在
of things for some reason all the way over here 由于某种原因，事情的错误的一面一直在这里，
our rigvop is getting confused with having multiple set point transforms 我们的 rigvop 与多个设定点转换感到困惑，
so I'm just going to separate this out and I'm going to have two 所以我将把它分开，我将有两个
and I'm only going to allow for one side to be using onevop to solve ，我只允许一方面使用 onevop 来解决
for things at the time being and once we do so we can see that our 目前的问题，一旦我们这样做，我们可以看到我们的
solution here our twist is working we can see uh multiple axes 解决方案在这里我们的扭曲正在发挥作用，我们可以看到呃多个轴
presented presented one of the y-axis is slowly rotating 出现，其中一个 y 轴正在慢慢旋转
more and more as it comes down the chain and the other axis is just straight up 更多，并且 更多，因为它沿着链条向下，而另一个轴是笔直向上的，
so that's our before and our after image that we're seeing here if we turn off 所以这就是我们在这里看到的前后图像，如果我们关闭
display inputs we can just see the output and we can see that that rotation 显示输入，我们只能看到输出，并且我们可以看到旋转
is happening nicely up the chain 正在发生 链上完美，
perfect so now let's go in and solve the right 所以现在让我们进入并解决
side of things if we come over here 问题的右侧，如果我们来到这里，
when we look at the right side 当我们查看右侧时，
I've already set the look at axis to be negative Z and the up Axis to be 我已经将查看轴设置为负 Z，将上轴设置为
positive Y which is the opposite of what we had for our solve on the on the left 正 Y 这与我们在左侧的解决方案相反，
side here we had positive Z and positive y 这里我们有正 Z 和正y，
since our axes are mirrored we're going to want to use as best we can kind of 因为我们的轴是镜像的，我们将希望尽可能使用
mirrored axes so we're using negative Z and positive or negative y as our axes 镜像轴，所以我们 使用负 Z和正或负 y 作为我们的轴，
we're going to change this to our quaternions set this back down to 2 and 我们将把它更改为我们的四元数，将其设置回 2，
I'm going to change it to polygon lines just because 我将把它更改为多边形线，因为
uh it seems to work good for me 呃，它似乎
first and second input instead of our third and fourth because that's where 首先对我有用并且 第二个输入而不是我们的第三个和第四个输入，因为这就是
they are now and now if we pose our 它们现在所在的位置，现在如果我们用手腕将
left side or our right side here with our 左侧或右侧摆在此处，
wrist let's go the other way just to make sure 让我们走另一条路，以确保
it's working either direction let's take a look 它在任一方向上工作，让我们看一下
we can see that same nice rotation down the line where our 我们可以看到 同样漂亮的旋转，我们的
elbow doesn't rotate our twist our first twist does a little bit our next twist 肘部不旋转我们的扭转，我们的第一个扭转做了一点，我们的下一个扭转
does a little bit more and our next just after that does a little bit more even 做多了一点，我们的下一个扭转做多了一点，甚至
then we can just merge these two chains together again since that's where we 我们可以合并这两个再次链在一起，因为这是我们
separated out from converge our two solved twist chains 从聚合两个已解决的扭曲链中分离出来的地方，
together put down a skeleton blend node 放置了一个骨架混合节点
and we'll want to blend towards our solved chain of things ，我们想要混合到我们已解决的事物链中
and we can see how this looks now in our deform skeleton ，我们可以看到它现在在我们的变形骨架中看起来如何
we can see a nice Twist of our arm 看到我们手臂的完美扭转，
perfect and that little jump there was just from 那是我摆出的小跳跃，呃，
me posing uh the arm kind of rotated really quick 手臂旋转得很快，
there but 但
we can see a nice Twist of our arm all the way through 我们可以看到我们的手臂一直有一个漂亮的扭转，
which is exactly what we were hoping for at a point our rotation starts to get 这正是我们所希望的 在
wonky after 200 degrees so out of pulling our 200 度后，我们的旋转开始变得不稳定，因此我们的
solution breaks 解决方案会中断，
but it's past a point of natural posing for a person 但它已经过了一个人的自然姿势点，
so it shouldn't be an issue for us and that's been the easiest way I've 所以这对我们来说不应该是一个问题，这是我发现的最简单的方法
found to and in the most streamlined way to create a solve for our arm twist 以最精简的方式来解决我们的手臂扭曲
bones I dove into much more of the vops side of things and you can do some crazy 骨骼问题，我深入研究了更多关于vops方面的事情，你可以做一些疯狂的
things like um 事情，比如嗯，
if we were to take our just a point here 如果我们在这里只采取一点，
get uh
either way if we were to take a point here we could say that these purple X 不管怎样，如果 我们要在这里指出一点，我们可以说这些紫色 X
forms can line up with um 形式可以与um
uh create maybe it's called a make uh create 对齐，也许它被称为 make
make transform we can see here we can make a transform make 变换，我们可以在这里看到，我们可以进行与
the same purple X form as is put into our set point transforms and is acquired 放入我们的设定点相同的紫色 X 形式的变换变换并且是
from a get uh a get Point transform as well 从 get uhget Point 变换获得的，
so I dove into a lot of things from extracting 所以我通过提取
our transform data and trying to apply the different rotations 变换数据并尝试应用不同的旋转来深入研究很多东西，
things worked well you can create quaternions in Bops and in Vex of course 效果很好，当然你可以在 Bops 和 Vex 中创建四元数，
but this was the simplest straightforward solution easiest to set 但是这个 是最简单直接的解决方案，最容易
up we can package this all into an HDA don't even need to promote any 设置，我们可以将这一切打包到 HDA 中，甚至不需要提升任何
parameters as we can see here 参数，正如我们在这里看到的，
cyborg automated arms no promoted parameters we're just using it to solve 机器人自动化手臂没有提升的参数，我们只是用它来解决
for our arms 我们的手臂，
so go ahead and do that create this HDA I hope this has helped you can apply it 所以去吧 继续创建这个 HDA我希望这对您有帮助，
to your legs if you want to your upper arms any any part that you want to 如果您想要上臂任何您想要的任何部分，您可以将其应用到您的腿上，您
you want to try and make sure you're using quaternions in some way though 想尝试并确保您以某种方式使用四元数