搜索
您的当前位置:首页正文

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.创建,实现叠加星轨和星轨拖尾效果 XYZ 20120826

2.增加了慢门效果的实现,修改UI,代码优化 XYZ 20120911

**********************************************************************/

/*Script Begin*/ main();

function main() {

vardlg = new Window('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; } }//end with

if ( dlg.show() == 1) {

varopacityMax = parseInt(dlg.msgPnl.opacityMax.et.text); varopacityMin = parseInt(dlg.msgPnl.opacityMin.et.text); varsortOption = dlg.msgPnl.sort.userOption.value;

var blendmode1 = dlg.msgPnl.blendmode.blendmode1.value; var blendmode2 = dlg.msgPnl.blendmode.blendmode2.value; varlayerSum = app.activeDocument.artLayers.length;

if (layerSum> 100){

alert('抱歉!图层总数超过100,请减少图层数后重新运行'); return; }

if (layerSum<= 2){

alert('图层总数太少,没必要使用脚本...'); return;

}

if ( blendmode1 ){//max(lighten)

if (opacityMax>= 1 &&opacityMax<= 100 &&opacityMin>= 1 &&opacityMin<= 100 ){

if ( opacityMaxalert ('最大值应该大于最小值,请重新运行脚本');

}else {

vareachLayerOpacity = (opacityMax - opacityMin)/(layerSum-1); if ( sortOption ){ //reverse the order of layers

for (varsortIndex = 0;sortIndex }//end of reverse

for ( varlayerIndex = layerSum;layerIndex>0;layerIndex-- ){//set opacity from bottom to top

app.activeDocument.layers[layerIndex-1].opacity = parseInt(opacityMax-(layerSum-layerIndex)*eachLayerOpacity);

app.activeDocument.layers[layerIndex-1].blendMode = BlendMode.LIGHTEN ;//blend mode can be modified to NORMAL/DISSOLVE/DARKEN/MULTIPLY/COLORBURN/LINEARBURN/DARKERCOLOR/LIGHTEN/SCREEN/COLORDODGE/LINEARDODGE/LIGHTERCOLOR/OVERLAY/SOFTLIGHT/HA

RDLIGHT/VIVIDLIGHT/LINEARLIGHT/PINLIGHT/HARDMIX/DIFFERENCE/EXCLUSION/SUBTRACT/DIVIDE/HUE/SATURATION/COLORBLEND/LUMINOSITY }//end of set opacity

app.activeDocument.flatten(); alert('完毕!别忘了存盘哦!'); }//end of else

}else{

alert ('输入的数字不在1-100之间,请重新运行脚本'); }

}else if ( blendmode2 ){//average(normal) while (layerSum != 1){

app.activeDocument.layers[0].opacity = 50;//set top layer opacity to 50%

app.activeDocument.layers[0].merge();//merge down top layer

layerSum = app.activeDocument.artLayers.length;//get current layer sum if (layerSum> 2 ){app.activeDocument.layers[0].move(app.activeDocument.layers[layerSum-1],ElementPlacement.PLACEAFTER);}//move top layer to bottom }//end of while

alert('完毕!别忘了存盘哦!'); }else{ //null }

}//end of if dlg.show }//end of main /*Script End*/

Ps自带的做法:

在PS 里面文件菜单下:脚本——>将文件载入堆栈——>选择你拍的若干张图片后将左下角载入图层后创建智能对象的勾选上后确定——>图层菜单下智能对象——>堆栈模式——>最大值(平均值)。然后你就会看到最终的合成大片!

因篇幅问题不能全部显示,请点此查看更多更全内容

Top