【Live2D Explanation】How to create a model for hand tracking ③ Forearm (Patreon)
Content
As previously announced, I will continue with the hand-tracking commentary.
In the previous article, I explained how to make the "upper arm" ↓.
In this issue I will discuss how to make a "forearm".
So, as before, I prepared a model "with the part from the wrist to the end of the wrist hidden"!
This model can also move from the elbow down. Physical calculations are used to "slightly link the movement of the upper arm to the movement of the forearm", making the movement more natural.
For example,
"When the forearm is raised, the upper arm also rises a little.
"When the forearm is twisted outward, the upper arm moves inward."
"Twist the forearm inward and the upper arm moves outward!
It's like that.
In addition, the armpit movement follows the movement of the model's upper arm using physical calculations, so the flesh of the armpit moves slightly with the movement of the forearm.
If the physics is done well, it is possible to reproduce the delicate interlocking of the human body, but I will not explain that today.
(because I can't explain it until I have created the deformation process down to the fingertips of the model...).
I wonder when I'll be able to explain the physics; it's a long way off, but I'll keep working on it....
ーーーーーーーーーーーーーーーーーーーーーーー
In my last article
I wrote: "The joints of the arm are very flexible and have a wide range of motion.
The upper arm joints can be deformed almost 360 degrees into different positions.
On the other hand, the elbow joint has a much narrower range of motion than the shoulder joint.
It is narrower, or rather, "it can only move about 150° in one direction.
A simple diagram would look like this.
The elbow joint is like a hinge and can only "extend" or "bend" the forearm.
The elbow joint doesn't move sideways, as shown by the arrow in the image above.
However, we still need to create 360° of forearm motion in Live2D.
The reason for this is that we need to consider the movement of the forearm in conjunction with the movement of the shoulder.
The elbow joint can only move up and down (this is called the elbow Y movement) as shown in the video above.
However, the upper arm to which the elbow joint is attached can move freely through 360°.
So when the shoulder joint is rotated outward or inward,
the elbow moves in and out at the same time.
(This is called elbow X movement).
The actual movement of the forearm is a combination of "movement of the elbow joint alone (elbow Y)" and "movement in conjunction with the upper arm (elbow X)".
Therefore, two parameters, X-axis and Y-axis, are required.
Another difficulty is the shape of the elbow.
When straightened
When the elbow joint is flexed outward or inward
When the elbow is bent forward
When the elbow is pushed forward.
When the entire upper arm and elbow are raised above the elbow
When angled further
etc., all of which have slightly different elbow shapes.
Many of the deformers and art meshes for the elbow require four parameters.
That means they have to be created with more effort than the upper arm.
It's a lot of work, but I think the more work we put into it, the more natural and three-dimensional it looks.
(↑This is what it looks like when the upper arm and elbow are moved together)
Also, since the technique of moving the elbow 360° in all directions is basically the same as that of the upper arm, some deformers and art meshes can be used for the upper arm, which makes it a little easier.
This time I had to go through a process of trial and error. I had to rely on brute force in many areas.
I would like to consider a more efficient deformation method as I continue my research on hand tracking.
Now that I've talked about the mechanics of the elbow movement and the difficulty of making it, let's look at the parts (art mesh) that are needed.
First, let's talk about basic solid coloring, line drawing, and shadow parts.
I neglected to mention this last time, but these parts are
The initial shape when the PSD is loaded is a circle.
This circular shape is then stretched and formed into the shape of an arm.
What's good about doing it this way?
The original shape is simple, so it is easy to deform, and as I mentioned earlier, we can use the same parts for the upper arms and forearms.
Using the same parts for the upper arms and forearms has the advantage of taking up less space in the texture atlas. The blue circles in the image below cover all the textures for the line and solid painted parts of the left and right upper arms and forearms.
This technique of texture reduction is not limited to hand tracking, but can be used in many other areas, so it is worth learning.
Of course, there are a few parts dedicated to the forearms.
First there are the shadow parts for the elbows.
There is one for the inside and
one for the outside.
Without this elbow shadow part, it looks very flimsy.
↓when there is no shadow part on the elbow
↓when there is a shadow part on the elbow
Hey? You can tell at a glance.
The inner part of the elbow is copied and pasted to create two parts.
One clipped to the forearm (yellow in the figure below) and one clipped to the upper arm (light blue in the figure below).
The two parts are moved by the same deformer (blue circle in the figure below), so they move exactly the same.
In this state, only the parts that are clipped to the forearm are processed, so they disappear in an instant by not dotting the part to be hidden.
Like the shadow of the armpit at the time of the upper arm.
This prevents unnecessary shadows from appearing when the upper and lower elbows are swapped.
That's all about the necessary parts.
Next is the structure of the deformer.
The deformer hidden by the shaded line is not relevant in this case because it is the deformer involved in the creation of the wrist and beyond.
The underlying rotational deformer is in the "Upper Arm Length" deformer described in the previous article.
I thought I did... but I didn't specify which deformer was the "Length of Upper Arm" deformer last time....
>The deformation of the warp deformer is very simple because we worked hard to create it with a rotational deformer.
The deformer is described in the section that begins with this sentence.
The deformers for the arms are all included in the "Upper Arm Length Deformer.
The deformers named "← Forearm Rotation," "← Forearm Position Fine Tuning," and "← Forearm Length" are all reuses of the upper arm deformer.
The order of creation is as follows
①Select and copy and paste the entire folder of upper arms
②Remove unnecessary parts and deformers such as shadows in Armpit.
https://youtube.com/shorts/AboNh_BVQG0?feature=share
③ Change the name from "upper arm" to "forearm" (using the "Find and Replace Objects" function is convenient).
④Change the associated parameter from "Shoulder" to "Elbow".
⑤The "Forearm Rotation" deformer is the parent of all deformers in the "Forearm" folder.
Create a rotation deformer that is the parent of the "Forearm Rotation" deformer (this will be used later to fine-tune the position). Move the deformer to the elbow.
⑥Place the parent deformer created in ⑤ into the “Upper arm length” deformer.
⑦Shape the shape (make maximum use of "Copy & Paste Shape")
It looks like .......
By diverting the upper arm parts and deformer in this way, it is possible to skip the extremely tedious rotational deformer angle adjustment that I was trying so hard to explain in the previous article.
↑It was hard to explain this part last time…
As you can see, the basic movement is already done, although it still needs some minor adjustments.
However...
The "fine-tuning" is another hell...
First, it must be optimized for "trackable elbow motion".
At the stage where steps ① to ⑦ of the previous "How to Create" section have been completed, moving the XY parameter of the model's shoulder will automatically change the angle of the elbow accordingly.
*1
This should be in the form of "when the elbow position goes below the forearm, do not change the angle of the elbow and let it follow the upper arm".
*2
At first glance, I think *1 looks more natural. The pose of *2's arms is unnatural in some places, isn't it? In reality, physics controls the range of motion by linking the movements of the upper arm and forearm, so unnatural poses do not occur.
If only the shoulder Y parameter is moved directly, the arm will look unnatural like this... but
↑The physics input for Elbow Y has a Shoulder Y parameter.
↑In fact, if the shoulder Y parameter is moved, the forearm will automatically follow.
(Of course, it is also possible to move only the elbow.)
On the other hand, this seemingly natural movement has pitfalls. ↓
In fact, with this method of creation, the elbow X movement is completely reversed with the shoulder Y parameter up and down.
↑You can see that when shoulder Y is negative, the forearm moves to the → side when elbow X is moved to the positive side and to the ← side when it is moved to the negative side, but when shoulder Y is positive, the opposite is true!
To be honest, it is very difficult to use in this state.
In this case, we need to do complicated physics operations to reverse the direction of elbow X movement according to the position of shoulder Y, and it is confusing when creating the animation.
In other words, it is preferable to make the shoulder XY movement so that it does not interfere with the lower elbow angle as much as possible.
Now the forearm deformer is in the upper arm deformer, so the movements are forced to be linked together.
So, make a new rotation deformer that is the parent of the "Rotate Forearm" deformer, and adjust the angle so that the forearm always points in a certain direction. ↓If you watch the video below, you will see that the "Angle" value in the inspector tag keeps changing!
(The Gif has become very small...)
I'll explain in detail how to do it.
For example, when the elbow XY value is in the ↓ position,
we want the elbow to be at this angle no matter what the shoulder XY value is.
So the angle will probably not be ideal at first, so first fix it with the rotation deformer you used to move the whole forearm part earlier.
Then take a snapshot of the angle of this forearm using the snapshot function at the bottom of the screen...
and play with the deformer so that the forearm is at the same angle for all the shoulder XY values.
The snapshot of the arm will be semi-transparent, so it can be used as a guide, and the needle portion of the rotating deformer will always point up at the current forearm angle, so I can use that as an indicator as well. The grid is also helpful.
(Video time was too long to make a Gif...::)
But it would be so much easier if there were only 9 points to adjust like in the video above.
In reality, the rotation error occurs somewhere like this,
so it is necessary to avoid the back movement by changing 0° to 360° in an instant by hitting a point at 0.1 of shoulder X.
And even if the adjustment shown at ↑ is made, the angle will not be exactly the same if the value is halfway,
so it is necessary to hit a point as detailed as ↓.
To be honest, I think this is a crazy inefficient and not good way to make this area.
If I come up with a more efficient and intelligent way to do it, I would like to write another article.
(However, I think the big advantage of this one is that, like the rotational deformer of the upper arm, once it is made, it can be used over and over again.)
After adjusting the angles, it is time to adjust the shape of the elbow, the last boss of forearm production.
At the beginning of this article
I may have mentioned that the shape of the elbow varies slightly with the shape of the arm.
Of course, these are all manual adjustments! (I'm proud of that, but it's not something to brag about).
The "forearm length" deformer, which was redirected from the upper arm, is adjusted by force by hitting a lot of points on it.
It is tempting to despair at the number of places that need to be adjusted…
but in fact, the top and bottom shapes are almost identical, so they can be copied and pasted.
The overall shape as well as the line drawings and shadows need to be adjusted.
If left unadjusted, the line drawing and shadows will look unnatural and uncomfortable.
If left unadjusted, the line drawing and shadows will look unnatural and uncomfortable.
Parameters associated with line drawings↓
Parameters associated with Shadow↓
Both are a daunting amount of work....
Once this is done, we are almost ready to complete the forearm.
Let's create the shadow of the elbow.
First, the inner shadow.
Earlier in this article, I told you that when the shoulder joint is twisted outward and inward, the elbow also moves outward and inward in tandem.
↑If you watch the UP video again, can you see that the elbow itself has changed direction?
The shadow of the elbow plays an active role in making this "elbow directional change" easier to understand.
As shown in ↑, the shadow should be twisted left and right to match the left and right angles of the forearm.
There is no need to force the deformer to rotate, since the shadow parts clipped to the forearm will be hidden by not hitting the dots when they reach a certain level.
Similarly, the shoulder XY does not put much effort into deformer deformation where the part is hidden and not visible.
Once the inner shadow is created, the next step is to create the outer shadow.
The outer shadow has two lines like this.
By adjusting this to the angle of the forearm,
either the left or right is displayed.
It is clipped to the forearm so it is hidden outside the range. If I don't want it to show, I deform the deformer outward.
A few additional points about the order of drawing.
For the upper arm, there was an interference with the torso, so it was necessary to manage the shoulder XY parameters in detail by placing dots on them, but for the forearm, it is OK to change it by placing dots on the "Hand Front and Back" parameters for each folder. Very simple!
ー--------------------------------
Now the forearm is complete!
Yay!
It moves very well!
I thought about it again as I was explaining it, but it was really a hellish work process.
In spite of myself, I think I did a good job of finishing it.
I'm glad I have a personality that doesn't suffer from doing Live2D all the time. ......
By the way, compared to the next hand creation, the process up to this point is like a toy. That's how hard and awful it is to make hands. I hope you are prepared and looking forward to it.
Frankly, this explain articles made me say, "That was helpful! I'll give it a try!" I wonder if there are really any crazy riggers out there who can say, "I'll give it a try!
but,
・Proof that you can make something like this if you push Live2D to the limit.
・Proof that it can work even with so many parts and deformers.
・Research material for future Live2D hand tracking (albeit rough)
By writing this article, I think the above three values have been created.
Someone who knows Live2D well might be able to understand the structure and invent a more efficient way to make it without having to copy it word for word! (*If someone invents it, please let us know...!)
The next and subsequent hand explanations will probably be divided into several updates as it is very difficult to summarize in one article. A pleasure to finally explain the "hand" of hand tracking! Thank you for your continued support.
See you soon!