TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua

 找回密码
 新人加入
查看: 6855|回复: 5
打印 上一主题 下一主题

[完整特效] [OTo]006 LoveLive!OP [复制链接]

Rank: 5Rank: 5

跳转到指定楼层
楼主
发表于 2014-7-15 23:16:14 |只看该作者 |倒序浏览
  1. from tcaxPy import *

  2. def tcaxPy_Init():
  3.     global _FD                              # frame duration, in millisecond
  4.     _FD = 1000 / GetVal(val_FXFPS)

  5. time_gap = 1    # you can change this value to 0, or 2 or any other number
  6. time_fac = 1    # you can change this value to 0, or 2 or any other number
  7. _BL = blur(4)

  8. def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):

  9.     ASS_BUF = []

  10.     CL=[ "26B1FD", "CECECE","C8E787","6883FF","FCD8AF","A9E096","AF7BFF","FA6CA7","FC8769","F596EE" ]
  11.    
  12.    
  13.     if _i == 4 or _i == 6 or _i == 8 or _i == 10  :

  14. #################进入方式#################
  15.         duration = 10 * _FD
  16.         in_ts = _BT + _j * time_fac * _FD / 10 - time_gap * _FD / 10 - duration / 10
  17.         in_te = _BT + _j * time_fac * _FD / 10 - time_gap * _FD / 10
  18.         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
  19.         ass_main(ASS_BUF, SubL(in_ts, in_te), in_EFT, _TXT)

  20. #    ed_te=_ET - _j * time_fac * _FD / 10 + time_gap * _FD / 10


  21. #################退场方式#################
  22.    
  23.    
  24.         out_ts = _ET - (_n - _j - 1) * time_fac * _FD / 10 + time_gap * _FD / 10
  25.         out_te = _ET - (_n - _j - 1) * time_fac * _FD / 10 + time_gap * _FD / 10 + duration / 10
  26.         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))
  27.         ass_main(ASS_BUF, SubL(out_ts, out_te), out_EFT, _TXT)
  28.    
  29.    
  30. #################附加效果#################
  31.    
  32.         main_ts= _BT+_SK+_KT*2/3
  33.         main_te = out_ts
  34.         count = int(main_te - main_ts)
  35.         step = int(_FD / 5)
  36.         for i in range(0, count, step):
  37.             main_EFT =an(3)+ pos(_X+1050, _Y) +alpha1(255)+color3(CL[randint(0,9)])+ color4(CL[randint(0,9)])
  38.             ass_main(ASS_BUF, SubL(main_ts + i, main_ts + i + step, 5), main_EFT + blur(8), _TXT)
  39.         if main_ts + i - step < main_te:    # maybe we need to add the last frame
  40.             ass_main(ASS_BUF, SubL(main_ts + i - step, main_te, 5), main_EFT+_BL, _TXT)
  41.    
  42.    
  43. #################表现效果#################

  44.         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)

  45. #        ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,40),an(3) +alpha1(255)+alpha3(255)+alpha4(255) +pos(_X+1050,_Y),_TXT)

  46.         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)
  47.         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)


  48.         ass_main(ASS_BUF, SubL(_BT+_SK+_KT,out_ts,40),an(3)+alpha3(255)+alpha4(255)+pos(_X+1050,_Y),_TXT)

  49.    
  50.     elif _i == 12 :

  51. #################进入方式#################
  52.         duration = 10 * _FD
  53.         in_ts = _BT + _j * time_fac * _FD / 10 - time_gap * _FD / 10 - duration / 10
  54.         in_te = _BT + _j * time_fac * _FD / 10 - time_gap * _FD / 10
  55.         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
  56.         ass_main(ASS_BUF, SubL(in_ts, in_te), in_EFT, _TXT)

  57. #    ed_te=_ET - _j * time_fac * _FD / 10 + time_gap * _FD / 10


  58. #################退场方式#################
  59.    
  60.    
  61.         out_ts = _ET - (_n - _j - 1) * time_fac * _FD / 10 + time_gap * _FD / 10
  62.         out_te = _ET - (_n - _j - 1) * time_fac * _FD / 10 + time_gap * _FD / 10 + duration / 10
  63.         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))
  64.         ass_main(ASS_BUF, SubL(out_ts, out_te), out_EFT, _TXT)
  65.    
  66.    
  67. #################附加效果#################
  68.    
  69.         main_ts= _BT+_SK+_KT*2/3
  70.         main_te = out_ts
  71.         count = int(main_te - main_ts)
  72.         step = int(_FD / 5)
  73.         for i in range(0, count, step):
  74.             main_EFT =an(1)+ pos(_X+860, _Y) +alpha1(255)+color3(CL[randint(0,9)])+ color4(CL[randint(0,9)])
  75.             ass_main(ASS_BUF, SubL(main_ts + i, main_ts + i + step, 5), main_EFT + blur(8), _TXT)
  76.         if main_ts + i - step < main_te:    # maybe we need to add the last frame
  77.             ass_main(ASS_BUF, SubL(main_ts + i - step, main_te, 5), main_EFT+_BL, _TXT)
  78.    
  79.    
  80. #################表现效果#################

  81.         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)

  82.         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)
  83.         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)

  84.         ass_main(ASS_BUF, SubL(_BT+_SK+_KT,out_ts,40),an(1)+alpha3(255)+alpha4(255)+pos(_X+860,_Y),_TXT)

  85.    
  86.    
  87.    
  88.    
  89.     else :
  90. #################进入方式#################
  91.         duration = 15 * _FD
  92.         in_ts = _BT + _j * time_fac * _FD / 10 - time_gap * _FD / 10 - duration / 10
  93.         in_te = _BT + _j * time_fac * _FD / 10 - time_gap * _FD / 10
  94.         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
  95.         ass_main(ASS_BUF, SubL(in_ts, in_te), in_EFT, _TXT)

  96. #    ed_te=_ET - _j * time_fac * _FD / 10 + time_gap * _FD / 10


  97. #################退场方式#################
  98.    
  99.    
  100.         out_ts = _ET - (_n - _j - 1) * time_fac * _FD / 10 + time_gap * _FD / 10
  101.         out_te = _ET - (_n - _j - 1) * time_fac * _FD / 10 + time_gap * _FD / 10 + duration / 10
  102.         out_EFT = pos(_X, _Y) + fad(0, duration) +an(3)+ color3(CL[randint(0,9)])+color4(CL[randint(0,9)])+_BL+t(blur(10))
  103.         ass_main(ASS_BUF, SubL(out_ts, out_te), out_EFT, _TXT)
  104.    
  105.    
  106. #################附加效果#################
  107.    
  108.         main_ts= _BT+_SK+_KT*2/3
  109.         main_te = out_ts
  110.         count = int(main_te - main_ts)
  111.         step = int(_FD / 5)
  112.         for i in range(0, count, step):
  113.             main_EFT =an(3)+ pos(_X, _Y) +alpha1(255)+color3(CL[randint(0,9)])+ color4(CL[randint(0,9)])
  114.             ass_main(ASS_BUF, SubL(main_ts + i, main_ts + i + step, 5), main_EFT + blur(8), _TXT)
  115.         if main_ts + i - step < main_te:    # maybe we need to add the last frame
  116.             ass_main(ASS_BUF, SubL(main_ts + i - step, main_te, 5), main_EFT+_BL, _TXT)
  117.    
  118.    
  119. #################表现效果#################

  120.         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)

  121. #        ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,40),an(3) +alpha1(255)+alpha3(255)+alpha4(255) +pos(_X,_Y),_TXT)

  122.         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)
  123.         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)


  124.         ass_main(ASS_BUF, SubL(_BT+_SK+_KT,out_ts,40),an(3)+alpha3(255)+alpha4(255)+pos(_X,_Y),_TXT)


  125.     return (ASS_BUF,None)
复制代码
http://pan.baidu.com/s/1ntr3DBN
1

查看全部评分

Rank: 4

沙发
发表于 2015-9-1 11:44:17 |只看该作者
好看

Rank: 4

板凳
发表于 2015-10-31 17:30:52 |只看该作者
好漂亮,有木有ass特效字幕分享?

Rank: 4

地板
发表于 2015-12-10 22:32:42 |只看该作者
这个OP做的好漂亮,学习一下

Rank: 4

5#
发表于 2016-8-11 20:02:12 |只看该作者
用了之后每一行有一个字后面都会多一个空格不知道自己哪里弄错了

Rank: 4

6#
发表于 2016-9-11 18:57:36 |只看该作者
漂亮
您需要登录后才可以回帖 登录 | 新人加入

GitHub|TCAX 主页

GMT+8, 2024-12-22 14:00

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部
RealH