Topics by tag:
Recently published articles by Dave G:
While waiting for my render to complete, I decided to change Maya’s Linux fonts to something less eye-bleed inducing. Change all occurrences of “Arial” in the MayaStrings file to “DejaVu Sans Book” and you’ll have an interface that is a lot easier on the eyes. Tested with CentOS 6.2. Read more here on this font hack tip or buy my 101 Autodesk Maya Tips.
Haven’t been posting much lately because I was in NYC for an Adobe thing and then finished my Photoshop CS6 review, which should be up on Ars Technica next week. In the meantime, I’ve been testing a monstrous HP Z820 E5 Xeon workstation for a review I’m doing for Ars. I’ve got it running CentOS 6.2 and, while it’s not what I’d call easy to set up (EXR images from Maya are broken for some reason and I can’t drag to another screen with Maya), it’s noticeably faster for OpenGL with the Quadro 4000 than it is in OS X (and even Windows 7). I’ll be covering all that in my review but in the meantime, here’s a copy of my Open Images MEL script that’s updated for Gnome support. Run “openImagesFolder” from the MEL command line and it will open the currently-active project’s image folder in the desktop on all OSes. Handy to save digging around to check renders.
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.
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.
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.
Update: here’s the post with links to the scripts and Automator service
21 notes | Permalink
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.
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
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
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:
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.
4 notes | Permalink
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