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:

My Review of iBooks Author is Up on Ars Technica

In the course of making my interactive iBook version of 101 Autodesk Maya Tips, I evaluated Apple’s iBooks Author, a free app for OS X that makes it really easy to make interactive iBooks. Unfortunately, it doesn’t unsuck the review process at Apple, which still has my iBook in its slow-churning guts. See the full review here.

0 notes | Permalink

Interactive Command Line Nuke script

I made a simple shell script to use for interactively prompting start and end frames:

Same logic as the Maya one here. Here’s the download link:

http://www.can-con.ca/tumblrpics/nukeme.zip

Just set up your $PATH variable for Nuke or put an absolute path to the Nuke binary in your script. Works in OS X and Linux.

0 notes | Permalink

Automator Service to QuickLook a Selected Path

I made a simple service to use QuickLook to preview the selected absolute file path. Handy for previewing something before using rm or, here, to verify that my distributed V-Ray render is okay:

Download the service for OS X 10.7 and above.

0 notes | Permalink

Replacing the DVD drive with a hard drive in a MacBook Pro 17”

I just got a new quad-core 2.5GHz i7 17” MacBook Pro (Sandy Bridge) and it’s amazing for 3D and actually makes a serious dent in V-Ray renders when paired with my 12-core Mac Pro Xeon. But I didn’t buy it for the DVD drive. For my younger readers, “DVDs” and “CDs” were physical media formats that took up actual physical space and their primary appeal was their ability to collect dust. Some saw DVDs as trophies that represented their refined taste in film. They were like coffee table books but dumber. Anyway, my point is that I didn’t need the drive and wanted to replace it with a huge, cheap hard drive while keeping the OCZ Vertex Turbo I had around to use as my system drive (it’s a huge difference in speed).

The incredible popularity of the MacBook Pro has revealed what PC users will find ironic: that there is a market of competing hard drive caddies that use the DVD drive bay of the MBP. The best-known of these is the MCE Tech Optibay. MCE Tech makes nice Mac customization components and I have a Mac Pro PCI Express SAS backplane adapter from them. But they charge two arms and two legs for everything they make. The Optibay is $100, which is retarded for a piece of metal, a SATA adapter and a few screws. Anyway, I searched for “opti bay” on eBay and found one for the 17” model for $18 from ny-compu-tek. It is amazingly well made and looks better than what is shown on the MCE web site:

So I quickly used it to replace this relic with the 750GB 5400 RPM drive that will hold my stock textures, fonts and working files:

It’s very simple to do and the only hiccup I found was when I went to put the back cover on and the edge didn’t meet evenly – it turned out that I hadn’t placed the wire bundle at the corner of the drive under the bracket. It should look like this:

After that, the back cover fit flush against the edge. The drive works great, there are no drivers needed to recognize a hard drive instead of a DVD (some people wondered about this), and the system instantly saw it in the option-button startup screen (I had it partitioned and loaded with OS X and Windows 7:

My SSD at the left and the partitioned drive with recovery partitions. The Choose Network option is great if you’re installing a new drive - you can install Lion directly from the cloud and that’s what I did for my SSD. No need for a DVD drive. My girlfriend got a MacBook Pro Air and she’s a pianist so she bought the external USB Superdrive in case she needs to listen to/burn a CD (refer to above for definition) so I could use that if I had to burn something for someone.

The Boot Camp stuff works fine and I’m finally getting around to trying the Witcher 2, which is no Dark Souls, but it’s decent:

It’s been swell DVD drive. We can still be friends.

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

Fun With Python 3.2 – Multithreaded Image Batching by a Programming Newb

I’m just starting to learn Python – like it’s been a week now – and my first script was a port of my bash shell script that takes an image list from standard input and sends to to sips (fast QuickTime image conversion built into OS X) for conversion. It was easy enough and I am liking the language for sure. When I started my second Python script, I thought I was setting the bar too high – I wanted to multithread this conversion operation so that it uses all CPU cores by spawning a sips instance for each core. sips isn’t multithreaded so this is the only way to get it to use all the hyper-threaded cores in my 12-core Westmere Mac Pro. After getting pointed in the right direction by Python pipeline TD Luke Olson, I was told that Python 3.2 makes it much easier to do this type of thing, and he was right. If you’ve heard of Grand Central Dispatch, Mac OS X 10.6 and above’s thread pooling technology, Python 3.2 ProcessPoolExecutor works much the same way, at least as far as ease of implementation is concerned. I’m a guy who knows ridiculously little about programming but I am now up running after a day of tinkering with a multithreaded script:

You can tell from the video that there is some weirdness to the concurrency - it seems to complete the batch of 24 before starting the next batch, but I don’t know enough about how it’s working to know if that’s just a limitation of process pooling in Python 3.2 or my mistake. Anyway, it’s an exciting start and I’ll be rolling these scripts into Automator actions and free Python scripts to post after I sort out the name filtering.

21 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

More Headless Batch Processing Fun with Maya and Standard Output

A couple days ago, I talked about using Maya as a headless workhorse to do batches and I’m going to talk a bit about the best method that was really only mentioned in passing: using Maya in prompt mode with an open commandPort to pipe it commands from Unix standard output. By sending commands to a Ruby (or Python) script that redirects standard output to Maya, you can put a MEL or Python command in a script that processes files in batches. Want to have all specified files open, merge all meshes into a single group and then export or save the files? Easy:

The main issue is that I’m using bash and echo, which requires escaping all code so it’s messy. I need to learn Python or Ruby (the socket connection script is not by me) to do this more efficiently as one command. Still, it’s obvious that it’s a fast and efficient way to process a bunch of files and the hard work of making the command set to send to the Ruby pipe is done and free to use. You can just add to the set of possible operations and use it as a growing batcher.

Update: I found a simple workaround to the escaped code and echo problem. Just use a MEL plain text file and have it fed via “cat /code.mel | stmaya” to the Ruby pipe as the main command:

That saves having to write unintuitive escaped code with backslashes everywhere. You don’t even have to remember to put semicolons at the end of the MEL code lines. If you want to play around with this set of tools, I zipped it up and put it here.

4 notes | Permalink

Revisiting the Quadro 4000 Mac Edition: Lion Makes it the Card it Was Meant To Be

I get a lot of questions about graphics cards on the Mac since I review them for Ars Technica and have a lot of experience with GPUs and different 3D/app apps in OS X. A lot of people read my review of the Quadro 4000 Mac Edition and are now wondering if this card, which performed really well but had a lot of show-stopping bugs at the time of the review, is now working like it should. Yes, it is. I’ve been using it for months with OS X 10.7 to 10.7.2 and, in the entire time I’ve used Lion, I’ve only had one kernel panic and all indications are that the graphics card had nothing to do with it. Considering I’ve used virtualization apps with 3D running next to Maya and rendering, it’s safe to say this is stable. It’s really the card it was meant to be now and works great with CUDA apps like Octane Render.

There is one catch though. There is still no word on OpenCL support for this card. At the last minute, Apple pulled the plug on this from Lion, which pissed me off pretty badly. Nvidia reps haven’t got back to me on the status of this either, so it can’t be used with things like V-Ray RT’s GPU mode, which is OpenCL based. No one doubts that OpenCL is increasing in prevalence, so not having this for a card that costs about $700 is pretty bad. If you don’t need OpenCL and you want the extra memory vs. the Radeon 5870, I can recommend the Quadro. Otherwise, the cheaper Radeon works very well for Maya, Mudbox and every other app I’ve thrown at it and it has OpenCL support and can drive three screens vs. the Quadro 4000’s two.

If you’re looking for benchmarks of the card, click the link in the review above. It was run in 10.6.8 but the speed isn’t noticeably different in 10.7.2.

12 notes | Permalink