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:
- For each pair of images, open up the right and left images
- Convert both images to grayscale
- Convert the left image back to RGB
- On the left image, select the blue and green channels
- On the right image, select all and copy and paste into the left image
- 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.