TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua
标题:
[kk]08_Hayate-ed
[打印本页]
作者:
kk123456
时间:
2012-10-26 23:06:52
标题:
[kk]08_Hayate-ed
本帖最后由 kk123456 于 2012-10-27 07:29 编辑
嘛,就是个简单的东西,堆了些随机clip
from tcaxPy import *
def Randmask(n, IMG_WD, IMG_HT,X,Y): # 随机mask
STR_RAND_IMG = 'm ' + str(X+randint(-25, 25)) + ' ' + str(Y+randint(-20, 15)) + ' b '
for i in range(4 * n):
if i % 2 == 0:
STR_RAND_IMG += str(X+randint(-1*IMG_WD, IMG_WD)) + ' '
else:
STR_RAND_IMG += str(Y+randint(-1*IMG_HT, IMG_HT)) + ' '
return STR_RAND_IMG + 'c'
def tcaxPy_Init():
global _FontFileName
global _FaceID
global _Fs
global _Height
global Font
_FontFileName = GetVal(val_FontFileName)
_FaceID = GetVal(val_FaceID)
_Fs = GetVal(val_FontSize)
_Height = GetVal(val_TextHeight)
Font = InitFont(_FontFileName, _FaceID, _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), 0xFFFFFF, 0, 0)
def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _x, _y, _a, _txt):
ASS_BUF = []
jg = randint(2,6)
if _j == 0 :
dx = _x - int(_a / 2 + 0.5)
dy = _y - int(_Fs / 2 + 0.5)
_TextLength = GetVal(val_TextLength)
for k in range (randint(int(0.5*_n),int(1.3*_n))):
num = 20
xs = dx + randint(0,_TextLength[_i])
ys = dy + randint(-10, 0)
xe = xs + randint(-10,10)
ye = dy + _Fs + randint(5,10)
points = Bezier1(num, xs, ys, xe, ye)
kt = _BT+randint(0,_ET-_BT-15)
for i in range (20):
EFT = pos(points[i][0], points[i][1]) + alpha1(HexToDec('AA')) + alpha3(HexToDec('AA')) + color1('FFFFFF') + bord(3) + blur(4) + t(0, 100,blur(3)) + fad(0, 200)
EFT2 = pos(points[i][0], points[i][1]) +alpha1(HexToDec('AA')) + alpha3(HexToDec('00')) + color1('FFFFFF') + color3('FFFFFF') + bord(1) + blur(3) + t(0, 100, blur(1) + alpha3(HexToDec('44'))) + fad(0, 200)
ass_main(ASS_BUF, SubL(kt+i,kt+i+randint(25,45), 2), EFT2, PixPt())
ass_main(ASS_BUF, SubL(kt+i,kt+i+randint(25,45), 2), EFT+color3('F5F274'), PixPt())
for j in range (3):
ass_main(ASS_BUF,SubL(kt+20+j*13,kt+110+j*13),an(7)+pos(xe,ye)+frx(78)+alpha1(255)+alpha3(82)+be(1)+color3("FFFFFF")+bord(2)+fscx(0)+fscy(0)+t(fscx(100)+fscy(100)+bord(6))+fad(0,1000),"{\p2}m 59 0 b 59 -79 -59 -79 -59 0 -59 79 59 79 59 0{\p0}")
for i in range (_BT+_SK-5,_BT+_SK+_KT,jg):
tx = Randmask(randint(0,3),randint(30,60),randint(20,40), _x, _y)
mask = tx
cl = ("1","2","3","4","5","6","7","8","9","0","A","B","C","D","E","F")
cl1=cl[randint(0,15)]
ass_main(ASS_BUF, SubL(i, i+jg+5,10),pos(_x,_y)+bord(0)+blur(randint(1,6))+color1(cl[randint(0,15)]+cl[randint(0,15)]+cl[randint(0,15)]+cl[randint(0,15)]+cl[randint(0,15)]+cl[randint(0,15)])+clip(mask)+fs(randint(30,46)), _txt)
for i in range (_BT+_SK-5,_BT+_SK+_KT,jg):
tx = Randmask(randint(1,3),randint(30,60),randint(20,40), _x, _y)
mask = tx
cl = ("1","2","3","4","5","6","7","8","9","0","A","B","C","D","E","F")
cl1=cl[randint(0,15)]
ass_main(ASS_BUF, SubL(i, i+jg+5,10),pos(_x,_y)+bord(0)+blur(randint(2,6))+color1(cl[randint(0,15)]+cl[randint(0,15)]+cl[randint(0,15)]+cl[randint(0,15)]+cl[randint(0,15)]+cl[randint(0,15)])+clip(mask)+fs(randint(30,46)), _txt)
ass_main(ASS_BUF, SubL(_BT+_j*7,_ET+_j*7,1),an(5)+pos(_x,_y)+fad(150,150)+bord(2)+blur(2)+t(_SK*10-_j*70,(_SK+_KT)*10+150-_j*70,color3("F5B589")+fs(_Fs+25)+alpha1(250)+be(2))+t((_SK+_KT/2)*10+100-_j*70,(_SK+_KT)*10+50-_j*70,blur(2)+bord(2)+be(1)+color3("FFFFFF")+fs(_Fs)+alpha1(0)), _txt)
return (ASS_BUF, None)
复制代码
作者:
milkyjing
时间:
2012-10-26 23:27:53
顶一个~ 正在下载中
作者:
渣渣疯子
时间:
2012-10-27 00:14:20
支持一下
作者:
jijidata
时间:
2012-10-27 00:17:21
顶一个
作者:
兜兜里没糖
时间:
2012-10-27 01:53:40
顶起
作者:
靠不住
时间:
2012-11-14 00:03:54
好好学习,天天向上
欢迎光临 TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua (http://tcax.org/)
Powered by Discuz! X2