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

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

[完整特效] [jiji]001_DEVIL SURVIVOR 2 _OP [复制链接]

Rank: 5Rank: 5

跳转到指定楼层
楼主
发表于 2013-11-15 06:22:48 |显示全部楼层 |倒序浏览
本帖最后由 jijidata 于 2013-11-22 00:45 编辑
  1. from tcaxPy import *
  2. from s import *
  3. def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):

  4.     ASS_BUF = []                # 用于保存ASS特效

  5.             ########文字效果########
  6.     ass_main(ASS_BUF,SubL(_BT-20+_j*3,_BT+_SK,1),an(5)+pos(_X,_Y)+fs(1)+t(0,250,fs(38)) ,_TXT)#入场效果
  7.     ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT,1),an(5)+pos(_X,_Y)+t(_KT,+_KT*2,rnd(20))+t(_KT*2,_KT*4,rnd(0))+t(_KT*4,_KT*6,rnd(10))+t(_KT*6,_KT*8,rnd(20))+t(_KT*8,_KT*10,rnd(1)) ,_TXT)#表现方式
  8.     ass_main(ASS_BUF,SubL(_BT+_SK+_KT,_ET-(_n-_j)*1,1),an(5)+pos(_X,_Y) ,_TXT)#表现方式至退场效果之间的衔接
  9.     ass_main(ASS_BUF,SubL(_ET-(_n-_j)*1,_ET-(_n-_j)*1+20,1),an(5)+pos(_X,_Y)+t(fsc(200, 200)+alpha(255)+bord(0)+blur(20)) ,_TXT)#退场效果
  10.             ########附加效果########
  11.     ass_main(ASS_BUF, SubL(_BT+randint(-30,50),_ET+randint(100,150),2),an(5)+fad(300,500)+blur(6)+fsc(randint(5,50),randint(5,50))+moves4(_X+randint(-50,50),_Y+randint(-50,50),_X+randint(-60,60),_Y+randint(-60,60),_X+randint(-60,60),_Y+randint(-60,60),_X+randint(-50,50),_Y+randint(-60,60)),"{\\p1}m 21 16 b 17 16 17 23 21 23 b 25 23 26 16 21 16 m 24 19 l 43 20 l 24 20 m 18 19 l 0 20 l 18 20 m 20 16 l 21 0 l 22 16 m 20 23 l 21 40 l 22 23 ")

  12.     for j in range(0,5):
  13.         ass_main(ASS_BUF,SubL(_ET,_ET+randint(400,800)),an(5)+fad(0,randint(100,700))+blur(6)+fsc(randint(5,50),randint(5,50))+moves4(_X,_Y,_X+randint(-70,100),_Y+randint(-80,-50),_X+randint(-80,50),_Y+randint(-40,80),_X+randint(-70,50),_Y+randint(-60,60)),"{\p1}m 21 16 b 17 16 17 23 21 23 b 25 23 26 16 21 16 m 24 19 l 43 20 l 24 20 m 18 19 l 0 20 l 18 20 m 20 16 l 21 0 l 22 16 m 20 23 l 21 40 l 22 23")


  14.     return (ASS_BUF, None)
复制代码
以前写的Aegisub的template改的,话说template写习惯了改用tcax有些别扭,感觉还是tcax强大~(虽然tcax不是很熟练
预览参见,时间的衔接与原版有些差异,用到了mod的tag,无法执行请看这里


原来的template模板:
http://www.tcax.org/forum.php?mod=viewthread&tid=806&extra=page%3D1

预览




tcc
  1. # tcc file version

  2. < tcc file version = 1.000 >

  3. # mode configuration

  4. < inherit ass header = false >
  5. < k mode = syllable >
  6. < text layout = horizontal >
  7. < tcaxpy init = false >
  8. < tcaxpy user = false >
  9. < tcaxpy fin = false >

  10. # py settings
  11. < py file = jiji-001.py >    < beg line = 1 >    < end line = 0 >





  12. < k-timed ass file = DS2opj _k.ass >
  13. < font file = DFKoin-W4.ttc >    < font face id = 2 >    < font size = 38 >
  14. < fx width = 1280 >    < fx height = 720 >    < fx fps = 23.976 >
  15. < alignment = 2 >
  16. < x offset = 10 >    < y offset = 15 >
  17. < spacing = 0 >    < space scale = 1.000 >



  18. # style settings

  19. < font face name = "" >
  20. < bord = 1 >    < shad = 0 >
  21. < primary color = FFFFFF >    < secondary color = 000000 >    < outline color = A31121 >    < back color = 000000 >
  22. < primary alpha = 0 >    < secondary alpha = 240 >    < outline alpha = 0 >    < back alpha = 240 >

  23. # additional settings

  24. < blur = 0.000 >
复制代码
2

查看全部评分

Rank: 5Rank: 5

沙发
发表于 2013-11-15 22:37:55 |显示全部楼层
草薙海 发表于 2013-11-15 21:45
感謝您分享這個代碼,可是我採用您的代碼出來的星星光條為什麼是豎著的

请使用vsfiltermod插件挂载字幕

Rank: 5Rank: 5

板凳
发表于 2014-3-27 22:47:08 |显示全部楼层
本帖最后由 jijidata 于 2014-3-27 22:47 编辑
圆圆一位 发表于 2014-3-27 22:23
大神,那个。。。from s import *里面的s是下载的时候就自带有的像tcaxPy.py一样的东西么?为什么我找不到 ...


http://www.tcax.org/forum.php?mo ... &extra=page%3D1
看5楼说明
您需要登录后才可以回帖 登录 | 新人加入

GitHub|TCAX 主页

GMT+8, 2024-5-3 21:37

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部
RealH