MocoMaya: Update + Screenshots

Ok I finally implemented the MocoMaya curve export feature (it took so long because I had to dig through the Maya Python API looking for the right functions for traversing the graph curves and then testing them out, such a pain because of the odd style of MEL they used). Anyways we’ve got curve’s exporting to the MocoServer (normalized as are all the curvesets stored in the server).

Just like the Import, the Export assumes the begin and end frames are the begin and end frames set by the user in Maya and the frames are normalized between them (Note that the begin and end frames are preserved in the curve set file so they show up in the GUI’s Begin/End Frame settings… I’m still contemplating if that is a good idea or not since the Import ignores the Begin/End settings coming in… it doesn’t seem “well-balanced” if the Import and Export don’t follow identical rules… meh).

To test it all out, I created a curveset in the MocoBuilder, imported it into Maya, updated some actuator rotations by moving the joints in Maya, then exported the curveset back to the MocoServer. Then I created a second MocoMaya rig by running MocoMaya again (before that I quit the previous one’s window which still keeps the rig in the scene with the last curves it has). I moved the old one over a little bit, turned on live control from the MocoServer, opened up the new curveset in the MocoMotionBuilder GUI and started scrubbing through the frames and playing it flat out. You’ll remember that when the frames are scrubbed in the GUI it’ll also be updating the Maya’s current frame pointer which in turn animates whatever is already animated in Maya (ie. the old rig w/ curves).

So I hit play and keep a close eye on the Maya window to make sure the two rigs are moving identically… and for the most part they were pretty much in sync. This tested the correctness of the export feature and being able to read the resulting curveset in a different program (the MotionBuilder GUI). Now I did say “for the most part” above because apparently my interpolation of the curves don’t seem to be perfectly in sync with the way Maya is interpolating its animated curves (I believe Maya uses Bezier curves while I’m doing Catmull-Rom). However I believe this is in enough of a correctly functional state to be acceptable for the prototype that it is and I don’t intend to dig too much more into the finer details of spline math or the inner workings of Maya (neither of which I’m any good at).

Here are some screenshots of the MocoMaya client in action from within Maya 2010.

This is the start-up window and tab where you can enter in the Server, Port and optionally an existing Maya camera’s name.

Here’s the Controller tab where you can toggle on/off the control of the virtual camera by the MocoServer. You’ll also see that you can turn off the outgoing “viewfinder” (ie. a rendering from the camera’s POV) and also even turn down the resolution of the rendering to speed up the viewfinder/rendering. The viewfinder is viewable in the MotionBuilder GUI as a viewfinder.

This is the Import/Export curves tab which allows you to load and save curvesets to the MocoServer.

Here are some screenshots of the virtual camera rig that is created on the fly by the script when it connects successfully to the MocoServer. You’ll notice it’s nothing more than 3 joints with a camera stuck on the end… remember joints don’t get rendered in Maya so it should prevent the rig from rendering itself by accident 🙂

Here’s that last one annotated (using my awesome Gimp skillz) with the actual rotation movements

Comments are closed.