TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua
标题:
[OTo]006 LoveLive!OP
[打印本页]
作者:
忘却の小伊
时间:
2014-7-15 23:16:14
标题:
[OTo]006 LoveLive!OP
from tcaxPy import *
def tcaxPy_Init():
global _FD # frame duration, in millisecond
_FD = 1000 / GetVal(val_FXFPS)
time_gap = 1 # you can change this value to 0, or 2 or any other number
time_fac = 1 # you can change this value to 0, or 2 or any other number
_BL = blur(4)
def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):
ASS_BUF = []
CL=[ "26B1FD", "CECECE","C8E787","6883FF","FCD8AF","A9E096","AF7BFF","FA6CA7","FC8769","F596EE" ]
if _i == 4 or _i == 6 or _i == 8 or _i == 10 :
#################进入方式#################
duration = 10 * _FD
in_ts = _BT + _j * time_fac * _FD / 10 - time_gap * _FD / 10 - duration / 10
in_te = _BT + _j * time_fac * _FD / 10 - time_gap * _FD / 10
in_EFT =an(3)+ color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+pos(_X+1050, _Y) + fsc(0,0) + t(fsc(100,100)) + fad(duration, 0) + _BL
ass_main(ASS_BUF, SubL(in_ts, in_te), in_EFT, _TXT)
# ed_te=_ET - _j * time_fac * _FD / 10 + time_gap * _FD / 10
#################退场方式#################
out_ts = _ET - (_n - _j - 1) * time_fac * _FD / 10 + time_gap * _FD / 10
out_te = _ET - (_n - _j - 1) * time_fac * _FD / 10 + time_gap * _FD / 10 + duration / 10
out_EFT = pos(_X+1050, _Y) + fad(0, duration) +an(3)+ color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+_BL+t(blur(10))
ass_main(ASS_BUF, SubL(out_ts, out_te), out_EFT, _TXT)
#################附加效果#################
main_ts= _BT+_SK+_KT*2/3
main_te = out_ts
count = int(main_te - main_ts)
step = int(_FD / 5)
for i in range(0, count, step):
main_EFT =an(3)+ pos(_X+1050, _Y) +alpha1(255)+color3(CL[randint(0,9)])+ color4(CL[randint(0,9)])
ass_main(ASS_BUF, SubL(main_ts + i, main_ts + i + step, 5), main_EFT + blur(8), _TXT)
if main_ts + i - step < main_te: # maybe we need to add the last frame
ass_main(ASS_BUF, SubL(main_ts + i - step, main_te, 5), main_EFT+_BL, _TXT)
#################表现效果#################
ass_main(ASS_BUF, SubL(in_te,_BT+_SK,40),an(3)+color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+_BL+pos(_X+1050,_Y),_TXT)
# ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,40),an(3) +alpha1(255)+alpha3(255)+alpha4(255) +pos(_X+1050,_Y),_TXT)
ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT/2,40),an(3) +pos(_X+1050,_Y)+t(fsc(115,115))+color3(CL[randint(0,9)]),_TXT)
ass_main(ASS_BUF, SubL(_BT+_SK+_KT/2,_BT+_SK+_KT,40),an(3) +pos(_X+1050,_Y)+fsc(115,115)+t(fsc(100,100))+color3(CL[randint(0,9)]),_TXT)
ass_main(ASS_BUF, SubL(_BT+_SK+_KT,out_ts,40),an(3)+alpha3(255)+alpha4(255)+pos(_X+1050,_Y),_TXT)
elif _i == 12 :
#################进入方式#################
duration = 10 * _FD
in_ts = _BT + _j * time_fac * _FD / 10 - time_gap * _FD / 10 - duration / 10
in_te = _BT + _j * time_fac * _FD / 10 - time_gap * _FD / 10
in_EFT =an(1)+ color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+pos(_X+860, _Y) + fsc(0,0) + t(fsc(100,100)) + fad(duration, 0) + _BL
ass_main(ASS_BUF, SubL(in_ts, in_te), in_EFT, _TXT)
# ed_te=_ET - _j * time_fac * _FD / 10 + time_gap * _FD / 10
#################退场方式#################
out_ts = _ET - (_n - _j - 1) * time_fac * _FD / 10 + time_gap * _FD / 10
out_te = _ET - (_n - _j - 1) * time_fac * _FD / 10 + time_gap * _FD / 10 + duration / 10
out_EFT = pos(_X+860, _Y) + fad(0, duration) +an(1)+ color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+_BL+t(blur(10))
ass_main(ASS_BUF, SubL(out_ts, out_te), out_EFT, _TXT)
#################附加效果#################
main_ts= _BT+_SK+_KT*2/3
main_te = out_ts
count = int(main_te - main_ts)
step = int(_FD / 5)
for i in range(0, count, step):
main_EFT =an(1)+ pos(_X+860, _Y) +alpha1(255)+color3(CL[randint(0,9)])+ color4(CL[randint(0,9)])
ass_main(ASS_BUF, SubL(main_ts + i, main_ts + i + step, 5), main_EFT + blur(8), _TXT)
if main_ts + i - step < main_te: # maybe we need to add the last frame
ass_main(ASS_BUF, SubL(main_ts + i - step, main_te, 5), main_EFT+_BL, _TXT)
#################表现效果#################
ass_main(ASS_BUF, SubL(in_te,_BT+_SK,40),an(1)+color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+_BL+pos(_X+860,_Y),_TXT)
ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT/2,40),an(1) +pos(_X+860,_Y)+t(fsc(115,115))+color3(CL[randint(0,9)]),_TXT)
ass_main(ASS_BUF, SubL(_BT+_SK+_KT/2,_BT+_SK+_KT,40),an(1) +pos(_X+860,_Y)+fsc(115,115)+t(fsc(100,100))+color3(CL[randint(0,9)]),_TXT)
ass_main(ASS_BUF, SubL(_BT+_SK+_KT,out_ts,40),an(1)+alpha3(255)+alpha4(255)+pos(_X+860,_Y),_TXT)
else :
#################进入方式#################
duration = 15 * _FD
in_ts = _BT + _j * time_fac * _FD / 10 - time_gap * _FD / 10 - duration / 10
in_te = _BT + _j * time_fac * _FD / 10 - time_gap * _FD / 10
in_EFT =an(3)+ color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+pos(_X, _Y) + fsc(0,0) + t(fsc(100,100)) + fad(duration, 0) + _BL
ass_main(ASS_BUF, SubL(in_ts, in_te), in_EFT, _TXT)
# ed_te=_ET - _j * time_fac * _FD / 10 + time_gap * _FD / 10
#################退场方式#################
out_ts = _ET - (_n - _j - 1) * time_fac * _FD / 10 + time_gap * _FD / 10
out_te = _ET - (_n - _j - 1) * time_fac * _FD / 10 + time_gap * _FD / 10 + duration / 10
out_EFT = pos(_X, _Y) + fad(0, duration) +an(3)+ color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+_BL+t(blur(10))
ass_main(ASS_BUF, SubL(out_ts, out_te), out_EFT, _TXT)
#################附加效果#################
main_ts= _BT+_SK+_KT*2/3
main_te = out_ts
count = int(main_te - main_ts)
step = int(_FD / 5)
for i in range(0, count, step):
main_EFT =an(3)+ pos(_X, _Y) +alpha1(255)+color3(CL[randint(0,9)])+ color4(CL[randint(0,9)])
ass_main(ASS_BUF, SubL(main_ts + i, main_ts + i + step, 5), main_EFT + blur(8), _TXT)
if main_ts + i - step < main_te: # maybe we need to add the last frame
ass_main(ASS_BUF, SubL(main_ts + i - step, main_te, 5), main_EFT+_BL, _TXT)
#################表现效果#################
ass_main(ASS_BUF, SubL(in_te,_BT+_SK,40),an(3)+color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+_BL+pos(_X,_Y),_TXT)
# ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,40),an(3) +alpha1(255)+alpha3(255)+alpha4(255) +pos(_X,_Y),_TXT)
ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT/2,40),an(3) +pos(_X,_Y)+t(fsc(115,115))+color3(CL[randint(0,9)]),_TXT)
ass_main(ASS_BUF, SubL(_BT+_SK+_KT/2,_BT+_SK+_KT,40),an(3) +pos(_X,_Y)+fsc(115,115)+t(fsc(100,100))+color3(CL[randint(0,9)]),_TXT)
ass_main(ASS_BUF, SubL(_BT+_SK+_KT,out_ts,40),an(3)+alpha3(255)+alpha4(255)+pos(_X,_Y),_TXT)
return (ASS_BUF,None)
复制代码
http://pan.baidu.com/s/1ntr3DBN
作者:
hezochu
时间:
2015-9-1 11:44:17
好看
作者:
ws848193120
时间:
2015-10-31 17:30:52
好漂亮,有木有ass特效字幕分享?
作者:
iear07
时间:
2015-12-10 22:32:42
这个OP做的好漂亮,学习一下
作者:
15757905197
时间:
2016-8-11 20:02:12
用了之后每一行有一个字后面都会多一个空格
不知道自己哪里弄错了
作者:
ABC不是菜
时间:
2016-9-11 18:57:36
漂亮
欢迎光临 TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua (http://tcax.org/)
Powered by Discuz! X2