{"id":14,"date":"2008-05-09T15:45:41","date_gmt":"2008-05-09T22:45:41","guid":{"rendered":"http:\/\/3d.syne.net\/?p=14"},"modified":"2017-02-06T13:16:40","modified_gmt":"2017-02-06T20:16:40","slug":"3d-automation-in-photoshop","status":"publish","type":"post","link":"https:\/\/3d.syne.net\/?p=14","title":{"rendered":"3D Automation in Photoshop"},"content":{"rendered":"<p>It&#8217;s been a while since I&#8217;ve had much time to work on the show, but I took the day off today did nothing but mess around in Photoshop.\u00a0 The shoot went without a hitch and the images are looking fabulous even before post processing.\u00a0 However, I now have some 2&#215;200 pictures that need to be merged into 3D images before I can even begin narrowing them down the best few.<\/p>\n<p>Enter Adobe Photoshop scripting.\u00a0 I&#8217;ve always known Photoshop had a batch system for automating repetitive tasks, but today I discovered the entire application is scriptable via JavaScript.\u00a0 Reaching back into the days of macroing mining in <a href=\"http:\/\/en.wikipedia.org\/wiki\/Ultima_Online\" target=\"_blank\">Ultima Online<\/a>, I wrote a script to do the following in Photoshop:<\/p>\n<ol>\n<li>For each pair of images, open up the right and left images<\/li>\n<li>Convert both images to grayscale<\/li>\n<li>Convert the left image back to RGB<\/li>\n<li>On the left image, select the blue and green channels<\/li>\n<li>On the right image, select all and copy and paste into the left image<\/li>\n<li>On the left image, select all the color channels and save the image to a .psd<\/li>\n<\/ol>\n<p>The result was about 60 lines of\u00a0JavaScript code that I could run and debug using the <a href=\"http:\/\/www.adobe.com\/devnet\/bridge\/\" target=\"_blank\">Adobe ExtendScript Toolkit<\/a>.\u00a0 The script ran for a few hours and merged all the images flawlessly.\u00a0 Doing this manually probably would have taken me a few days and my hands would have fallen off.<\/p>\n<p>The model and I have narrowed our favorite images down to about 20 images.\u00a0 Now, I&#8217;ll register the images and we&#8217;ll start post processing.<\/p>\n<p>Here&#8217;s a link to the script: <a href=\"https:\/\/3d.syne.net\/wp-content\/uploads\/3dmerge.jsx\">3dmerge.jsx<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s been a while since I&#8217;ve had much time to work on the show, but I took the day off today did nothing but mess around in Photoshop.\u00a0 The shoot went without a hitch and the images are looking fabulous even before post processing.\u00a0 However, I now have some 2&#215;200 pictures that need to be [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-14","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/3d.syne.net\/index.php?rest_route=\/wp\/v2\/posts\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/3d.syne.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/3d.syne.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/3d.syne.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/3d.syne.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=14"}],"version-history":[{"count":1,"href":"https:\/\/3d.syne.net\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions"}],"predecessor-version":[{"id":99,"href":"https:\/\/3d.syne.net\/index.php?rest_route=\/wp\/v2\/posts\/14\/revisions\/99"}],"wp:attachment":[{"href":"https:\/\/3d.syne.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/3d.syne.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/3d.syne.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}