【Live2D Explanation】How to Create a Model for Hand Tracking ② Upper Arm (Patreon)
Content
*This article is a translation of an article I published on Pixiv Fanbox on December 9., 2022.
Well, before I know it, it's December!
Sorry for not updating for a while.
I've been having some troubles and my motivation to create in general has been low...
(Some of you may have guessed it, but if you don't know, it's okay to stay ignorant.)
I'm finally getting around to making some videos on YouTube.
I hope to update the Patreon and Fanbox articles little by little.
So, continuing from last time on hand tracking!
This time, I will explain how to make the upper arm.
*First, let me say that a lot of the work I'm going to be describing here will be solved by brute force.
There's also a great deal of numerical talk, but I'm making this up as I go along, just by feel.
There may be a better way.
(I may be able to do it faster and more efficiently if I use mathematical formulas, but I don't have the knowledge...;;)
ーーーーーーーーーーーーーーーーーーーーーーーーー
So, I made it disappear from the elbow down for explanation.
It moves like this. Surrealistic, isn't it?
The body movements I made last time are well utilized.
The joints of the arms are really flexible and have a wide range of motion.
The upper arm can be transformed almost 360 degrees into various positions.
So how can we express this in Live2D?
Unless there is a good reason to do so, I think everyone makes their arms in a rotating deformer. So, if you want to move the arms to their fullest, you can't just rotate the rotary deformer 360° and be OK. ......
If rotated normally, the shoulder would dislocate in the middle like this, and the arms would be stuck in the clothes because the drawing order is not correct.
If I resolve that issue in a spirited manner, the movement will look something like this.
This alone has taken me about a month, but even this is still not enough.
Furthermore, the arms can be "moved forward".
The difficulty is doubled because the image of the arm switches in the middle of raising and lowering the arm. (If you have ever experienced Live2D, you will know what I mean.)
Even more troublesome, the image does not switch when it is moved inward outward.
The process must be such that "only when the arm comes to a certain point, the up-down alignment of the part is overturned, but elsewhere the angle only changes.
The movement at the beginning can be made only after that process is somehow done in a spirited manner.
...and even a cursory description of the movements makes my head hurt, but let's take a look at them one by one.
First, you need to have a knack for thinking about the parameters to be tied together.
In the usual way, Live2D arms are usually created with one parameter, since there are two choices: "raise" or "lower".
"I want to move it a lot, I can just keep increasing the angle, and I'll be able to move my arm 180°!"
If you do this, the tracking and animation will not work well.
It will move like a wiper.
To create the three-dimensional arm motion explained at the beginning of this section, it is important to divide the arm motion into "X-axis" and "Y-axis" movements.
I know I've dotted a lot, but let's put that aside for a moment.
This is the default position, but it is biased to the minus side, isn't it?
X0,Y0 would be like this.
The hands will be in the front forward position.
Think of this as neutral, and
From there, the arms are extended in different directions.
In this way, the combination of up, down, left, right, front, and back can be expressed with a three-dimensional sense of movement without waste.
Next, here's what the art mesh looks like
(Please go through the one that says "Quagsire")
The basic solid color, line drawing, and shadow are separated like this.
The line drawing is filled in and placed at the far end.
Furthermore, there are several shadows to add detail at different angles.
For example, this is a shadow art mesh that is only displayed when the arm is in front of the body.
The parameters of the area to be hidden are handled so that they disappear in an instant by not hitting the dots.
This is the shadow of the armpit flesh when the arm is lowered.
It gradually disappears when the arm is raised by combining a change in opacity and a process of not hitting the dots.
This is the shadow of the armpit seen when the arm is raised.
I not only raised and lowered the opacity, but also added a three-dimensional effect to the armpit using deformers. I get excited when I can improve the quality of the armpit expression!
Next is the deformer structure.
(The shaded area is the deformer from the elbow down, so please ignore it for now.)
The underlying rotational deformer is in the upper and lower shoulder deformer described in the previous section.
If moving the deformer, the arms will follow.
The next "arm on/off" is for difference, so ignore it.
The next item, "arm position," is for following the body XY. The deformer will follow the body to some extent, so the deformation only needs to be fine-tuned.
The deformer for the armpit is just below that.
Deformer for body XY > Deformer for arm XY > Art Mesh
In this order.
The same hierarchy also includes the shoulder art mesh that is tied to the arms.
(This is the one explained in the previous article.)
By separating the art mesh for the body side and the arm side in this way, you can create subtle deformations to match the arm.
Now, below that, "upper arm rotation."
This is the parameter that must be deformed the most difficult and tricky this time.
As I mentioned at the beginning of this article, this time, we have to do something like this: "At a certain point (X,Y=0), the upper and lower position of the part is turned upside down, but at other points, the angle only changes.
For example, when you think, "I see, I should just turn it over, right?"
Many modelers easily do this kind of transformation (I did).
It's like extending up, down, left, and right around the 0 point. That's easy.
And at this point, it looks very nice.
But what about the But what about the diagonal deformation?
Try to synthesize corners.
Wahhhh!!!
It is now a loaf of bread, not an arm.
I will try to force it into the shape of an arm.
...It seems to be no good.
I can get away with it by forcibly deforming it with more crazy fine dots in between... but
But the result will be very messy.
If one easily swaps the top, bottom, left, and right transformations in this way, the completion between them would be terrible, so this method cannot be used.
So, the deformer only does this way deformation of arm extension.
The direction is created by a rotational deformer.
There are some drawbacks to this method as well. First of all, if the values of either X or Y are swept away, a simple dot like this will work beautifully, but it is necessary to dot as close to 0 as possible for X (e.g., 0.01).
This is because without it, the rotational deformer values would be reversed and the movement would be out of order in one place.
By swapping the plus and minus of the X value in a split second between 0 and 0.01, I avoid a move that goes backwards and backwards with this parameter. (I will explain more about this later.)
https://youtube.com/shorts/xQPTOU-Z-xc?feature=share
*Sorry it's hard to see.
Do you see how the plus and minus of the angle of arm X switches every time the point moves between 0.01 and 0?
Another drawback: if either X or Y value is swinging out, the ↑ method alone will work, but the transformation between the two is not so easy. Especially when either value is 0. As you can see, the deformation is not so good when the value between the two is 0.
To prevent this, you have to hit more points.
The result is this…
It's always creepy to see too many dots....
In case you're wondering, I'm not typing without moderation, but there are certain rules.
First, the value of the parameter is "-10,0,10" for both X and Y axes.
Then, the value of ① is half of that, 5 (or -5).
The value of ② is half of that, 2.5, ③ is another half of that, 1.25, ④ is still another half of that, 0.625...
The interval gradually becomes narrower by halves, approaching the value of 0.
Next is the angle of rotation deformer for each value.
(I tried to fill in all of them at once, but the screen got too cluttered, so I started with just the main angles.)
The outermost side looks like this. The value increases by 45° in increments of + when around → and - when around ←. At the bottom, the numbers don't match (180° and -180°), so we force the numbers to make sense by hitting a dot at 0.001 and setting the value to -180° at 0 and 180° at 0.001.
The angle between the two will be half the main angle as before.
For example, in the upper right,
-22.5° at half of -45° (-22.5°)
Half of -22.5° for -11.25° (-11.3°)
Half of -11.25° is -5.625° (-5.7°)
Half of -5.625° is -2.8125° (-2.8°)
Since the angle of rotation deformer only supports angles up to one decimal place rounded off to the first decimal place. That is the value in parentheses ().
Do the same for the other parts. (Numbers before rounding are omitted.)
(Sorry it's hard to see)
After applying the outer circumference values, slide the values to the inner circumference.
However, the values in the red circles (0°, 90°, 180°) remain the same.
Continue sliding further inward, and so on, but the number of points in the parameter in between will become smaller and smaller. The values in the red circled area do not change.
(I'm not sure if this conveys the message properly...!)
Do this for all points.
The number of processes has become very large,
but,One advantage is that it can be adapted to any arm length, so it can be used in many different ways.
Once it is made, it is ours.
At this point, if I just move the rotating deformer, it looks like this! It spins around nicely. The strange movement around 0 is not so strange, as it switches to the opposite direction in an instant.
(The position of the rotational deformer itself has moved a little, but this is due to the fine-tuning of its position to match that of the shoulder.)
The deformation of the warp deformer is very simple because we worked very hard to create it with the rotational deformer.
Simply make a deformation that stretches like this
and stick it on all the blue circles except the middle one.
I would like to say this is OK! ......, but if this is all I do, the line art and shadows will be drowned out when I raise my hand up.
So, dot the line drawing and shadow art mesh and deform it so that it looks comfortable.
(This is where placing the line art deformer under the solid color deformer comes into play.)
Especially near the middle, the angle changes so much that it is necessary to hit a fine point.
Sorry that this area is more of a tour de force than an explanation.
The result is this movement.
It's done~~~~~!!!!!
It's a three-dimensional, high-working arm. ~~~~!!!!!
I did it~~~~~~~!!!!!
By the way, I change the drawing order by hitting a dot on the folder.
When the arm X value goes from 0 to 0.6 and the Y value goes from 0 to 10, the drawing order is changed so that the arm comes to the front, but that does not bring the hand behind the body, so a new ◇← hand forward/backward parameter is created to allow the hand to be placed at the back.
When actually moving the body, the shoulder and body movements are blended using physics calculations to further adjust the movement to make it more natural, as shown in the ↓ figure.
I will explain how to do this in a future issue.
That's all for this commentary!
This was the most difficult and long-winded commentary ever, but I hope you enjoyed it.
Are you following me?(:| I hope everyone is following along!
I'll try to explain it as concisely as possible,
However, the explanation from this point on is a lot of work to begin with, and there are many things to explain, so it ends up being a complicated explanation article like this one.
I apologize for my lack of vocabulary.
I will try my best to verbalize as much as possible
Thank you for your continued support.
I'll explain from the elbow down next time!
See you then!