TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua
标题:
[SAI]024_nurarihyonmako2ED
[打印本页]
作者:
saiyaku
时间:
2011-10-22 18:48:30
标题:
[SAI]024_nurarihyonmako2ED
預覽:
http://pan.baidu.com/s/1hqqY9CC#dir/path=%2FSaiyakuFX_Preview
from tcaxPy import *
def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):
ASS_BUF = []
TCS_BUF = []
C = ["2509FF","B86700","BE43B7","6DB031","9F67EA","00697C","0095F4"]
BLUR = blur(1.8)
xt = 15
if _j == 0:
global COLOR
global FX
global TXT
global KT
COLOR =[]
FX = []
TXT =[]
KT =[]
for i in range(_n):
COLOR.append(C[randint(0,6)])
FX.append(randint(0,7))
TXT.append(GetData()[val_Text][_i][i])
for j in range(1,_n):
if TXT[j][0] == " ":
COLOR[j] = COLOR[j-1]
elif COLOR[j]==COLOR[j-1]:
temp1 = ["2509FF","B86700","BE43B7","6DB031","9F67EA","00697C","0095F4"]
temp1.remove(COLOR[j])
COLOR[j]=temp1[randint(0,5)]
if TXT[j][0] == " ":
FX[j]=FX[j-1]
elif FX[j]==FX[j-1]:
temp2 = [0,1,2,3,4,5,6,7]
temp2.remove(FX[j])
FX[j]=temp2[randint(0,6)]
KT.append(_KT)
if _i == 0:
global POS
if _i == 0 and _TXT[0]=="W":
FX[_j] = 9
if _i == 0 and _TXT[0]=="K":
FX[_j] = 9
if _i == 1 and _TXT[0]=="T":
FX[_j] = 9
if _i == 1 and _TXT[0]=="U":
FX[_j] = 9
if _i == 2 and _TXT[0]=="W":
FX[_j] = 9
if _i == 4 and _TXT[0]=="Y":
FX[_j] = 9
if _i == 4 and _TXT[0]=="S":
FX[_j] = 9
if _i == 5 and _TXT[0]=="L":
FX[_j] = 9
if _i == 5 and _TXT[0]=="U":
FX[_j] = 9
if _i == 6 and _TXT[0]=="S":
FX[_j] = 9
if _i == 6 and _TXT[0]=="T":
FX[_j] = 9
if _i ==0 and _TXT[0] == "い" :
FX[_j] = 8
if _i ==1 and _TXT[0] == "瞳":
FX[_j] = 10
if _i ==3 and _TXT[0] == "D":
FX[_j] = 8
if _i ==4 and _TXT[0] == "た":
FX[_j] = 8
if _i ==5 and _TXT[0] == "は" :
FX[_j] = 8
if _i == 0 or _i == 1 or _i == 3 or _i == 4 or _i == 5:
T = KT[-1]
else:
T = -_n*3
if _i ==0 and _j == 0 :
POS = [_X,_Y]
if _i ==1 and _j == 0 :
POS = [_X,_Y]
if _i ==3 and _j == 0 :
POS = [_X,_Y]
if _i ==4 and _j == 0 :
POS = [_X,_Y]
if _i ==5 and _j == 0 :
POS = [_X,_Y]
if _i<4:
COLOR[_j] = "2509FF"
elif _i>3 and _i<8:
COLOR[_j] = "BE43B7"
elif _i>7 and _i<11:
COLOR[_j] = "6DB031"
elif _i == 17:
if _TXT[0]=="O":
COLOR[_j] = "0095F4"
elif _TXT[0]=="S":
COLOR[_j] = "9F67EA"
if FX[_j] == 0:
ass_main(ASS_BUF, SubL(_BT+_SK-15, _BT+_SK+15,100), fad(50,0)+ mov(_X-10,_Y-10,_X, _Y) + BLUR + bord(1.5)+color1("FFFFFF") +color3(COLOR[_j]), _TXT)
elif FX[_j] == 1:
ass_main(ASS_BUF, SubL(_BT+_SK-15, _BT+_SK+15,100), fad(50,0)+ mov(_X+10,_Y+10,_X, _Y) +BLUR+ bord(1.5)+color1("FFFFFF") +color3(COLOR[_j]), _TXT)
elif FX[_j] == 2:
ass_main(ASS_BUF, SubL(_BT+_SK-15, _BT+_SK+15,100), fad(50,0)+ mov(_X-10,_Y+10,_X, _Y) +BLUR+ bord(1.5)+color1("FFFFFF") +color3(COLOR[_j]), _TXT)
elif FX[_j] == 3:
ass_main(ASS_BUF, SubL(_BT+_SK-15, _BT+_SK+15,100), fad(50,0)+ mov(_X+10,_Y-10,_X, _Y) +BLUR+ bord(1.5)+color1("FFFFFF") +color3(COLOR[_j]), _TXT)
elif FX[_j] == 4:
ass_main(ASS_BUF, SubL(_BT+_SK-15, _BT+_SK+15,100), fad(50,0)+pos(_X,_Y)+frx(90)+ t(frx(0)) +BLUR+ bord(1.5)+color1("FFFFFF") +color3(COLOR[_j]), _TXT)
elif FX[_j] == 5:
ass_main(ASS_BUF, SubL(_BT+_SK-15, _BT+_SK+15,100), fad(50,0)+pos(_X,_Y)+fry(90)+ t(fry(0)) +BLUR+ bord(1.5)+color1("FFFFFF") +color3(COLOR[_j]), _TXT)
elif FX[_j] == 6:
ass_main(ASS_BUF, SubL(_BT+_SK-15, _BT+_SK+15,100), fad(50,0)+pos(_X,_Y)+fsc(0,0)+ t(fsc(100,100)) +BLUR+ bord(1.5)+color1("FFFFFF") +color3(COLOR[_j]), _TXT)
elif FX[_j] == 7:
ass_main(ASS_BUF, SubL(_BT+_SK-15, _BT+_SK+15,100), fad(250,0)+pos(_X,_Y) +BLUR+ bord(1.5)+color1("FFFFFF") +color3(COLOR[_j]), _TXT)
elif FX[_j] == 8:
ass_main(ASS_BUF, SubL(_BT+_SK-15, _BT+_SK-8,100), fad(100,0)+pos(_X,_Y) +BLUR+ bord(1.5)+color1("FFFFFF") +color3(COLOR[_j]), _TXT)
for i in range(0,40,2):
ass_main(ASS_BUF, SubL(_BT+_SK-8+i, _BT+_SK+_KT+i,100-i), fad(0,300)+alpha(i*3)+ mov(_X,_Y,POS[0], POS[1]) +blur(1)+ bord(1.5)+color1("FFFFFF") +color3(COLOR[_j]), _TXT)
elif FX[_j] == 9:
xt = 25
ass_main(ASS_BUF, SubL(_BT+_SK-15, _BT+_SK+40,1),pos(_X-randint(8,20),_Y-randint(8,20))+an(7)+bord(5)+alpha1(255)+color3(C[randint(0,6)])+fscx(11)+fscy(11)+t1(0,700,bord(2)+fscx(350)+fscy(350)+fad(0,200)), '{\p1}m 10 10 s 10 -10 -10 -10 -10 10 c{\p0}')
ass_main(ASS_BUF, SubL(_BT+_SK-15+randint(0,5),_BT+_SK+40,1),pos(_X+randint(-10,10),_Y+randint(-10,10))+an(7)+bord(5)+alpha1(255)+color3(C[randint(0,6)])+fscx(11)+fscy(11)+t1(0,700,bord(2)+fscx(350)+fscy(350)+fad(0,300)), '{\p1}m 10 10 s 10 -10 -10 -10 -10 10 c{\p0}')
ass_main(ASS_BUF, SubL(_BT+_SK-15+randint(3,5),_BT+_SK+40,1),pos(_X+randint(8,20),_Y+randint(8,20))+an(7)+bord(5)+alpha1(255)+color3(C[randint(0,6)])+fscx(11)+fscy(11)+t1(0,700,bord(2)+fscx(350)+fscy(350)+fad(0,200)), '{\p1}m 10 10 s 10 -10 -10 -10 -10 10 c{\p0}')
ass_main(ASS_BUF, SubL(_BT+_SK-15, _BT+_SK+xt,100), fad(50,0)+pos(_X,_Y)+fsc(0,0)+ t1(0,150,fsc(130,130))+t1(250,500,fsc(100,100)) +blur(1)+ bord(1.5)+color1("FFFFFF") +color3(COLOR[_j]), _TXT)
elif FX[_j] == 10:
ass_main(ASS_BUF, SubL(_BT+_SK-15, _BT+_SK+50,100), fad(50,0)+pos(_X,_Y)+fry(90)+ t1(0,300,fry(0)) +BLUR+ bord(1.5)+color1("FFFFFF") +color3(COLOR[_j]), _TXT)
for i in range(0,40,2):
ass_main(ASS_BUF, SubL(_BT+_SK+50+i, _BT+_SK+_KT+i,100-i), fad(0,300)+alpha(i*3)+ mov(_X,_Y,POS[0], POS[1]) +BLUR+ bord(1.5)+color1("FFFFFF") +color3(COLOR[_j]), _TXT)
ass_main(ASS_BUF, SubL(_BT+_SK+xt,_ET-_j*(T)/_n ,20), fad(0,100)+ pos(_X, _Y) +BLUR+ bord(1.5)+color1("FFFFFF") +color3(COLOR[_j]), _TXT)
if _i>10:
for i in range(int(_BT+_SK-30),int(_ET-_j*(T)/_n),30):
for j in range (int(_A/30)):
X = [_X+randint(int(-_A/2),int(_A/2)),_Y+randint(-20,20)]
R = RandCir2(_X, _Y, 25, 27)
D = sqrt((X[0]-R[0])**2+(X[1]-R[1])**2)
CO = C[randint(0,6)]
F =randint(60,110)
FS = fsc(F,F)
angel =randint(-360,360)
for k in range(0,130,50):
ass_main(ASS_BUF, SubL( i+k, i+k + 50,1),fad(120,120)+ mov(X[0]+(X[0]-R[0])/130*k,X[1]+(X[1]-R[1])/130*k,X[0]+(X[0]-R[0])/130*(k+50),X[1]+(X[1]-R[1])/130*(k+50))+color1('FFFFFF')+color3(CO)+alpha(20)+bord(1.2)+blur(2.3)+frz(angel)+FS, '{\\p3}m 20 0 b 20 10 30 20 40 20 b 30 20 20 30 20 40 b 20 30 10 20 0 20 b 10 20 20 10 20 0')
return (ASS_BUF, TCS_BUF)
复制代码
作者:
忘却の小伊
时间:
2012-3-4 14:00:18
这是怎么回事??
作者:
saiyaku
时间:
2012-3-4 16:33:44
忘却の小伊 发表于 2012-3-4 14:00
这是怎么回事??
裏面單獨判斷的東西比較多 不是原K 估計跑不起來
作者:
Seekladoom
时间:
2022-1-13 00:35:36
本帖最后由 Seekladoom 于 2022-1-13 00:43 编辑
看了半天终于看明白怎么回事了,怪不得写了这么多行。。。
目前的TCAX本身只支持syl、word、normal三种文本模式。当TCAX碰到歌词中有英文单词且需要将每个单词拆成一个个单独的字母并添加绘图代码或者其它效果,且同时还要确保每个字母的时间都跟其所在的单词对应的K值时间一样。
这个时候TCAX本身的syl模式的问题(syl只能做到根据K值均分时间给英文单词的每个字母,并不能把整个单词的K值赋给组成这个单词的每个字母)就暴露出来了。。。_(:з」∠)_
为了解决这个问题,才有了sai大写的这段代码:
KT.append(_KT)
if _i == 0:
global POS
if _i == 0 and _TXT[0]=="W":
FX[_j] = 9
if _i == 0 and _TXT[0]=="K":
FX[_j] = 9
if _i == 1 and _TXT[0]=="T":
FX[_j] = 9
if _i == 1 and _TXT[0]=="U":
FX[_j] = 9
if _i == 2 and _TXT[0]=="W":
FX[_j] = 9
if _i == 4 and _TXT[0]=="Y":
FX[_j] = 9
if _i == 4 and _TXT[0]=="S":
FX[_j] = 9
if _i == 5 and _TXT[0]=="L":
FX[_j] = 9
if _i == 5 and _TXT[0]=="U":
FX[_j] = 9
if _i == 6 and _TXT[0]=="S":
FX[_j] = 9
if _i == 6 and _TXT[0]=="T":
FX[_j] = 9
复制代码
而在Aegisub上的解决方案是,通过char修饰语实现这个效果,TCAX刚好缺乏这块的相应功能模块。。。_(:з」∠)_
作者:
Seekladoom
时间:
2022-1-13 00:48:36
本帖最后由 Seekladoom 于 2022-1-13 00:54 编辑
在线预览:
[SAI]024_滑头鬼之孙2ED
【第1段】
彩色涟漪+随机移动+文字旋转+向左移动的文字残影
【第2段(Some Time这局开始)】
彩色涟漪+随机移动+文字旋转
【第3段】
随机移动+文字旋转
【第4段】
随机移动+文字旋转+彩色星星
作者:
Seekladoom
时间:
2022-1-13 23:11:51
滑头鬼之孙 第2季 ED特效 部分简化拆分.rar
(16.11 KB, 下载次数: 2408)
2022-1-13 23:11:46 上传
下载次数: 2408
附件:
滑头鬼之孙 第2季 ED特效 部分简化拆分.rar
(2022-1-13 23:11:46, 16.11 KB) / 下载次数 2408
http://tcax.org/forum.php?mod=attachment&aid=Mjg0OHw0NGQyZWQ3ZHwxNzMyMjI1MDMyfDB8MA%3D%3D
欢迎光临 TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua (http://tcax.org/)
Powered by Discuz! X2