TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua
标题:
[OTo]008 Love Live! 6th single -「Music S.T.A.R.T!!」
[打印本页]
作者:
忘却の小伊
时间:
2014-7-15 23:38:30
标题:
[OTo]008 Love Live! 6th single -「Music S.T.A.R.T!!」
这个说真的有点失败,部分效果没达到我想要的,看起来会感觉有些奇怪....
就是那个曲线的那个,失败作....虽然连贯的会,但是效果更差...嗯,就只能这样了
见笑了
from tcaxPy import *
def tcaxPy_Init():
global _FD # frame duration, in millisecond
global _Fs
global _FontFileName
global _FaceID
global _Height
global Font
_FD = 1000 / GetVal(val_FXFPS)
_Fs = GetVal(val_FontSize)
_FontFileName = GetVal(val_FontFileName)
_FaceID = GetVal(val_FaceID)
_Height = GetVal(val_TextHeight)
Font = InitFont(_FontFileName, _FaceID, _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), 0xFFFFFF, 0, 0)
def hs(n):
HS= 'm 0 0 l 50 49 100 0 51 50 100 100 50 51 0 100 49 50 0 0 m 45 45 s 55 45 55 55 45 55 c'
PHS = '{\p'+str(n)+'}'+HS+'{\p0}'
return PHS
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 == 26 or _i == 28 or _i == 39 or _i == 41 or _i == 42 or _i == 51 or _i == 54 :
#################进入方式#################
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(2)+color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+move(_X+60,_Y+60,_X, _Y+60) + fsc(0,0) + t(fsc(100,100)) + fad(duration, 0) + _BL
ass_main(ASS_BUF, SubL(in_ts, in_te), in_EFT, _TXT)
#################退场方式#################
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 = an(2)+move(_X, _Y+60,_X-60,_Y+60) + fad(0, duration) +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)
################# 存在方式
ass_main(ASS_BUF, SubL(in_te,_BT+_SK,40),an(2)+color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+_BL+pos(_X,_Y+60),_TXT)
ass_main(ASS_BUF, SubL(_BT+_SK+_KT,out_ts,40),an(2)+color3(CL[(_j+1)%10])+color4(CL[(_j+1)%10])+_BL+pos(_X,_Y+60),_TXT)
################# 附加效果 一直闪的小星星 #################
###### 小星星1
main_ts= _BT+_SK
main_te = out_ts
count = int(main_te - main_ts)
step = int(_FD+_KT )
for i in range(0, count, step):
main_EFT =pos(_X+randint(-30,30), _Y+60+randint(-45,0)) +color3(CL[randint(0,9)])+ color4(CL[randint(0,9)])+bord(2)+shad(2)+ blur(4)+be(20)
ass_main(ASS_BUF, SubL(main_ts + i, main_ts + i + step/2), main_EFT +fsc(20,20)+t(fsc(100,100))+fad(200+_KT,0), hs(3))
ass_main(ASS_BUF, SubL(main_ts + i+ step/2, main_ts + i + step), main_EFT + fsc(100,100)+t(fsc(20,20))+fad(0,200+_KT), hs(3))
###### 小星星2
for i in range(0, count, step):
main_EFT =pos(_X+randint(-30,30), _Y+60+randint(-45,0)) +color3(CL[randint(0,9)])+ color4(CL[randint(0,9)])+bord(2)+shad(2)+ blur(4)+be(20)
ass_main(ASS_BUF, SubL(main_ts + i, main_ts + i + step/2), main_EFT +fsc(20,20)+t(fsc(100,100))+fad(200+_KT,0), hs(3))
ass_main(ASS_BUF, SubL(main_ts + i+ step/2, main_ts + i + step), main_EFT + fsc(100,100)+t(fsc(20,20))+fad(0,200+_KT), hs(3))
#################表现效果 震动+闪光 #################
step = int(50/(_KT+1)+1)
for J in range(_BT+_SK,_BT+_SK+_KT+1,step):
Ts = J
Ts2 = Ts + step
ass_main(ASS_BUF,SubL(Ts,Ts2),an(2)+pos(_X+randint(-3,3),_Y+60+randint(-3,3))+ color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+_BL,_TXT)
#################
elif _i== 38 or _i== 40 or _i== 43 :
#################进入方式#################
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(2)+color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+move(_X+60,_Y,_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)
#################退场方式#################
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 = an(2)+move(_X, _Y,_X-60,_Y) + fad(0, duration) +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)
################# 存在方式
ass_main(ASS_BUF, SubL(in_te,_BT+_SK,40),an(2)+color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+_BL+pos(_X,_Y),_TXT)
######
ass_main(ASS_BUF, SubL(_BT+_SK+_KT,out_ts,40),an(2)+color3(CL[(_j+1)%10])+color4(CL[(_j+1)%10])+_BL+pos(_X,_Y),_TXT)
################# 附加效果 一直闪的小星星 #################
###### 小星星1
main_ts= _BT+_SK
main_te = out_ts
count = int(main_te - main_ts)
step = int(_FD+_KT )
for i in range(0, count, step):
main_EFT =pos(_X+randint(-30,30), _Y+randint(-45,0)) +color3(CL[randint(0,9)])+ color4(CL[randint(0,9)])+bord(2)+shad(2)+ blur(4)+be(20)
ass_main(ASS_BUF, SubL(main_ts + i, main_ts + i + step/2), main_EFT +fsc(20,20)+t(fsc(100,100))+fad(200+_KT,0), hs(3))
ass_main(ASS_BUF, SubL(main_ts + i+ step/2, main_ts + i + step), main_EFT + fsc(100,100)+t(fsc(20,20))+fad(0,200+_KT), hs(3))
###### 小星星2
for i in range(0, count, step):
main_EFT =pos(_X+randint(-30,30), _Y+randint(-45,0)) +color3(CL[randint(0,9)])+ color4(CL[randint(0,9)])+bord(2)+shad(2)+ blur(4)+be(20)
ass_main(ASS_BUF, SubL(main_ts + i, main_ts + i + step/2), main_EFT +fsc(20,20)+t(fsc(100,100))+fad(200+_KT,0), hs(3))
ass_main(ASS_BUF, SubL(main_ts + i+ step/2, main_ts + i + step), main_EFT + fsc(100,100)+t(fsc(20,20))+fad(0,200+_KT), hs(3))
#################表现效果 震动+闪光 #################
step = int(50/(_KT+1)+1)
for J in range(_BT+_SK,_BT+_SK+_KT+1,step):
Ts = J
Ts2 = Ts + step
ass_main(ASS_BUF,SubL(Ts,Ts2),an(2)+pos(_X+randint(-3,3),_Y+randint(-3,3))+ color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+_BL,_TXT)
#################
elif (_i >7 and _i<12) or (_i >23 and _i<32) :
#################进入方式#################
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(2)+color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+move(_X+60,_Y,_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)
#################退场方式#################
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 = an(2)+move(_X, _Y,_X-60,_Y) + fad(0, duration) +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)
################# 存在方式
ass_main(ASS_BUF, SubL(in_te,_BT+_SK,40),an(2)+color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+_BL+pos(_X,_Y),_TXT)
######
ass_main(ASS_BUF, SubL(_BT+_SK+_KT,out_ts,40),an(2)+color3(CL[(_j+1)%10])+color4(CL[(_j+1)%10])+_BL+pos(_X,_Y),_TXT)
################# 附加效果 一直闪的小星星 #################
###### 小星星1
main_ts= _BT+_SK
main_te = out_ts
count = int(main_te - main_ts)
step = int(_FD+_KT )
for i in range(0, count, step):
main_EFT =pos(_X+randint(-30,30), _Y+randint(-45,0)) +color3(CL[randint(0,9)])+ color4(CL[randint(0,9)])+bord(2)+shad(2)+ blur(4)+be(20)
ass_main(ASS_BUF, SubL(main_ts + i, main_ts + i + step/2), main_EFT +fsc(20,20)+t(fsc(100,100))+fad(200+_KT,0), hs(3))
ass_main(ASS_BUF, SubL(main_ts + i+ step/2, main_ts + i + step), main_EFT + fsc(100,100)+t(fsc(20,20))+fad(0,200+_KT), hs(3))
###### 小星星2
for i in range(0, count, step):
main_EFT =pos(_X+randint(-30,30), _Y+randint(-45,0)) +color3(CL[randint(0,9)])+ color4(CL[randint(0,9)])+bord(2)+shad(2)+ blur(4)+be(20)
ass_main(ASS_BUF, SubL(main_ts + i, main_ts + i + step/2), main_EFT +fsc(20,20)+t(fsc(100,100))+fad(200+_KT,0), hs(3))
ass_main(ASS_BUF, SubL(main_ts + i+ step/2, main_ts + i + step), main_EFT + fsc(100,100)+t(fsc(20,20))+fad(0,200+_KT), hs(3))
#################表现效果 放大 #################
ass_main(ASS_BUF, SubL(in_te,_BT+_SK,40),an(2)+pos(_X,_Y)+color3(CL[_j%10])+shad(0),_TXT)
ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,40),an(2)+pos(_X,_Y)+color3(CL[_j%10])+fsc(80,80)+shad(0)+t(color3(CL[(_j+1)%10])+fsc(100,100)+_BL),_TXT)
ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT),an(2)+pos(_X,_Y)+alpha1(255)+fsc(150,150)+t(fsc(100,100))+color3(CL[_j%10])+color4(CL[_j%10])+t(color3(CL[(_j+1)%10])+color4(CL[(_j+1)%10]))+_BL,_TXT)
ass_main(ASS_BUF, SubL(_BT+_SK+_KT,out_ts,40),an(2)+color3(CL[(_j+1)%10])+color4(CL[(_j+1)%10])+_BL+pos(_X,_Y),_TXT)
#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
elif (_i >11 and _i<18) or (_i >31 and _i<38) or (_i >43 and _i<51):
#################进入方式#################
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(2)+color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+move(_X+60,_Y,_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)
#################退场方式#################
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 = an(2)+move(_X, _Y,_X-60,_Y) + fad(0, duration) +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)
################# 存在方式
ass_main(ASS_BUF, SubL(in_te,_BT+_SK,40),an(2)+color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+_BL+pos(_X,_Y),_TXT)
######
ass_main(ASS_BUF, SubL(_BT+_SK+_KT,out_ts,40),an(2)+color3(CL[(_j+1)%10])+color4(CL[(_j+1)%10])+_BL+pos(_X,_Y),_TXT)
################# 附加效果 一直闪的小星星 #################
###### 小星星1
main_ts= _BT+_SK
main_te = out_ts
count = int(main_te - main_ts)
step = int(_FD+_KT )
for i in range(0, count, step):
main_EFT =pos(_X+randint(-30,30), _Y+randint(-45,0)) +color3(CL[randint(0,9)])+ color4(CL[randint(0,9)])+bord(2)+shad(2)+ blur(4)+be(20)
ass_main(ASS_BUF, SubL(main_ts + i, main_ts + i + step/2), main_EFT +fsc(20,20)+t(fsc(100,100))+fad(200+_KT,0), hs(3))
ass_main(ASS_BUF, SubL(main_ts + i+ step/2, main_ts + i + step), main_EFT + fsc(100,100)+t(fsc(20,20))+fad(0,200+_KT), hs(3))
###### 小星星2
for i in range(0, count, step):
main_EFT =pos(_X+randint(-30,30), _Y+randint(-45,0)) +color3(CL[randint(0,9)])+ color4(CL[randint(0,9)])+bord(2)+shad(2)+ blur(4)+be(20)
ass_main(ASS_BUF, SubL(main_ts + i, main_ts + i + step/2), main_EFT +fsc(20,20)+t(fsc(100,100))+fad(200+_KT,0), hs(3))
ass_main(ASS_BUF, SubL(main_ts + i+ step/2, main_ts + i + step), main_EFT + fsc(100,100)+t(fsc(20,20))+fad(0,200+_KT), hs(3))
#################表现效果 星星 波浪 运动 #################
dx = _X - int((_A + GetVal(val_Spacing)) / 2 + 0.5) # 一个固定操作, 将an5的坐标转换为an7
dy = _Y - int(_Fs + 0.5) # ASS特效默认采用an5坐标, TCAS特效则采用an7坐标
po_ts = _BT + _SK # 效果开始时间
po_te = _BT + _SK+_KT # 效果结束时间
EFT1 = alpha1(100) + alpha3(150) +color3(CL[_j%10])+ color4(CL[_j%10]) +t(color3(CL[(_j+1)%10]))+ t(color4(CL[(_j+1)%10]))+bord(2)+shad(2)+ blur(4)+be(20)
EFT2 = alpha1(100) +color3(CL[_j%10])+ color4(CL[_j%10]) +t(color3(CL[(_j+1)%10]))+ t(color4(CL[(_j+1)%10]))+bord(2)+shad(2)+ blur(4)+be(20)
num = 80 # 曲线上点的个数
##### point #####
xs = dx # 开始点
ys = dy
xc1 = xs + 0.25*_A # 控制点1
yc1 = dy + 1.5*_Fs
xc2 = xs + 0.75*_A # 控制点2
yc2 = dy - 1.5*_Fs
xe = dx + _A # 结束点
ye = dy
points = Bezier3(num, xs, ys, xe, ye, xc1, yc1, xc2, yc2) # 3阶贝塞尔曲线, 控制点的生成是重点以及难点
for i in range(num):
MOVE = move(points[i][0], points[i][1],points[i][0]+randint(-3*_A,0), points[i][1]+randint(0,30)) # 获取曲线上点坐标
EFT = MOVE + EFT1
ass_main(ASS_BUF, SubL(po_ts+i , po_te +i, 50, Pix_Style), EFT, hs(3))
EFT = MOVE + EFT2
ass_main(ASS_BUF, SubL(po_ts+i , po_te +i, 50, Pix_Style), EFT, hs(3))
#################表现效果 拉伸 弹跳 #################
ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+0.4*_KT,40),an(2)+pos(_X,_Y)+t(fscy(115))+color3(CL[_j%10])+color4(CL[_j%10])+_BL,_TXT)
ass_main(ASS_BUF, SubL(_BT+_SK+0.4*_KT,_BT+_SK+0.8*_KT,40),an(2)+pos(_X,_Y)+fscy(115)+t(fscy(90))+color3(CL[_j%10])+color4(CL[_j%10])+t(color3(CL[(_j+1)%10])+color4(CL[(_j+1)%10]))+_BL,_TXT)
ass_main(ASS_BUF, SubL(_BT+_SK+0.8*_KT,_BT+_SK+_KT,40),an(2)+pos(_X,_Y)+fscy(90)+t(fscy(100))+color3(CL[(_j+1)%10])+color4(CL[(_j+1)%10])+_BL,_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(2)+color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+move(_X+60,_Y,_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)
#################退场方式#################
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 = an(2)+move(_X, _Y,_X-60,_Y) + fad(0, duration) +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)
################# 存在方式
ass_main(ASS_BUF, SubL(in_te,_BT+_SK,40),an(2)+color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+_BL+pos(_X,_Y),_TXT)
######
ass_main(ASS_BUF, SubL(_BT+_SK+_KT,out_ts,40),an(2)+color3(CL[(_j+1)%10])+color4(CL[(_j+1)%10])+_BL+pos(_X,_Y),_TXT)
################# 附加效果 一直闪的小星星 #################
###### 小星星1
main_ts= _BT+_SK
main_te = out_ts
count = int(main_te - main_ts)
step = int(_FD+_KT )
for i in range(0, count, step):
main_EFT =pos(_X+randint(-30,30), _Y+randint(-45,0)) +color3(CL[randint(0,9)])+ color4(CL[randint(0,9)])+bord(2)+shad(2)+ blur(4)+be(20)
ass_main(ASS_BUF, SubL(main_ts + i, main_ts + i + step/2), main_EFT +fsc(20,20)+t(fsc(100,100))+fad(200+_KT,0), hs(3))
ass_main(ASS_BUF, SubL(main_ts + i+ step/2, main_ts + i + step), main_EFT + fsc(100,100)+t(fsc(20,20))+fad(0,200+_KT), hs(3))
###### 小星星2
for i in range(0, count, step):
main_EFT =pos(_X+randint(-30,30), _Y+randint(-45,0)) +color3(CL[randint(0,9)])+ color4(CL[randint(0,9)])+bord(2)+shad(2)+ blur(4)+be(20)
ass_main(ASS_BUF, SubL(main_ts + i, main_ts + i + step/2), main_EFT +fsc(20,20)+t(fsc(100,100))+fad(200+_KT,0), hs(3))
ass_main(ASS_BUF, SubL(main_ts + i+ step/2, main_ts + i + step), main_EFT + fsc(100,100)+t(fsc(20,20))+fad(0,200+_KT), hs(3))
#################表现效果 拉伸 弹跳 #################
ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+0.4*_KT,40),an(2)+pos(_X,_Y)+t(fscy(115))+color3(CL[_j%10])+color4(CL[_j%10])+_BL,_TXT)
ass_main(ASS_BUF, SubL(_BT+_SK+0.4*_KT,_BT+_SK+0.8*_KT,40),an(2)+pos(_X,_Y)+fscy(115)+t(fscy(90))+color3(CL[_j%10])+color4(CL[_j%10])+t(color3(CL[(_j+1)%10])+color4(CL[(_j+1)%10]))+_BL,_TXT)
ass_main(ASS_BUF, SubL(_BT+_SK+0.8*_KT,_BT+_SK+_KT,40),an(2)+pos(_X,_Y)+fscy(90)+t(fscy(100))+color3(CL[(_j+1)%10])+color4(CL[(_j+1)%10])+_BL,_TXT)
#################表现效果 画心 #################
dx = _X-int(( 0.2*_A +GetVal(val_Spacing)) / 2 + 0.5)
dy = _Y - int(0.9*_Fs + 0.5)
po_ts = _BT + _SK # 效果开始时间
po_te = _BT + _SK+_KT # 效果结束时间
EFT1 = alpha1(100) + alpha3(150) +color3(CL[_j%10])+ color4(CL[_j%10]) +t(color3(CL[(_j+1)%10]))+ t(color4(CL[(_j+1)%10]))+bord(2)+shad(2)+ blur(4)+be(20)
EFT2 = alpha1(100) +color3(CL[_j%10])+ color4(CL[_j%10]) +t(color3(CL[(_j+1)%10]))+ t(color4(CL[(_j+1)%10]))+bord(2)+shad(2)+ blur(4)+be(20)
num = 30 # 曲线上点的个数
##### point1 #####
xs = dx # 开始点
ys = dy
xc1 = xs - 0.85*_A # 控制点1
yc1 = dy - _Fs
xc2 = xs - 0.85*_A # 控制点2
yc2 = dy + 0.7*_Fs
xe = dx # 结束点
ye = dy+ 0.8*_Fs
points = Bezier3(num, xs, ys, xe, ye, xc1, yc1, xc2, yc2) # 3阶贝塞尔曲线, 控制点的生成是重点以及难点
for i in range(num):
MOVE = move(points[i][0], points[i][1],points[i][0]+randint(-8,8), points[i][1]+randint(0,15)) # 获取曲线上点坐标
EFT = MOVE + EFT1
ass_main(ASS_BUF, SubL(po_ts+i , po_te +i*2, 50, Pix_Style), EFT, hs(4))
EFT = MOVE + EFT2
ass_main(ASS_BUF, SubL(po_ts+i , po_te +i*2, 50, Pix_Style), EFT, hs(4))
##### point2 #####
xs = dx # 开始点
ys = dy
xc1 = xs + 0.85*_A # 控制点1
yc1 = dy - _Fs
xc2 = xs + 0.85*_A # 控制点2
yc2 = dy + 0.7*_Fs
xe = dx # 结束点
ye = dy + 0.8*_Fs
points = Bezier3(num, xs, ys, xe, ye, xc1, yc1, xc2, yc2) # 3阶贝塞尔曲线, 控制点的生成是重点以及难点
for i in range(num):
MOVE = move(points[i][0], points[i][1],points[i][0]+randint(-8,8), points[i][1]+randint(0,15)) # 获取曲线上点坐标
EFT = MOVE + EFT1
ass_main(ASS_BUF, SubL(po_ts+i , po_te +i*3, 50, Pix_Style), EFT, hs(4))
EFT = MOVE + EFT2
ass_main(ASS_BUF, SubL(po_ts+i , po_te +i*3, 50, Pix_Style), EFT, hs(4))
##########################################################################################################################
return (ASS_BUF,None)
复制代码
http://pan.baidu.com/s/1xi8Qw
体积有点大,不是我压的....1080....sorry了
B站在线
http://www.bilibili.com/video/av862109/
作者:
oiuu
时间:
2014-10-31 18:04:46
感谢楼主分享的代码,做的非常漂亮。
作者:
Alex
时间:
2014-10-31 22:13:40
Good 良好 =D
和 感谢楼主分享的代码
作者:
橋在燃燒
时间:
2015-8-31 15:43:16
感谢~!做的很不错了!!
欢迎光临 TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua (http://tcax.org/)
Powered by Discuz! X2