Thursday, March 31, 2011

Top 10 reasons why Nel should not make post titles. #10...

So I bet you're wondering what we did this week.

Nicole continued to familiarize herself with Python in Maya. The Maya documentation on Python commands was very useful. She can now write basic python scripts that do things like drawing curves, creating objects, and getting/setting attributes of objects.

She did run into one problem. She was able to get joint position at a certain time with cmds.getAttr(‘joint_name.translate’, time = t). However, this returns the joint position in local coordinates, which never changes. (This makes sense, because bones can’t stretch.) Is there any way to get the position in global coordinates, aside from matrix multiplication, which would likely be too expensive to compute at every frame? Some commands have a 'global' parameter, but she's not sure how to add this to the getAttr call, since getAttr has no global parameter.

Once she figures out the world/local coordinate problem, she should be able to draw the translation curve along one joint, then extend it to the other joints.

Moving forward, any tips on how to compute the control points once we have the exact points along the curve?

Omar took time to try to figure out the best way to manipulate beta-splines in Maya. After working with the Maya C++ API, he found that MEL scripting may still be the better option. He made progress on the MEL UI, thanks to the help of the tutorials that he posted last week. Here's a screenshot of part of the UI:

Currently, a first window pops up, asking the user to specify the number of control points. This then brings up the Control Points window above, with the number of float field groups that the user previously specified. The user can input the x,y,z values for each control point. Hitting the Draw Spline button does exactly that. The above screenshot shows what it looks like after hitting Draw Spline. Also, if the user were to input new values into the window, it would just update the curve, not create a new one.

Next, Omar needs to add a way to manipulate the beta and/or alpha values of the curve (probably float sliders). Then, he would be about at the stage where he could use Nicole's control points. Right now, the control point input is interactive. Omar is still not sure exactly how the control points will need to be input/retrieved from Nicole's part, since Nicole is not exactly sure how to get them yet. They will figure that out together.

Question for Joe: For the beta review, what type of presentation do you want? Will we be talking over a video like the alpha reviews?

That's it.

Much lava,

Nelskati

Thursday, March 24, 2011

The nine lives of Post Posterson

So I bet you're wondering what we did this week.

Omar has been really sick this past week (and still is). So, unfortunately, he was unable to get much done. He still needs to build a GUI in Maya that will allow him to manipulate the beta-spline curves. Assuming he starts to recover relatively soon, he should be able to get a GUI up and running by next week. He has done some reading on Maya GUI building and has found that MEL is the best for that. He's found some links online to try to help him out:

http://trishabutkowski.blogspot.com/2008/09/mel-scripting-intro-to-gui.html

http://www.polyextrude.com/tutorials/MelScripting/chapter9.html

As per his prior problem with drawing curves in Maya without 20*(number of control points-3), he's going to forget about that for now. It might not be as big a problem as he thought it was.

Nicole has been reading up on Python scripts in Maya. The end goal is to grab the control points from the movement curves in Maya. The first step involves getting Python script to run in Maya and drawing the movement path of a single joint.

Here are some resources she's looking at:

http://cgkit.sourceforge.net/maya_tutorials/intro/
http://www.rtrowbridge.com/blog/2008/11/maya-python-import-scripts/
http://cgkit.sourceforge.net/mayadoc/install.html

And one that looks like it will be particularly helpful
http://www.chadvernon.com/blog/resources/python-scripting-for-maya-artists/python-in-maya/

She'd be happy to hear any other resource suggestions.

This is the first time she's done any scripting, so she had some questions:

1. Right now Maya has a "Python" tab in the script editor. This site mentions a Python plug-in manager. Do we need this? I was talking to Jon McCaffrey, and he made it sound like we could copy the Python code straight into the script editor.

2. Similarly, the tutorials keep talking about the "Python plugin" and "Maya Python package". Where can we download these? Do we even need to download these?

3. If we want to load a Python file into Maya instead of copying and pasting it all into the script editor, where should we save the file? We have tried saving it under "C:\Program Files\Autodesk\Maya2010\scripts", but it doesn't find the file. (We're working on the SIG lab computers.)

4. One of the tutorials has a single line that's supposed to print "Hello World". (py "print 'Hello World'"). When typed into the MEL tab in the script editor, I get the error "cannot find procedure py". If I erase the py part and just type "print 'Hello World'" in the Python tab, it works. However, if I try to type the next example from that page into the Python tab, it doesn't work. Any idea on what's going wrong?

SELF EVALUATION

What we have completed
- picked out 10 gestures to animate
- animated those gestures, including finger movements
- implemented beta splines

Partially completed
- get beta splines working in Maya

By the beta review
- have Maya GUI ready
- draw the path of a single joint in Maya as it animates
- determine the control points of this path; not quite as trivial as it sounds

By the final review
- generalize the previous two steps to all joints
- pass these control points to Omar's beta spline editor
- modify the control points to achieve various emotional states; this could be done by permuting the joint positions across a certain range of y values, for instance
- poll a set of people to determine what types of modifications produce what types of emotions

By CG@Penn Day
- we might be able to generalize these findings. For example, if an angry gesture is faster and has wider motions, increasing a gesture's speed and "stretching" the position of the control points will make a gesture look angry. Prevents having to do trial and error for every gesture/emotion combination.
- create a GUI that allows the user to change parameters (example: emotion), which will in turn change the control points/curves

We've got a lot left, but we think once we can get our two parts working together, things should move quickly.

Love and unicorns,

Nelskati

Thursday, March 17, 2011

Post #(Infinity-Symbol rotated 90°)

Hey all! We're back from Spring Break and slowly trying to get into the swing of things again.

What we week this did so to you know want? Okay.

After returning from break, Omar has been working on being able to correctly display beta-splines in Maya. It took him a while to get the MayaPluginWizard working, but in the meantime, he began research on how to define/draw curves in Maya without being restricted to the given interpolation scheme. Unfortunately, it has been very difficult to find exactly what he's looking for. The Maya C++ API documentation is not so great. Omar wants to be able to draw the beta-splines without having every point drawn be considered an edit (or interpolation) point. Basically, he is looking for the equivalent of a glVertex call for Maya. In that way, he can draw lines without defined, manipulable points. This week has been spent looking for answers and trying out different methods. He has been able to play around a bit with making simple maya plugins, which has helped. But the progress he wanted to make was not made.

In order to not continue wasting time, Omar will start trying to at least build a GUI in Maya (using MEL or C++--not sure which will prove to be more efficient) that will allow the user to take the beta-splines he is currently drawing (defined with roughly 20 times the number of edit points with which they should be defined) and manipulate the bias and tension (alpha1 and alpha2) parameters for the different segments of the curve, using simple sliders. He has started trying to learn how to do this.

Nicole has been working on the rig with fingers in Maya. She tried binding the different parts of the mesh separately to fix the 'mesh and skeleton not matching up' problem, but it didn't help. She had to reposition some of the joints before re-binding the skin, which led to a few problems...

Problem 1: Some joints no longer start in the same position. This means that Nicole could not just copy keyframes from the no-finger model to the finger model. She had to re-animate the already-animated gestures.

Problem 2: She had to paint skin weights, since joints were added. (She tried importing the previous weights, but it didn't help.) She couldn't get the weights 100% accurate on all joints; the wrist, elbow, and shoulder in particular look awkward when rotated at certain angles. This happened a bit with the previous rig and skin weights, but it is more noticeable with the new rig. If your wrist twists like this, you might want to see a doctor...


Problem 3: She belatedly realized that a few of the finger joints were not in the optimal places for certain gestures... specifically, any gestures that involved the thumb and fingers touching. She plans to re-visit this at a later time, if the opportunity arises, but figured that there were better uses of time than trying to tweak the rig again.

Nicole did manage to get the 10 animations (mostly) done. A few still need fine tuning. 
 



The rest of the rendered videos can be found here. Is there a way to organize Youtube uploads into "folders" or something similar, so the older and newer videos will be separate?

So, for next week:
  • Omar will try to have a simple beta-spline manipulation GUI made in Maya (probably in MEL script)
  • Nicole will start writing a Maya application (in Python?) to get the control points from an animation curve in Maya.
Until our Eulerian paths cross again.

Full of love we are,

Nelskati

Thursday, March 3, 2011

Post White and the Seven Posts Post.....post...postpostpost

O.M.GUI. It's almost spring break. Wow.

We don't feel like writing a blog post, but if we were to write one, it might go like this:

"O.M.GUI. It's almost spring break. Wow.

We don't feel like writing a blog post, but if we were to write one, it might go like this: 

'Nicole has been murdered by studying for midterms. And by mixed-media animation. But she's been brought back to life by the power of doughnut holes.

She did pick up a good idea during the weekly meeting on Thursday. So how do we check if an "angry" emotion actually looks angry? One way is to permute the control points from their "base" values, then upload these gestures to Mechanicalturk and have people vote on which emotions the gestures convey. By surveying a large group of people, we can see how strongly a gesture conveys a certain emotion. Hopefully we will be able to find a trend, for the "angry" values, for example, to save time when modifying future gestures.

Omar had an equally stressful week. There were also doughnut holes involved.

He has begun to read/consult the C++ Maya API to figure out how to correctly draw out his beta-splines in Maya. He has also been giving some thought to what the GUI in which both Nicole's and Omar's parts of the project will interface. He's not sure if it should be directly in Maya (i.e. a GUI in MEL script) or if it should be a separate thing that takes information from a Maya file. It seems like the first option may be the one to go with, at least at first.

A question: When will Unity be involved in the scope of our project, if ever? We haven't had to incorporate it thus far, and we're not sure how/when it will come into play.


For next week:
  • Nicole will be in Oklahoma (where the wind comes sweeping down the plain, and the waving wheat can sure smell sweet when the wind comes right behind the rain) enjoying her break.
  • Omar will be performing with Mask & Wig in New York City, Pittsburgh, Chicago, and Detroit. They may even make a stop in Canada. How aboot that? That'd be pretty cool, eh?
So, no blog post for Nelskati for a week. Hopefully you can manage on your own. We surely can.

Well, until we blog again.

Love is also like a box of chocolates,

Nelskati

'
Something like that.
"
Something like that like that. Good thing we didn't actually write one.

Bye.