Thursday, December 29, 2011

Fin (For Now)

Last week was a mad rush. I was always afraid when I found out that there was a blog requirement to this project, that I would get so busy with the actual work, I would have a hard time taking time to blog. This tends to happen with a lot of my previous blogging. I must say I did far better than I thought I would.

Anyway, last week I was really working hard on trying to fix a bug I was having before turning in my code. Maya would randomly key all of the joints at a certain frame into my animations, when I used the tool. It made no sense, because they were always being keyed at frame 29, and I checked my code numerous times to make sure I wasn't keying anything at that frame. The weirdest thing about it was that the positions for all of the joints was off considerably, but only at 29. The rest were all right. I never figured it out, and I'm assuming it's a Maya quirk, because I was having a random key at frame 42 earlier. And then much earlier in the project, frame 1's keys would be off. It's strange, but I haven't figured it out, so I had to turn it in with that issue.

Besides that, I tried to clean up some of my animations last week. I still think the arm movements are off, and I should re-set them again, and looking back on everything, I wish I had spent more time on the animations themselves beforehand. I think I spent a lot more time on the automatic rigging, which took significant time from me later when I was trying to perfect the animations. Understandable, since I thought the automatic rigging would work, but not everything goes to plan, unfortunately.

Anyway, below are some of the videos I put in my final video. (They're currently uploading to Youtube, forgot to do that while in Virginia.) Good night, folks!

[Edit - Youtube videos!]

Using the shelf

Tall vs. Short

Combined motion comparisons

Thursday, December 8, 2011

Animations

So this past week I spent most of my time finishing up the animations and coding them in. I'm just about done with my four parameters, so I'm happy with my progress. I'm currently going back and fine-tuning my animations as well, so I hope to put in those changes tomorrow.

I wanted to explain my code a little bit before I discuss the work I've done this past week. So, like I mentioned earlier, I am now creating a Shelf that can load in to Maya and you can change the parameters through the UI. So within the shelf I call different MEL files that have different functions. I have a file that specifically sets the position and rotations of the IK Leg joint, a file to set the arms, and so on. This past week I spent time adding elbow and hand position/rotations to the arm files, but I've also worked on creating more files that will set other body parts. Obviously movement in walk-cycles is much more than just the legs and the arms moving, so I've been looking at my data files to determine what else I can add to my animations to make them more realistic. One trait I find useful is slouching. Older people tend to not walk with tall backs for instance. They are more bent forward and that changes how their arms move, in consequence. I'm trying to decide if there's anything more I can add to my animations, at this point.

Trying to see how much I need to rotate shoulders, scapula and legs to make this character older looking.
Finally, I'm going to start out with using my other characters to test my tool on. I was annoyed that I couldn't get to it earlier like I planned, but this week had some unexpected events.

I really need to start taking time to render out this animations, since I can't capture my screen anymore. Since I'll have more time with classes ending, I'll be able to devote computer time to that.

Cheers.

Sunday, December 4, 2011

Introspection

In terms of where I saw myself being at this point, I thought that I would have an auto-rigger that would size and skin a skeletal system to a mesh completed at this point. That has been my major disappointment in my project so far. I really wanted to have it that the user would have to do minimal work to create these walk-cycles, but unfortunately it's really hard to find a lot of material on the concept. And my main source of material - Pinocchio - is hard to use in Maya, because it's not exactly open-source. I think that if there's a way for me to bring the Pinocchio skeletal system into Maya somehow, I could possibly still incorporate it into my project, else, it might be something to think about after the project is over.

One thing I should focus on is working on adding to the skeletal structure that one rigs with. That will add a lot more realism to my character movements if I can add more foot joints and ankle joints. Since I can't get sizing to work out, I should still work on the fact that I wanted more complex rigs skinning properly. I am looking through Advanced Skeleton's code to see how I can do that.

In terms of animations, I wanted to have most of the animations in with minimal changes needing to be made. At this point I've created weight and age completely (minus some needed improvements, and making them longer) and have done a lot for height, but I still need to work on my gender animations. Once those are in place, I can hardcode the numbers into the shelf, and be done with my four basic parameters. It won't take too much longer to finish those up, thankfully, so I should have that in place by the end of the week, with the changes Norm suggested too. I've been rigging up some characters, to test my animations out on, it'll be interesting to see the results. I wanted to have a wide variety of characters to test my code out on, so I'll need to keep rigging, since I only have three characters now to use. At least 5 or 6 would be ideal, I think.


Post-Beta Review

So I had my Beta review on Friday, and we discussed a plethora of things. First we discussed the fact that Pinocchio and I were not getting along. I'm glad that Norm agreed with me that I need to focus on the animations firstly, and then with time I can try to work more on Pinocchio.
After talking about Pinocchio, I showed everyone how my shelf works and how I was using LERP to blend the different animations together. Norm gave me a lot of suggestions on how to improve the animations of my walk-cycles. One was to rotate the legs such that they were not at 90 degrees, but rather 85-87 degrees. That was really helpful, because I hadn't been animating too much from the front, so along with adding in hip rotations and more leg swinging, I will definitely be adding those leg rotations in, as well.

Another thing we talked about was working on getting rid of the Gimbal lock I have been encountering in the joints. I've been trying to fix that this past week, so hearing Norm and Joe's advice was helpful. Joe has also given me a great end goal for my work. At the end, to show how the body types do differ, I will have rendered out versions of the different animated body types walking next to each other, to help show just how different they are. That excites me, because I've been able to see the different walk-cycles in succession, but I would love to see them together to just see the differences that do happen.

From here, my end goals are to finish up the other animations, and code them in, along with finishing up general coding for all of the body parts. I have methods that set the legs, the waist and the shoulders, but I need to add in neck, back, hands and wrists. Lastly, I would prefer blending with SLERP instead of LERP just to see if it looks better. Spherically Linear Interpolation should look better, especially with rotation blending, so that shouldn't be a hard thing to change. I'm still trying to think of other parameters I can create animations for because I think it would be fun to have some more physical attributes to choose from than just age, gender, height and weight, but I can't decide what yet. Hopefully I will have a brainflash in the next week, while I finish up the current animations.

Thursday, December 1, 2011

Pre-Beta Review Post

So this week we're supposed to talk about our Beta reviews, which have not happened yet. So I'll discuss my progress and compare it to where I planned to be.

It's been a real struggle lately to integrate Pinocchio into Maya. I was having a hard time with parts of the algorithm I realized I had not put in, and how I would create a Maya version of it. Pinocchio has a lot of its own classes and data structures which are integral for sizing the skeleton. At this point, Pinocchio is really putting me behind and its not allowing me to focus on the main aspect of my program, which is to create these realistic looking walk-cycles, so I've decided that sizing the skeleton to the mesh is not my top priority, and I'll focus on it after my animations are done and look good. This is disappointing to me, since I've spent so much of my time on it, but at this point, it's really taking away from my work, so I'm going to see what Joe and Norm think as well, before I go back to Pinocchio.

A lot of stuff in my project has changed. Rather than making a traditional Maya plug-in, I moved over a lot of my MEL code to a creating a Maya shelf. I wrote code to make the shelf and then have files to set different body parts. It's exciting and a lot simpler than doing this through a Plug-in, because it is easier to pull the information in from the gui and use it within my scripts. It's a lot easier to write in the MEL commands to create the animations because before I was doing a lot of this:
'MGlobal::executeCommand(MString("polyEvaluate -vertex"));'
And now I can just write 'setAttr "IKLeg_L.translate" -type "double 0 0 1;' and it's also much easier to create my local and global variables.

Here are some pictures of my shelf:
 You can see the little icon to get the parameter input window in the left corner. And
in the right corner "PhenoWalk" pops up as a shelf.
Here's a look at my Parameter window. Once you hit set, it computes the
blends and creates a walk-cycle of 34 frames.

Creating these animations are some of the more fun and yet frustrating parts about the project. Making them look realistic is taking up the majority of my time when I animate, but I think that's an acceptable outcome. It'll be interesting to test out certain parameters on the totally wrong characters. Already, I've been working on that, and it causes really funky looking walk-cycles, but I think that's the point. We need to have believable matches between the mesh and the walks. My only worry is making the animations long enough, at this point. If I can finish up these four parameters completely (I still have a lot to do for height and gender still), I'm trying to decide what other types of parameters I can implement in the next three weeks and how much longer I can make the animation. I'm trying to organize my previous work more and create poses that are just translated relative to the previous positions of the body parts. I think that's a much smarter way to go. If you guys have suggestions, I'd really appreciate it. A part of me really wants to create a tight-rope parameter, which makes a person walk slower and more hesitantly. I don't know if that has anything to do with phenotypes, just fun for me to watch. Hah.

Unfortunately my trial for Camtasia has run out and anything else I use puts a giant watermark across the video. Anyone have any suggestions for video capturing a screen on a Mac? Else, I'll have to copy my code to a computer with Camtasia when I create my final presentation video.