You are viewing the course site for a past offering of this course. The current offering may be found here.
Lecture 4: Transforms (58)
WilliamLiuAtCPC

This is exactly how MMD software works.

phoebeli23

This slide captures the concept of hierarchical transforms really well! I find it intuitive to push/pop the different transformation matrices on/from the stack in order to get the desired matrix for each body part.

Syakmoon

I have a trouble when trying to understand how this pushing and popping stack work. If we want to draw the right hand, we should first apply the torse's transformation, then the upper arm's, then and lower arm's, and finally the right hand's. However, stack is a first in last out data structure, this means that we will apply the right hand's transformation first, and then the lower arm's, and so on. Am I understanding this stack right?

christinemegan

I've had some experience rigging characters for animation, and within the program the joints hold onto the history for each of the translation values. It's cool to see here why that makes sense, in that each joint's position relies on the translation prior to it.

bronyayang

@Syakmoon I think you apply right arm -> right lower arm -> right hand, in this order. I think the misunderstanding is that you think we apply transformation when popping the stack. Actually, we apply transformation before pushing to the stack. So, just applying and pushing in normal order, no need to reverse. Correct me if I am wrong. Professor also mentioned something about the copy of the transformation matrix. What was that?

AlbertScribblenaut

Describing the motion of arms in this context scratches the surface of inverse kinematics, which dictates the motion required for the hand of a robot arm to reach a desired position in space.

ethanyxchen

I spent quite a bit of time trying to understand this slide and how the code really works. Is the point of the translation before rotation before drawing the actual polygon because we have to keep track of the exact coordinates of where we are trying to draw the shape? And are the translations relative to its "parent" body part? i.e. the lower arm has a 0,-3 translation but isn't technically 3 pixels below the upper arm in terms of coordinates.

Staffrishiu

@Syakmoon good question! @bryonyayang's response is right. The way I like to think of this myself is that the stack is like a list of transforms that are being applied to anything I draw and the way it works is the first transform added to the stack is applied first. Thinking about it like this, each time you call pushmatrix() you apply one more transform to any drawing and then popmatrix() takes these transforms away.

Staffrishiu

@ethanyxchen: You're right - we need to make sure our transform is setup before we draw the shape. And yes - the translations are relative to the "parent" body. The number you see here are actually corresponding to the grey arm you see below the colored one and the numbers aren't meant to be exact but mainly relative.

lucywan

When I was in high school a speaker from Blizzard came and talked about his experience in the video game industry. I especially remember him mentioning how complicated rigging was. At the time I wasn't sure what he meant but now with this lecture I'm able to visualize it.

You must be enrolled in the course to comment