Last week's post went over how joint placement affects deformation and why. This week I'm going to look specifically at the relationship between where a joint is placed and where the verts are placed and what we can do to create the feel of linear motion, so lets get right into it with an elbow. I want to start here because it's very simple and I see a lot of games try to cheat this deformation by letting the arm loose volume, killing the feel of muscle and tendon beneath the surface.
Modeling for deformation:
In the elbow above the red tics mark the deformation edges with the yellow marking the volume holding edges. Take a close look at the placement of these edges in relation to the joint, the upper arm deformation edge is placed very close to the center line of the joint. As the joint rotates we want to loose as little volume as possible in the inside of the upper arm. The further away from this center point that we place this edge loop the faster it will move into the mesh as the elbow rotates.(Remember the cylinder from last week) We minimize the volume loss by keeping it very close to the center of the joint. However, we have to be sure not to move it to the other side. The elbow side of this loop needs to hold volume and will behave in the opposite way as the inside. So while the inside is loosing volume, the elbow side will gain volume, if the inside was gaining volume the elbow would loose it. We need the elbow side to gain volume first in order for it to wrap around the elbow joint without squashing and stretching much. This is also why we favor the joint placement towards the elbow, like we saw on the cylinder when the joint is closer to the mesh surface the surface will squash and stretch less. In order to keep the elbow feeling like a bone we need it to stay solid(hold volume!) while the inside of the elbow compresses.
Above is a very close up look at the inside of the elbow, shoulder is screen up. The first picture shows what we're trying to accomplish, we want the forearm vert to travel along the edge/polygon and touch dead on to the upper arm vert. The problem is, that's not how they are moving, both of these verts are rotating at different speeds and in different arcs. Getting these verts to touch is tricky and we need to pay close attention to the principles of joint and vert relationships to get them dead on. This is also where we need to look at changing the model to fix the deformation and not the joints or weighting. When the edges are first placed, no matter how you set the weighting, you'll most likely get something like this.
The verts move right on by each other, leaving a V shape in the mesh. When these 2 verts touch it will feel like the forearm vert traveled straight along the polygon to get to the upper arm vert even though they are both rotating around the same point. It's this trick that creates linear motion from rotation, matching the rotations so that the verts will meet.
Now, how do we fix this? First, this is more often a vertex placement problem and not a weighting problem. However, it is a good idea to try to fix it with weighting, but don't spend a lot of time if the weighting isn't getting you there quick. We need to think back to the base principles of deformation. The further away from the elbow joint the vert is the more volume it will add since it will need to arc out away from the vert for a longer time. Since the vert is out away from it's target that means we've added too much volume. So, the simple answer is move the edge loop a little closer to the elbow joint. Once we get the position of the forearm deformation loop right here's what we get.
We can take this one step farther and get the volume holding edge loops to come close to touching as well, which will help a large deformation as the arm goes past 45 degrees and the inner eblow really compresses on itself. Having the volume edge loops land close to each other will help hide the mesh crashing and cut down on feeling like one part of the mesh is cutting into the other, which helps it feel like the meshes are compressing together instead of crashing through each other.
Take care until then!
No comments:
Post a Comment