<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
   <channel>
      <title>Timing and Spacing</title>
      <link>http://www.wilygraphics.com/timingandspacing/</link>
      <description>A place for my thoughts and ideas on the animation art-form.
Content Copyright 2006-2008 David Lewis</description>
      <language>en</language>
      <copyright>Copyright 2008</copyright>
      <lastBuildDate>Fri, 07 Mar 2008 21:23:56 -0800</lastBuildDate>
      <generator>http://www.sixapart.com/movabletype/?v=3.2</generator>
      <docs>http://blogs.law.harvard.edu/tech/rss</docs> 

            <item>
         <title>XML Plugin updated with Maya 2008 binary</title>
         <description><![CDATA[<p>I just did a build of the XML plugin for Maya 2008.  The <a href="http://www.wilygraphics.com/melscripts/XMLPlugin-0.9a.zip">zipfile</a> now contains a binary for Maya 2008.  The only caveat is that the 2008 binary hasn't been tested.  I won't have access to 2008 until next week, so it may work, it may not.</p>]]></description>
         <link>http://www.wilygraphics.com/timingandspacing/2008/03/xml_plugin_updated_with_maya_2.html</link>
         <guid>http://www.wilygraphics.com/timingandspacing/2008/03/xml_plugin_updated_with_maya_2.html</guid>
         <category>MEL Scripting/Maya API</category>
         <pubDate>Fri, 07 Mar 2008 21:23:56 -0800</pubDate>
      </item>
            <item>
         <title>XML Parsing Plugin</title>
         <description><![CDATA[<p>I finally have gotten around to packaging up the binaries for the XML parsing plugin.  I finished it up two weeks ago but with GDC and then suffering through a cold the week after GDC, I've been too busy sleeping or trying to get caught up at work to get it packaged up and posted.</p>

<p>This plugin lets you load and save XML to and from MEL string variables and files.  It's pretty permissive about the XML it will read.  There are binaries for Maya 7.0, 8.0 and 8.5.  Initially I was going to stop using this with 8.5 and move over to Python, but I find the Python/MEL integration so unwieldy that I use Python far less than I initially thought.  So, I may be building a version for 2008 as well.  I can probably build versions for earlier versions of Maya.  I think I have access to 6.5 and 5.0 but I'll have to see.</p>

<p>Take a look at the documentation <a href="http://www.wilygraphics.com/docs/melXML.htm">page</a> and you can download the binaries from my MELScripts/Plugins <a href="http://www.wilygraphics.com/index_files/MELScriptsHead.htm">page</a>.  I'll try to get the source code up in a reasonable time frame, but may be a couple of weeks.</p>

<p>Let me know of any comments, suggestions and bugs.  One area I haven't used much is the data items.  Pretty much all the XML I work with is all elements and attributes.</p>

<p>Enjoy.</p>]]></description>
         <link>http://www.wilygraphics.com/timingandspacing/2008/03/xml_parsing_plugin.html</link>
         <guid>http://www.wilygraphics.com/timingandspacing/2008/03/xml_parsing_plugin.html</guid>
         <category>MEL Scripting/Maya API</category>
         <pubDate>Sat, 01 Mar 2008 19:04:33 -0800</pubDate>
      </item>
            <item>
         <title>Pardon the Interruption</title>
         <description><![CDATA[<p>Well, we were gone for a day or two.  I forgot to renew my domain before the expiration, but it's taken care of now.  Which you've probably figure out if you're reading this.</p>

<p>Trying to finish up the XML plugin and get it ready for posting.  I've been using it for a little while and I just have a few rough edges to knock out.  A few more days.</p>]]></description>
         <link>http://www.wilygraphics.com/timingandspacing/2008/02/pardon_the_interruption.html</link>
         <guid>http://www.wilygraphics.com/timingandspacing/2008/02/pardon_the_interruption.html</guid>
         <category>Meta - blog/website</category>
         <pubDate>Tue, 12 Feb 2008 11:53:09 -0800</pubDate>
      </item>
            <item>
         <title>XML Parsing plugin for Maya</title>
         <description><![CDATA[<p>As it turns out, one of the most generally useful pieces of code I've written at work is an XML parser plugin.  The studio uses XML for a variety of things: configuration files, asset storage and description, and also XML is stored in attributes on Maya nodes.</p>

<p>We had an XML parser library in C++ but nothing callable from MEL.  The studio hadn't switched over to Python yet so there was no good solution.  Before I got there, any functionality that needed to parse XML was either written in C++ (which means there are a number of tools written in C++ that should be MEL), or people just kind of did a rough grovel through the XML to extract what they needed and just hoped it worked.</p>

<p>Two or three weeks after I started (back in February or March of 2007), I spent a weekend wrapping the C++ XML library in a plugin.  I took the design decision to make the interface look like the C++ methods and so I ended up with MEL commands like:<br />
<pre><br />
	xmlGetNumChildren<br />
	xmlGetChild<br />
	xmlGetNumAttributes<br />
	xmlAppendAttribute<br />
	etc.<br />
</pre></p>

<p>There are about twenty different commands.  In hindsight this wasn't the right decision.  While it's useful for people familiar with the XML parser, it's not very familiar to those native MEL speakers.</p>

<p>Even so, this has been very useful at work to a wide variety of people.  So I decided I needed the same functionality at home, so I've been working on an XML parsing plugin in my spare time.  I'm using Python some (both at work and at home) but haven't moved over completely so I think this will definitely get some use.</p>

<p>I found an <a href="http://iridia.ulb.ac.be/~fvandenb/tools/xmlParser.html">XML parser</a> by Frank Vanden Berghen to use and I've been writing a plugin in my spare time at home. It's given me a chance to correct the design flaw described above.  Now there's just a handful of commands, one each for elements, attributes and data (plus a few utility functions for doing file I/O, etc). The commands support create, query and edit modes.  A much better MEL-ish interface.</p>

<p>I'll be posting the plugin binaries plus the source and VS2005 project file in the next week or so.  I've got a bit more work to do to finish it up along with some more testing.<br />
</p>]]></description>
         <link>http://www.wilygraphics.com/timingandspacing/2007/12/xml_parsing_plugin_for_maya.html</link>
         <guid>http://www.wilygraphics.com/timingandspacing/2007/12/xml_parsing_plugin_for_maya.html</guid>
         <category>MEL Scripting/Maya API</category>
         <pubDate>Sun, 16 Dec 2007 16:46:13 -0800</pubDate>
      </item>
            <item>
         <title>Movie sketches</title>
         <description><![CDATA[<p>This weekend I was watching the Directors Cut of "Kingdom of Heaven".  After I finished, I thought I'd watch the film again with the sound off to pay attention to some of the visuals.  As I was doing this, I did a couple of pages of some storyboard style sketches of the frames.<br />
<p><br />
These were a lot more time-consuming than I thought.  I draw pretty slow, but each page took me about 45 minutes.  I only got about eight minutes into the movie.<br />
<p><br />
Here's the first page:<br />
<a href="http://www.wilygraphics.com/timingandspacing/images/sketches/KingdomOfHeaven.jpg"><img src="http://www.wilygraphics.com/timingandspacing/images/sketches/KingdomOfHeaven-thumb.jpg"></img></a><br></p>

<p>I like the way a few of these turned out.  The opening shot with the horses, the cross and the priest.  I like the shot of the priest looking over his shoulder the least.  Faces and portraiture are just hard.</p>

<p><br />
</p>]]></description>
         <link>http://www.wilygraphics.com/timingandspacing/2007/03/movie_sketches.html</link>
         <guid>http://www.wilygraphics.com/timingandspacing/2007/03/movie_sketches.html</guid>
         <category>Movies</category>
         <pubDate>Mon, 19 Mar 2007 09:58:57 -0800</pubDate>
      </item>
            <item>
         <title>WonderCon</title>
         <description><![CDATA[<p>I figured that since I am so close to San Francisco (I'm in Menlo Park),  I'd go up to WonderCon this past weekend.  It was being held at Moscone Center.  I was pretty eager to see the presentation by Brad Bird on "Ratatouille" and the presentation on "300".  I took the early Caltrain up from Palo Alto to San Francisco.</p>

<p>Brad showed two sequences from "Ratatouille": one where Remy goes into Skinner's kitchen.  He has mishap after mishap until finally he ends up about to escape, but can't quite leave the kitchen and gets caught.  The later clip is with Remy and Linguini interacting for the first time.  I didn't know too much about this movie before the presentation, but it looks to be fantastic.  The animation is absolutely superb, the writing is very good and the what bits of the story I could see look very good.  I think this will be another home-run for Pixar.</p>

<p>We got to see one clip from "300" where the Spartans push the Persians over the cliff.  The movie has a great look; the action is pretty good. The Gerard Butler fan club had strong representation and he got most of the questions.  He is very entertaining and a pretty funny guy.</p>

<p>I also spent some time on the exhibition floor.  Stood in the lunch line next to Ernie Hudson.</p>

<p>The Masquerade was entertaining and the Light-side vs. Dark-side Star Wars fan film contest had some funny films.</p>

<p>It was a long day, but quite a bit of fun and a great distraction from work.<br />
</p>]]></description>
         <link>http://www.wilygraphics.com/timingandspacing/2007/03/wondercon.html</link>
         <guid>http://www.wilygraphics.com/timingandspacing/2007/03/wondercon.html</guid>
         <category></category>
         <pubDate>Mon, 05 Mar 2007 19:53:16 -0800</pubDate>
      </item>
            <item>
         <title>Starting a New Job</title>
         <description><![CDATA[<p>Things are going to be hectic for me and maybe slow for the blog for a few weeks.  I've accepted a job as a Technical Animator with a game company in the Bay area.</p>

<p>I don't think things will change too much because of this.  I'll probably add the obligatory "all opinions are my own, not my employers" to the sidebar, but that's about it.  I probably won't say too much about work.  This blog was really intended to be more about what I'm interested in and what I'm doing personally, not professionally (though there is an overlap).</p>]]></description>
         <link>http://www.wilygraphics.com/timingandspacing/2007/02/starting_a_new_job.html</link>
         <guid>http://www.wilygraphics.com/timingandspacing/2007/02/starting_a_new_job.html</guid>
         <category></category>
         <pubDate>Fri, 02 Feb 2007 19:13:36 -0800</pubDate>
      </item>
            <item>
         <title>Rag Doll Physics Simulation</title>
         <description><![CDATA[<p>My muscle system creature rig has gotten put on the backburner for a while.  I ordered the MuscleTK plugin for Maya and the software arrived fine, but I could never get the cgToolkit people to send me an activation code.  After two weeks of e-mailing them myself and having the store where I bought the software e-mail them and getting no response, I returned the software (kudos to the company I ordered it from, they were awesome!).  I'll give Michael Comet's plugin a try next, but I need to save up for a little bit to afford it.</p>

<p>So, the next bit I'm playing around with for my demo reel is a rag doll physics simulation.  Something similar to the basics to Natural Motion's Endorphin, but done as a Maya plugin.  Initially, I just want to get the basic physics in place; I'll see where it leads me after that.</p>

<p>Here's the first test.  I thought I'd try YouTube as a repository for some of my video tests.  There's no real physics going on here, just a dampening of the oscillation.  This is really just testing out my infrastructure (making sure I know how to connect things up correctly and drive joint rotations properly).</p>

<p><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/nhBKYv4l-Ak"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/nhBKYv4l-Ak" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object><br />
Hmmm.  The YouTube embed doesn't show up in my RSS reader (GreatNews)...</p>

<p>This is what it looks like in the hypergraph:<br />
<a href="http://www.wilygraphics.com/timingandspacing/images/ragdoll/ragdollsimhypergraph.jpg"><img src="http://www.wilygraphics.com/timingandspacing/images/ragdoll/ragdollsimhypergraph-thumb.jpg" alt="Rag Doll Simulation Hypergraph Shot"></img></a></p>

<p>I'll post again once I get some real physics dropped in.</p>]]></description>
         <link>http://www.wilygraphics.com/timingandspacing/2007/01/rag_doll_physics_simulation.html</link>
         <guid>http://www.wilygraphics.com/timingandspacing/2007/01/rag_doll_physics_simulation.html</guid>
         <category>Demo Reel</category>
         <pubDate>Sat, 27 Jan 2007 16:11:16 -0800</pubDate>
      </item>
            <item>
         <title>A bit of older artwork</title>
         <description><![CDATA[<p>I was rummaging through the room we call "the library".  It's basically one of the two rooms where I keep all my junk (the other being "the office").  I stumbled across this old drawing I did at a SAFA "Drawing Jam" several years ago.  It's one I had forgotten I had done and I was amazed to see it.</p>

<p>I'm not normally into portraiture, but I thought then and think now that this turned out pretty well.  Of course, I can see a ton of little things that I know aren't right, but I still really like the overall effect.<br/></p>

<p><a href="http://www.wilygraphics.com/timingandspacing/images/sketches/ballerina.jpg"><img src="http://www.wilygraphics.com/timingandspacing/images/sketches/ballerina-thumb.jpg"></img></a></p>]]></description>
         <link>http://www.wilygraphics.com/timingandspacing/2007/01/a_bit_of_older_artwork.html</link>
         <guid>http://www.wilygraphics.com/timingandspacing/2007/01/a_bit_of_older_artwork.html</guid>
         <category>Artwork</category>
         <pubDate>Mon, 22 Jan 2007 21:53:15 -0800</pubDate>
      </item>
            <item>
         <title>Muscle Studies</title>
         <description><![CDATA[<p>I'm preparing to rig one of the models I have using a muscle/skinning plugin and cloth.</p>

<p>In getting ready for that, I've been doing some muscle studies.</p>

<table>
<tr>
<td><a href="http://www.wilygraphics.com/timingandspacing/images/musclestudy/MuscleStudy-Shoulder-SideView.jpg"><img src="http://www.wilygraphics.com/timingandspacing/images/musclestudy/MuscleStudy-Shoulder-SideView-thumb.jpg"></img></a>
</td><td><a href="http://www.wilygraphics.com/timingandspacing/images/musclestudy/MuscleStudy-Shoulder-FrontView.jpg"><img src="http://www.wilygraphics.com/timingandspacing/images/musclestudy/MuscleStudy-Shoulder-FrontView-thumb.jpg"></img></a>
</td></tr><tr><td><a href="http://www.wilygraphics.com/timingandspacing/images/musclestudy/MuscleStudy-back.jpg"><img src="http://www.wilygraphics.com/timingandspacing/images/musclestudy/MuscleStudy-back-thumb.jpg"></img></a>
</td>
</tr></table><br/>
Concentrating on the shoulder/upper arm area first; I'll be doing more over the next few days or a week.]]></description>
         <link>http://www.wilygraphics.com/timingandspacing/2007/01/muscle_studies.html</link>
         <guid>http://www.wilygraphics.com/timingandspacing/2007/01/muscle_studies.html</guid>
         <category>Artwork</category>
         <pubDate>Wed, 17 Jan 2007 16:24:19 -0800</pubDate>
      </item>
            <item>
         <title>Maya 8.5 with Python</title>
         <description><![CDATA[<p><a href="http://usa.autodesk.com/adsk/servlet/index?siteID=123112&id=7635643">Maya 8.5</a>, now with Python!</p>

<p>I don't think I'm going out on a limb to state that one of the requirements of a platform is to be scriptable. I've never understood why platform creators (which is really what Maya is, a platform for doing 3D graphics) have felt the need to create their own scripting languages. There are a number of choices for embeddable languages: Python, Perl, and Tcl.  I've always felt that Python was the number one choice.  It has been embeddable since version 1.0 came out in early 1994.</p>

<p>Now I don't know how long MEL has been around, but it may predate the release of Python and I totally get not re-engineering something that's working, but I'm really jazzed about being able to use Python do do my scripting.  It's awesome that Autodesk has done this work.  If this is the type of thing we'll see coming out of Autodesk, I'll be really pleased.</p>

<p>Having built a reasonable sized system (RigBuilder which has around 15K of MEL code with the main driver being around 2K and another 12K-13K of rig modules), I know I needed better data structures than MEL provided several times.  Using parallel arrays as an advanced data structure just doesn't cut it.</p>

<p>Now I just have to get my hands on it.  Too bad the PLE is based on 7.0.</p>]]></description>
         <link>http://www.wilygraphics.com/timingandspacing/2007/01/maya_85_with_python.html</link>
         <guid>http://www.wilygraphics.com/timingandspacing/2007/01/maya_85_with_python.html</guid>
         <category></category>
         <pubDate>Wed, 17 Jan 2007 00:18:02 -0800</pubDate>
      </item>
            <item>
         <title>RigBuilder redesign</title>
         <description><![CDATA[<p>I've been working on some rig generation scripts for biped characters.  They started their life as scripts that were driven by shelf buttons.  The options were hardcoded into the shelf button.  You wanted to change the angle/offset/size of a controller, you had to edit the shelf button.  Building a complete rig consisted of pushing several shelf buttons. You can see it in action building several rigs in my demo <a href="http://www.wilygraphics.com/DemoReel-01-large.mov">reel</a>.</p>

<p>When I started building a UI around the scripts, I had two main design goals which were:<br/><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1. Easy to change the rig on a limb by just changing a selection in a list. You have IK and you want switchable FK/IK? No problem.  Change a selection, regen the rig and off you go.<br/><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2. New rig designs were easy to code and you just drop them in.  Each rig subsytem was self-contained - no code changes to hook them in.<br/></p>

<p>When I first started out the project, I couldn't figure out how to meet the second goal.  I had a number of .mel scripts.  How to tell when a new one had been added?  How would I find new rig scripts and figure out what they were?  Since MEL doesn't have anything resembling reflection (except for the 'whatIs' command), getting this done seemed pretty difficult.</p>

<p>So, not wanting to get blocked, I punted on the problem.  I made the interface to the rig files as simple as possible (each limb e.g. arms, legs, back, etc) had a specific signature for building and that was that.  To add a new arm type, you had to go to the menu for arm types, add the string you wanted and then go to the code that looked at the options and add a new clause to the if-then-else and call the new function. Not great, but not terrible.</p>

<p>As work progressed, I accidentally did a really good thing.  I separated the scripts into subdirectories: one for the arm modules, one for the leg modules, etc.  Then I explictly traversed the directories with 'getFileList' and sourced the .mel files I found.</p>

<p>As I was finishing up the demo reel, it hit me.  I could use the 'whatIs' command and query if certain methods existed.  Since I was explicitly sourcing the .mel files, I had their name.  If the methods I was interested in were prefixed with the file name, that was all I needed.</p>

<p>So, now the interface to a subsystem is pretty simple:<br/><br />
&nbsp;&nbsp;&nbsp;&nbsp;- a build proc<br/><br />
&nbsp;&nbsp;&nbsp;&nbsp;- a display options proc<br/><br />
&nbsp;&nbsp;&nbsp;&nbsp;- a save options proc<br/><br />
&nbsp;&nbsp;&nbsp;&nbsp;- a couple of procs to get menu strings and stuff<br/></p>

<p>Now, the main generator is completely generic.  You want to add a new a new rig type for a limb?  Just code up the functions and drop it in the correct directory.  It automatically shows up in the UI and is available.</p>

<p>Now of course, the connections are more subtle.  Particularly between the skeleton and the rig types.  I've eliminated a bunch of the naming problems by automatically selecting the best joint I can find, based on name.  However, if the skeleton has a different naming scheme, the rigger can just select the right joint in the rig builder UI.  But what if you want a ribbon spine and there's no nurbs plane for the ribbon?  You the build just fails.  The whole connection between the skeleton and the code is too tight and too implicit.</p>

<p>Something to work on for the next version.<br />
</p>]]></description>
         <link>http://www.wilygraphics.com/timingandspacing/2007/01/rigbuilder_redesign_1.html</link>
         <guid>http://www.wilygraphics.com/timingandspacing/2007/01/rigbuilder_redesign_1.html</guid>
         <category>Demo Reel</category>
         <pubDate>Mon, 01 Jan 2007 15:05:47 -0800</pubDate>
      </item>
            <item>
         <title>Main website is up...</title>
         <description><![CDATA[<p>Well, I've got a basic website up.  It's located at the root of the domain, or <a href="http://www.wilygraphics.com">here</a> for the link.</p>

<p>There's been an "Under construction" page there forever, which I guess my provider placed there for me.  For the last few days, there's been a rough set of pages that I created with the web app that my provider makes available called "Site Creator".  I didn't really like it because it kept losing my pages.  They'd show up on the web, but when I went to the site map in the editor they wouldn't be there, so I couldn't edit them.</p>

<p>I looked around at other packages, mainly Joomla.  It looked interesting, but it looked like a beast to install.  So, I opted for Microsoft Publisher.  Not sure I like the look and I definitely don't like the on-disk layout of the pages, but I'll see about customizing that stuff as I go.  I probably won't provide any links to the interior until I get that stuff figured out.</p>]]></description>
         <link>http://www.wilygraphics.com/timingandspacing/2006/12/main_website_is_up.html</link>
         <guid>http://www.wilygraphics.com/timingandspacing/2006/12/main_website_is_up.html</guid>
         <category>Meta - blog/website</category>
         <pubDate>Sat, 30 Dec 2006 18:35:31 -0800</pubDate>
      </item>
            <item>
         <title>Demo Reel updates</title>
         <description><![CDATA[<p>As I was putting my demo reel together, more than once I thought that I should post fragments of the reel or my thought processes, or progress reports, or whatever.</p>

<p>So, as I work on new stuff, I'm going to start posting it to this blog.  If nothing else, it should help me post more regularly.</p>]]></description>
         <link>http://www.wilygraphics.com/timingandspacing/2006/12/demo_reel_updates.html</link>
         <guid>http://www.wilygraphics.com/timingandspacing/2006/12/demo_reel_updates.html</guid>
         <category>Demo Reel</category>
         <pubDate>Thu, 28 Dec 2006 18:43:30 -0800</pubDate>
      </item>
            <item>
         <title>My Student film on YouTube</title>
         <description><![CDATA[<p>The student film I worked on (pretty much fulltime from Jan '05 though Sept '05 and then part-time until around June '06) is up on YouTube.  I did most of the rigging, a lot of the scripting and a number or other random things (an effect here and there, a little bit of animation) for the film.  A ton of other really talented people worked really hard on it as well.</p>

<p>Check it out:</p>

<p><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/UNRlBlzsetY"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/UNRlBlzsetY" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed><br />
</object></p>

<p>This is just the temp score; <a href="http://www.hummiemann.com/">Hummie Mann</a> and his students will be doing the final score.  I've heard August '07 is when it will be finished.</p>]]></description>
         <link>http://www.wilygraphics.com/timingandspacing/2006/12/my_student_film_on_youtube.html</link>
         <guid>http://www.wilygraphics.com/timingandspacing/2006/12/my_student_film_on_youtube.html</guid>
         <category>Animation</category>
         <pubDate>Mon, 25 Dec 2006 02:55:09 -0800</pubDate>
      </item>
      
   </channel>
</rss>
