2012-01-30

Maya API and openMP multithreading

In this post I want to write about the steps necessary to compile a Maya plug-in, that uses openMP multithreading, with Visual Studio. I assume the reader has compiled a Maya plug-in before.

Summary:
  • Enable openMP option in project properties
  • Don't use Visual Studio Express/Standard
  • Switch to Release in "Solution Configuration" to use the plug-in (.mll) on other PCs

Detailed explanation:
Writing the code is fairly straightforward (it's not a lot) and the Autodesk Maya API Guide and Reference explain openMP really well. (Check out the splatDeformer devkit example)
Now I will write the steps necessary to get the splatDeformer running (I am using Visual Studio 2008 and Maya 2010, 2011, 2012 all 64bit):
  • Open the splatDeformer.sln in the Maya devkit folder (if you copy it somewhere else you have to fix the \lib and \include paths)
  • You should be able to compile the solution already. (If not, there is probably something non-openMP related not working)
  • It's compiling because openMP is actually disabled by default in the solution and the openMP code is not used. To enable it you have to set splatDeformer: Properties > Configuration Properties > C/C++ > Language > OpenMP Support > Yes (/openmp)
  • If you are using the Express or Standard edition of Visual Studio you will get the following error:
fatal error C1083: Cannot open include file: 'omp.h': No such file or directory
  • That's because the Express/Standard edition do not support openMP. You can find some tutorials on how to install openMP manually. But I can not confirm that they are working in this case, because I switched to the professional version at my school.
  • So with a Visual Studio version, that supports openMP, you should be able to compile the plug-in successfully. And maybe it will work on your PC, but most likely not on other PCs. The error should be:
Error: The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.
  • To fix this you have to switch your Visual Studio "Solution Configuration" from Debug to Release. (Note: Release may have different Configuration Properties, so you may have to enable OpenMP Support again and set output file, etc). More experienced Visual Studio users will know this error, because it also happens if you don't use the Release mode and try to load your output file with Maya on another PC (that does not have Visual Studio installed). More information on that point (bug report)

For a more complex deformer example than splatDeformer, that is using openMP, check out my prAttractNode. I noticed an increase in performance of 10-30% from openMP. You can find the open source download link in the Vimeo description of this video:

prAttractNode - deformer (Maya API, plug-in, Python)

2012-01-27

Demoreel 2010

This is my old Demoreel. It was made in 2011/02 with content from 2010 and a breakdown in the Vimeo video description. This post is about the process of creating the reel and the results in retrospect. Because it is almost one year old, I may have forgotten a few things.

Parzival Roethlein - Character TD Reel 2010



Making-of:
  • Decided on resolution and frame rate. (720p and 25fps)
  • Made Maya playblasts (project was not rendered yet) to show animated rig. (720p, 25fps)
  • Screen captures with CamStudio (free), to demonstrate rig functionality. (720p, fps not important, since I speed up the screen captures anyways)
  • The video files from CamStudio and Maya playblasts were then converted to a image-sequence (jpg or png), using VirtualDub (also free). This way it is fast to work with the data when editing and rendering the final video. 
  • Title and description texts made in Photoshop.
  • Image sequences and texts imported to Adobe After Effects for editing and final video export. The style of rig presentation with frame-freezing, then blurring and animating the text was popularized by Victor Vinyals (I think) with his demoreel in 2007.
  • Spent one day for first version, gathered feedback, then one more day for final version.
Results:
  • Because I am a student I only applied for jobs in the two semester breaks of 2011.
  • For the first semester break in March I applied at around six German companies as a freelancer. I would say one third did not answer, the others gave nice responses, but only the one that actually had a relevant job listed on their website hired me. (Animationsfabrik)
  • For the second semester break I wanted to get a rigging-internship at a big studio in a foreign country. So I applied at two companies in London and two in the US. One of the US studios told me I was in the final selection, but I did not hear from them afterward. The other US studio send me a rejection (cg software internship). From the two London companies one did respond and I got the internship there (Framestore). I also entered this reel to the "Computer Graphics Student Awards" on cgCoach.com and won an internship there, but since I already had an internship by then, it did not really matter.

    2012-01-26

    Maya API resources

    Because I uploaded a few open source Maya Plug-ins on CreativeCrash I got some e-mails regarding basic Maya API learning material. So I wanted to write a small summary in this post, mainly to plug the free video webcast with exercises from the Autodesk Developer Center:
    Maya (intermediate) (select from in the "Course" menu. There area also other Maya API courses, but I could not do any of them yet) [Updated link: https://www.autodesk.com/developmaya]

    But mostly I use:
    - Autodesk Maya API Guide and Reference
    - Comet Cartoons (Michael Comet) Very practical information when writing code. Especially when using different attribute types for the first time.

     And during my internship at Framestore I had a chance to see the two DVDs, which sadly don't seem to be for sale anymore:
    - Writing Creature Deformers (Erick Miller). Introduction to deformers. Also a good starting point when writing your own skinCluster, cluster or partial blendshape node. This DVD was not that useful for me, because I had written a deformers already, so there were only a few small things interesting for me. But if you are starting then this DVD will certainly safe you a few days of learning.
    - Introduction to the Maya API (Barbara Balents)

    The pdf Skinning in Maya at Industrial Light & Magic (Andrea Maiolo) gives detailed information on how to managa skinCluster data including paintable attributes.

    ChadVernon.com is a nice blog as well and there is also a list of resources.