Tuesday, April 19, 2011

Nel has questions (not the weekly post)

Nicole had some questions. She was planning to send an email to Pengfei, but the email was getting kind of long, so she's posting here instead:

"I can now read Omar’s input files for one joint. (I haven't generalized it to all joints yet.) I'm trying to construct the new animation for this joint, but I’m a bit confused on how to do this.

Edit: The points that Omar passes to me are the control points, not the points on the curve.

Idea 1: keyframe each joint using the points that Omar passed in
Problem: how do we know what to keyframe (translation, rotation, etc) on each joint? The points passed in are the joint’s position in world space. Keying the translation won’t work, since only the root can translate. Keying the rotation might work, but how would we determine the rotation value for each joint? Also, I don’t think we know the timing of the animation after I get the points from Omar. (I passed Omar 200 control points; he passed me 187.)

Idea 2: create a new curve, then do the equivalent of the “Animate – motion path – attach to motion path” command in Maya
Problem: I don’t know if you can apply this to a joint with locked translation, or if it automatically applies to the root joint. When I tried it on a test skeleton in Maya, it defaulted to the root joint, and there were unwanted rotations/twists of the figure around the motion path.

Idea #2 is what I’m trying now, but I'm getting a strange discontinuity again when I draw the curve.

Screenshot of the drawn curve:



(Note: I moved the figure so you could see the curve.)

It appears to have the correct curve for the head joint, but there is some kind of discontinuity(?) that’s causing the vertical line to be drawn. I’ve double-checked the list I’m drawing from, and I believe that there are no duplicate points adjacent to each other. (That’s what caused the discontinuity in my previous code.)

I'm also beginning to think that the first idea would be much simpler, if I can figure out how to get each joint's x/y/z axis rotation values from their global position. Any suggestions?"

Thanks,
Nicole

4 comments:

  1. Nicole what you first must remember is : Maya uses NURBS curves, whereas Omar is using beta-splines. So first thing you need to figure out what Omar is sending out. The control points, or the sampled curve... he should hopefully send you points on a curve... this way you can use IDEA2

    With Idea 2 you have to animate a motion path to a smooth curve, so you might have to fit the NURBS curve to the date you are getting then use that to animate your motion path...

    IDEA1 might also work if you caculate the joint angles from the positions which should be in the Parent book from 562 .. but I might try IDEA2 first.

    ReplyDelete
  2. @Joe Thanks for the response. Omar said that the points he's passing me are the control points.

    ReplyDelete
  3. For #2, I wonder what will happen in current framework given this situation: for arm joint, it needs to reach point_a, and for wrist joint, it needs to reach point_b, but the distance between point_a and point_b is much longer than the original joint length between arm joint and wrist joint.

    I mean, Omar made changes on curves you gave him independently without considering the joint limits, and now you try to snap the changed curves back on to joints.

    For #1, it seems to me you are trying to solve IK problems (or maybe just joint-point's best matching problem) for the joints rotations angles at given time frames.

    So, I would also try #2 first, and see if the results are good enough. If not good enough, then maybe we should try #1.

    And for both #1 and #2, I think you need to handle/solve exceptions if any joints cannot achieve the target positions/rotations. For another example (as you also indicated), a joint needs to rotate around z axis to reach new target, but in fact this joint's z rotation axis is locked...

    ReplyDelete
  4. Taking note for Norm's idea: Nicole should pass the variables of joint angles to Omar for curve processing. After that, Omar just sends back the 'tweaked' angles per frame, and then Nicole can directly apply them back onto the model's postures.

    ReplyDelete