您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 招聘面试 > Ps慢门堆栈叠加脚本—类似多重曝光效果的做法
Ps慢门堆栈叠加脚本—类似多重曝光效果的做法以下为脚本全文(版本:20120911),使用时请选择全部的蓝色字体,另存为StarTails.jsx:/********************************************************************功能描述:本脚本(StarTails.jsx)可以①叠加星轨、②实现星轨拖尾效果、③实现慢快门效果在XP+CS5(32bit)和WIN7+CS6(64bit&extended)上测试通过,能够正常运行本脚本不需要extended版本的Photoshop就可运行,而且运行速度更快使用说明:一.将连拍的多个文件转化为图层,使用Photoshop的文件-脚本-将文件载入堆栈文件数不能(也不建议)超过100,超过的话请拆分并多次运行;文件数也不能是2个或者以下,因为没有这个必要吧?二.将本段脚本存成StarTails.jsx文件,通过Photoshop的文件-脚本-“浏览”打开StarTails.jsx三.出现StarTails的界面后,根据需要选择不同的功能并进行简单的设置1.叠加星轨:选取最大值,保持最小/最大不透明度为100%不用修改,不需要复选进行图层倒置2.叠加星轨并实现星轨的拖尾效果:选取最大值,修改最小/最大不透明度,根据需要复选进行图层倒置3.叠加连拍的图片,实现慢快门效果:选取平均值即可(注:最大值和平均值选项是模拟堆栈模式的最大值和平均值,效果几乎相同,但不完全等同)此脚本Free,使用和传播意味着你已经充分读懂了本脚本的含义,修改和传播请尽量保留注释和履历原创作者:XYZ(半岛雪人)最新版本:20120911修改履历:1.创建,实现叠加星轨和星轨拖尾效果XYZ201208262.增加了慢门效果的实现,修改UI,代码优化XYZ20120911**********************************************************************//*ScriptBegin*/main();functionmain(){vardlg=newWindow('dialog','StarTails');dlg.alignChildren='center';dlg.orientation='column';dlg.msgPnl=dlg.add('group');dlg.msgPnl=dlg.add('panel',undefined,参数设置);dlg.msgPnl.blendmode=dlg.msgPnl.add('group');dlg.msgPnl.opacityMin=dlg.msgPnl.add('group');dlg.msgPnl.opacityMax=dlg.msgPnl.add('group');dlg.msgPnl.sort=dlg.msgPnl.add('group');dlg.btnPnl=dlg.add('group');dlg.btnPnl.okBtn=dlg.btnPnl.add('button',undefined,'确定',{name:'ok'});with(dlg.msgPnl){alignChildren='fill';blendmode.st=blendmode.add('statictext',undefined,'图层混合模式');blendmode.blendmode1=blendmode.add('radiobutton',undefined,'最大值');blendmode.blendmode2=blendmode.add('radiobutton',undefined,'平均值');blendmode.blendmode1.value=true;opacityMin.st=opacityMin.add('statictext',undefined,'最小不透明度(%)');opacityMin.et=opacityMin.add('edittext',undefined,'',{multiline:false});opacityMin.et.preferredSize=[40,20];opacityMin.et.text='100';opacityMax.st=opacityMax.add('statictext',undefined,'最大不透明度(%)');opacityMax.et=opacityMax.add('edittext',undefined,'',{multiline:false});opacityMax.et.preferredSize=[40,20];opacityMax.et.text='100';sort.userOption=sort.add('checkbox',undefined,'进行图层倒置');sort.userOption.value=false;blendmode.blendmode2.onClick=function(){opacityMax.st.visible=false;opacityMax.et.visible=false;opacityMin.st.visible=false;opacityMin.et.visible=false;sort.userOption.visible=false;}blendmode.blendmode1.onClick=function(){opacityMax.st.visible=true;opacityMax.et.visible=true;opacityMin.st.visible=true;opacityMin.et.visible=true;sort.userOption.visible=true;}}//endwithif(dlg.show()==1){varopacityMax=parseInt(dlg.msgPnl.opacityMax.et.text);varopacityMin=parseInt(dlg.msgPnl.opacityMin.et.text);varsortOption=dlg.msgPnl.sort.userOption.value;varblendmode1=dlg.msgPnl.blendmode.blendmode1.value;varblendmode2=dlg.msgPnl.blendmode.blendmode2.value;varlayerSum=app.activeDocument.artLayers.length;if(layerSum100){alert('抱歉!图层总数超过100,请减少图层数后重新运行');return;}if(layerSum=2){alert('图层总数太少,没必要使用脚本...');return;}if(blendmode1){//max(lighten)if(opacityMax=1&&opacityMax=100&&opacityMin=1&&opacityMin=100){if(opacityMaxopacityMin){alert('最大值应该大于最小值,请重新运行脚本');}else{vareachLayerOpacity=(opacityMax-opacityMin)/(layerSum-1);if(sortOption){//reversetheorderoflayersfor(varsortIndex=0;sortIndexlayerSum;sortIndex++){app.activeDocument.layers[0].move(app.activeDocument.layers[layerSum-sortIndex-1],ElementPlacement.PLACEAFTER);}}//endofreversefor(varlayerIndex=layerSum;layerIndex0;layerIndex--){//setopacityfrombottomtotopapp.activeDocument.layers[layerIndex-1].opacity=parseInt(opacityMax-(layerSum-layerIndex)*eachLayerOpacity);app.activeDocument.layers[layerIndex-1].blendMode=BlendMode.LIGHTEN;//blendmodecanbemodifiedtoNORMAL/DISSOLVE/DARKEN/MULTIPLY/COLORBURN/LINEARBURN/DARKERCOLOR/LIGHTEN/SCREEN/COLORDODGE/LINEARDODGE/LIGHTERCOLOR/OVERLAY/SOFTLIGHT/HARDLIGHT/VIVIDLIGHT/LINEARLIGHT/PINLIGHT/HARDMIX/DIFFERENCE/EXCLUSION/SUBTRACT/DIVIDE/HUE/SATURATION/COLORBLEND/LUMINOSITY}//endofsetopacityapp.activeDocument.flatten();alert('完毕!别忘了存盘哦!');}//endofelse}else{alert('输入的数字不在1-100之间,请重新运行脚本');}}elseif(blendmode2){//average(normal)while(layerSum!=1){app.activeDocument.layers[0].opacity=50;//settoplayeropacityto50%app.activeDocument.layers[0].merge();//mergedowntoplayerlayerSum=app.activeDocument.artLayers.length;//getcurrentlayersumif(layerSum2){app.activeDocument.layers[0].move(app.activeDocument.layers[layerSum-1],ElementPlacement.PLACEAFTER);}//movetoplayertobottom}//endofwhilealert('完毕!别忘了存盘哦!');}else{//null}}//endofifdlg.show}//endofmain/*ScriptEnd*/Ps自带的做法:在PS里面文件菜单下:脚本——将文件载入堆栈——选择你拍的若干张图片后将左下角载入图层后创建智能对象的勾选上后确定——图层菜单下智能对象——堆栈模式——最大值(平均值)。然后你就会看到最终的合成大片!
本文标题:Ps慢门堆栈叠加脚本—类似多重曝光效果的做法
链接地址:https://www.777doc.com/doc-2888340 .html