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  

3 Comments »

  1. wouldnt mind a download link for that script you did :)

    Comment by kodea — June 20, 2008 @ 4:57 am

  2. Post updated with a link to the script.

    Comment by asm — June 20, 2008 @ 7:32 am

  3. Just a note, Right-click>Save Linked File As… To download the JSX file… Not a big deal, just the link doesn’t go straight to download, it actually views the file.

    Comment by Techknowsall — May 12, 2009 @ 12:14 pm

RSS feed for comments on this post. TrackBack URI

Leave a comment

Powered by Hamsters - All work © 2009