Dave Girard's 101 Autodesk® Maya® Tips is now available in Kindle, interactive iPad edition and DRM-free EPUB/PDF editions. Work faster, cry less. Read more about the ebook.




Follow cgbeige on Twitter

Topics by tag:



Recently published articles by Dave G:



Free downloads by Dave G:



Mac OS X-only downloads:

Make V-Ray Proxy Automator Service Updated

I made this Automator service a while ago for making V-Ray Proxies and I added a prompt for the face count.

Grab the service here. Should work in OS X 10.6 and above.

0 notes | Permalink

Multithreaded Image Conversion and rar/unrar Python 3.2 Scripts and Automator Services

So here are the downloads for the multithreaded Python image converters and multithreaded rar/unrar scripts I made yesterday. You’ll need Python 3.2 to run them, since they rely on the concurrent.futures module from 3.2. Grab the installer here: http://www.python.org/getit/releases/3.2/. The Mac installer doesn’t overwrite your existing 2.7.1 Python install so you invoke the new python by typing “python3” in the Terminal.

The .py scripts:

sips_PNG This uses sips in OS X for conversion, so if you’re looking to use it in Linux, you’ll probably want to rewrite the last line of def sipper to use Imagemagick’s convert or something built-in.

unrar_threaded This should work in Linux without modification.

rar_threaded This should work in Linux without modification.

How to run the scripts: these take a batch of paths to items from standard input and then process them, so the easiest way to run them is to type “find /path/to/images/ | python3 path/to/sips_threaded.py” or “find /path/to/whattocompress | python3 path/to/rar_threaded.py”

For OS X only – Automator workflows

First, the sips conversion workflow files (PNG, TIF, TGA, PSD, JPG). If you just want something to make image conversion fast and easy in OS X, I made Automator services for OS X 10.7 (might work in 10.6) that don’t depend on the terminal or the scripts:

Grab them here: Download here. The only catch is that these Automator workflows require that you make Python 3.2 the default version run when typing “python” in the terminal. That’s done by writing this in the terminal:

sudo cp /usr/local/bin/python3 /usr/bin/python

The good news is that this isn’t destructive since /usr/bin/python was just a duplicate of /usr/bin/python2.7. /usr/bin/ still has Python 2.7, 2.6, and 2.5 from the default OS X install, so I can still use older versions of those by typing “python2.7”.

rar/unrar multithreaded:

Download

23 notes | Permalink

Hardcore Workflow Tips for Blazing Through Production

I just got through a rather crazy few weeks of magazine production and I’ve got some time now, as I babysit the PDF uploads, to talk about some techniques for making your work easier in a similar case of do-or-die. I was brought in to take over art direction for a magazine that was dangerously close to the deadline and I had to use some efficient techniques and tools, some that I scripted, to keep from missing a barrage of tight deadlines. I know most of my readers are 3D artists so I’ll make this relevant to you guys thinking this is just about print design stuff. Aside from the workflow tips, which are Mac and Unix user-oriented, the CMYK and colour gamut info is relevant to everyone, and important to know since it will affect the quality of the work you submit to publications if you’re a 3D artist.

Dropbox, upgraded

To speed up the approval process, I mad an Automator workflow to move files to my Public Dropbox folder and then send all the links to the clipboard for emailing. The built-in Dropbox plug-in only copies one document link at a time so this killed two birds with a big giant rock – web-res PDF files moved and all links copied for my email:

Grab the Automator workflow here and replace the part before “/Public” with your account number and you’re good to go. If you’d rather have it copy instead of move, just replace “mv” in the script with “cp”.

Finder labels for change tracking

If you’re a long-time Mac user, you’ll know the value of Finder labels. If you’re new to Macs, start using them and you’ll wonder how you managed without them before. They are a simple and effective way of tracking to-dos:

If you’re working off of a server with multiple people on a project, put a screenshot of your label guide in the folder and suddenly everyone knows the status of all folders and files. Great for bringing in last-minute help when there’s a crunch.

You’re not doing anyone any favours by sending them CMYK images

Keep everything in RGB mode. For our magazine workflow, we send everything to press as high-res CMYK PDFs but I leave everything in RGB in the layouts and it’s actually much better to do this to get the best quality. Images should never be adjusted in CMYK mode, unless it’s an illustration where you need specific values looked up in a book or chart. We almost always have to tweak the balance, contrast and curves for images destined for press because what others see on their screens is very different from what press-calibrated settings look like. My calibrated NEC Spectraviews are set up for a very low luminance and 5000K white point for press (yes, it looks like ass), on top of being hardware calibrated. CMYK is a destination, not a good working colour space and the gamut is very small compared to AdobeRGB (or even sRGB). Here is a Colorsync Utility plot of a US sheet-feed coated CMYK profile inside AdobeRGB:

That’s a lot of colour info missing in that white area.

When I have to adjust an image, I might convert it back to RGB for drastic changes because adjusting image balance is not like adjusting CMYK values, that should always be left at your conversion settings for optimum ink density. So, if a photographer sends me an image in CMYK mode, they’ve effectively tossed away a lot of colour information needlessly, then had a lossy adjustment (curves, contrast, etc) on a smaller-gamut image, which further degrades the image and then had it converted back to CMYK. Leaving it in RGB mode for every stage, right up until they are made into CMYK PDFs for press by Indesign, means I can adjust after I get my proofs and always have the best quality possible. It also means I don’t have to manually change images to CMYK mode, saving time. So, if you’re sending your 3D illustration to a magazine for a portfolio submission, always send them an RGB image (8-bit, usually) and embed the colour profile. If you want to be extra anal about how it looks, send a colour proof they can try to match, because sRGB or AdobeRGB profiles don’t tell them anything about white point (Kelvin) or luminance. A colour profile alone is not enough to guarantee your work will be seen the same on someone else’s end – it’s just a colour look-up-table (a palette) and a gamma value.

Symlinks to the rescue

When it came time to leave my home office and head to the publishing company for proofreading and corrections, I had to put everything on my laptop. The problem is that this breaks the image links in Indesign, because they are absolute (not relative) paths. You can work around this by putting all the images in the folder with the layout but that’s a mess, so I used a symlink to fake a link to the original volume. The layout files were looking for images in /Volumes/HOME_RAID/WORK/Tourism_Toronto/ but all the layouts are in /Users/beige/WORK/Tourism_Toronto/ so I opened the terminal on my MacBook Pro and did the following commands:

sudo mkdir /Volumes/HOME_RAID

sudo mkdir /Volumes/HOME_RAID/WORK/

sudo ln -s /Users/beige/WORK/Tourism_Toronto/ /Volumes/HOME_RAID/WORK/Tourism_Toronto

The first command makes a folder in the Volumes folder. The second makes the WORK folder in there and the last command is the creation of a symlink in the WORK folder that links to the copied Tourism_Toronto folder. Once I open the layout in Indesign, all the image links work since it is simply redirected at the OS level to look in the copied folder and the absolute paths work fine. The I’ve used this in the past with V-Ray network renderings that were looking for similar absolute paths to textures and it works perfectly and there’s no risk to doing it. If you mount the actual real volume later, it just does what OS X used to do when you accidentally disconnected/reconnected a volume – it appends a -1 on the volume name so nothing is overwritten:

Just delete the HOME_RAID folder from the Volumes folder and it will mount normally:

That saved a lot of time.

Indesign tools for maximum awesome

If you’re an Indesign user and need to do very specifically named, single-page PDFs for press, Zevrix Batch Output (now Output Factory) is great and their Link Optimizer helped me swap out giant JPEGs for perfectly-scaled TIFFs. It saved a ton of time that otherwise would have been spent doing manual conversions/resizing/placement.

Anyway, you can tell that I’m a bit of a workflow nut but, if you are efficient at what you do, and become known as someone who will get your clients out of a ridiculous deadline unscathed, you can charge more and they won’t balk at the price tag because they know it will be done right – you’re Mr. Wolf from Pulp Fiction. For a freelancer, having a reputation as a reliable and efficient professional, in any field, is critical. Word travels fast when you have a bad reputation, so don’t let that happen, no matter how crappy the gig. Anyway, hope these tips prove helpful to others on brutal deadlines.

3 notes | Permalink

Using Maya in Headless Modes to Do Batches

Maya has three methods of interacting with it without a GUI. The first is by sending it commands via Unix standard output and a commandPrompt port (covered here), the second is in prompt mode where it basically runs in a terminal as a MEL or Python interpreter, letting you open scenes and process them with text commands. The other method is to ask it to do commands while opening a scene for rendering, and this sounds like a hack but it’s actually really powerful because it can be shell scripted and used with variables like multiple selected files. It also assumes you’re working with the file you’ve specified to render, so you don’t have to explicitly open it like when using the -prompt mode interpreter. I’ve been playing with UDK in Parallels Desktop 7 (works great) and I have all these stock tree models in Maya format that I’d like in FBX for UDK. Since FBXConverter can’t handle Maya files, the only GUI alternative is to open these one by one and export FBX files. Very tedious. So what I’ve done is used the render command with a -preRender “FBXExport -f /path/to/file.fbx” argument and just made the render a hardware render and written to /tmp so it doesn’t take any render time and it will be deleted by the OS later.

For the commands, the headless interpreter mode works by launching Maya with “-prompt” at the end of the launch command in a terminal window: /Applications/Autodesk/maya2012/Maya.app/Contents/MacOS/maya -prompt

That’s on OS X and same in Linux with different bath to the maya binary. In Windows it’s done with a launch flag on the application, I think. The render command works like this:

/Applications/Autodesk/maya2012/Maya.app/Contents/MacOS/Render -r hw -s 1 -e 1 -rd /tmp/ -preRender “putYourCodeHere” /path/to/file.mb

On Windows, you’ll need to use a different temp path. Here’s an example of the two latter methods doing the same action.

The drawback to the renderer method is that it’s not really meant for multi-line operations (merge, then export, for example) so it’s best used for simple exporting. If you want to do multiline processing as a batch, take a look at piping stdout to Maya. But for the simple export of FBX files, it’s great and I whipped up a shell script and Automator action to work with multiple files:

You can grab the shell script here and the Automator action here. Both the Automator action and the shell script accept multiple files as input and will save the FBX files to the same folder as the source file. Sorry, Windows users - it uses bash so there’s no way to get this to run on a Windows machine without Cygwin and I’m not sure that would work either.

Update: I’ve added more info on the headless modes here.

4 notes | Permalink

Automator Services to Convert Text Cases

My WordService utility was broken by the Lion update and it doesn’t look supported anymore, so I made these conversion services from shell scripts I found around the Net.

Put them into ~/Library/Services/ to install. [Optional] Assign hotkeys in Services system preference panel and you’re set for quick conversion of text.

1 note | Permalink

An Automator Service to Convert eBooks With Calibre

While I wait for all my iOS devices to update, here’s a thing I made this morning: an Automator converter to use Calibre to convert selected PDF/ePub/etc files to .mobi eBooks for the Kindle. Why use this when you could use Calibre’s interface to do the same? Because you’d have to use Calibre’s interface – a program so awful to use that it’s truly shocking.

Install the service by putting it into ~/Library/Services and then you’ll have a “calibre convert” item in your Services right click menu in the Finder. Relies on having calibre.app in /Applications folder or it won’t be able to find the needed binary.

If you want it to generate a different type of file (not .mobi), just open the workflow file in Automator and change the extension to another one that Calibre supports.

0 notes | Permalink

Automator Service for Creating Maya Workspace Folders

I got tired of using the Project Window to make new projects and deleting the folders I don’t need so I made an OS X Automator service for creating the folders I need for a given project with the Finder:

Copy a workspace.mel file to your home Documents folder and download and install the Automator Service to ~/Library/Services and you’re set.

If you want to add/edit the folders that are made, just open the Service in Automator and edit the contents:

2 notes | Permalink

Jealous of 10.7’s Move Multiple Items to Folder? Grab This Now

When I saw the OS X 10.7 feature to move multiple items to a new folder in 10.7, I quickly thought up a way to do it in 10.6 with Automator:

So grab it here and install it by putting it in ~/Library/Services. Unsupported, use at your risk, etc. etc.

0 notes | Permalink

Reveal File in Finder App for Maya/OS X

I don’t use the FCheck or the View command for anything so I thought I’d put it to good use with an Automator utility to reveal the file in the Finder. It’s the World’s Simplest Automator Application but it’s pretty useful if you need to copy or work with the file other than just opening it in an editor:

It’s dead simple to make yourself with Automator but here it is to download if you want it. You’ll need Maya 2012 and up for this one though since there was a bug in 2011 that didn’t let you select .app bundles as valid applications.

Update: I made a similar Automator service for use with the clipboard path to files and apps like Nuke:

Also shown in that video is my Open Clipboard path service which launches the file referenced in the clipboard.

2 notes | Permalink