3D Photography

3D Girls and Guns

Friday, May 9, 2008

3D Automation in Photoshop

It’s been a while since I’ve had much time to work on the show, but I took the day off today did nothing but mess around in Photoshop.  The shoot went without a hitch and the images are looking fabulous even before post processing.  However, I now have some 2×200 pictures that need to be merged into 3D images before I can even begin narrowing them down the best few.

Enter Adobe Photoshop scripting.  I’ve always known Photoshop had a batch system for automating repetitive tasks, but today I discovered the entire application is scriptable via JavaScript.  Reaching back into the days of macroing mining in Ultima Online, I wrote a script to do the following in Photoshop:

  1. For each pair of images, open up the right and left images
  2. Convert both images to grayscale
  3. Convert the left image back to RGB
  4. On the left image, select the blue and green channels
  5. On the right image, select all and copy and paste into the left image
  6. On the left image, select all the color channels and save the image to a .psd

The result was about 60 lines of JavaScript code that I could run and debug using the Adobe ExtendScript Toolkit.  The script ran for a few hours and merged all the images flawlessly.  Doing this manually probably would have taken me a few days and my hands would have fallen off.

The model and I have narrowed our favorite images down to about 20 images.  Now, I’ll register the images and we’ll start post processing.

Here’s a link to the script: 3dmerge.jsx.

posted by asm at 3:45 pm  

Powered by Hamsters - All work © 2009