[jiji]002_Uchouten_Kazoku_OP - 代码分享 - TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua - Powered by Discuz!

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

 找回密码
 加入社区
查看: 1980|回复: 3

[完整特效] [jiji]002_Uchouten_Kazoku_OP [复制链接]

Rank: 5Rank: 5

发表于 2013-11-15 23:11:22 |显示全部楼层
本帖最后由 jijidata 于 2013-11-15 23:38 编辑

日文部分
  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-30+_j*3,_BT+_SK,1),an(5)+move(_X+500,_Y,_X,_Y,0,400)+org(_X,_Y)+t(frx(3600))+b(1) ,_TXT)#入场效果
  7.     ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+_KT,1),an(5)+pos(_X,_Y)+jitter(6,2,6,2,6,2)+blur(6)+b(1) ,_TXT)#表现方式
  8.     ass_main(ASS_BUF,SubL(_BT+_SK+_KT,_ET,1),an(5)+pos(_X,_Y)+b(1) ,_TXT)#表现方式至退场效果之间的衔接
  9.     ass_main(ASS_BUF,SubL(_ET,_ET+80-_j*3,1),an(5)+move(_X,_Y,_X-1000,_Y)+org(_X,_Y)+t(frx(360))+b(1) ,_TXT)#退场效果
  10.             ########附加效果########

  11.     for j in range(0,20):
  12.          ass_main(ASS_BUF,SubL(_BT+_SK,_BT+_SK+100,2),an(5)+bord(1)+fad(0,400)+fsc(randint(50,80),randint(50,80))+b(1)+blur(6)+move(_X,_Y,_X+randint(-50,50),_Y+randint(-50,50)),"{\p4}m 20 0 b 20 10 30 20 74 19 b 30 20 20 30 20 79 b 20 30 10 20 -33 20 b 10 20 20 10 20 -39")


  13.     return (ASS_BUF, None)
复制代码
中文部分
  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-10-_j*1,_BT,1),an(5)+blur(6)+move(_X-1000,_Y,_X,_Y,0,400)+org(_X,_Y)+t(frx(3600))+b(1) ,_TXT)#入场效果
  7.     ass_main(ASS_BUF,SubL(_BT,_ET,1),an(5)+pos(_X,_Y)+blur(6)+b(1) ,_TXT)#存在方式
  8.     ass_main(ASS_BUF,SubL(_ET,_ET+50-_j*3,1),an(5)+blur(6)+move(_X,_Y,_X+1000,_Y)+org(_X,_Y)+t(frx(360))+b(1) ,_TXT)#退场效果
  9.             ########附加效果########
  10. #无



  11.     return (ASS_BUF, None)
复制代码
预览:

http://pan.baidu.com/s/1w01tc

嘛~依旧很简单
想要和视频里一样的话请调节tcc里的字体大小和 y offset = 这一参数


另外,我脚本里自定义了字体为粗体(\b1),但是主程序tcaxPy.py中548行是这样写的
  1. def b():
  2.     return '\\b'
复制代码
于是输入b(0)【关闭粗体】或b(1)【开启粗体】均提示错误,这段代码不允许自行开启,只能输出\b这一tag,而\b默认是关闭粗体
因此,修改那一行代码为
  1. def b(a):
  2.     return '\\b{0}'.format(int(a))
复制代码
即可自由开启或关闭粗体
1

查看全部评分

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

发表于 2013-11-19 12:59:02 |显示全部楼层
于是输入b(0)【关闭粗体】或b(1)【开启粗体】均提示错误,这段代码不允许自行开启,只能输出\b这一tag,而\b默认是关闭粗体
因此,修改那一行代码为
原来如此, 这个一直没发现. 写了没用过.

更新到下一个版本中了.

Rank: 5Rank: 5

发表于 2013-11-22 00:44:43 |显示全部楼层
日文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-002-jp.py >    < beg line = 1 >    < end line = 0 >





  12. < k-timed ass file = jiji-02_Uchouten_Kazoku_OP_k.ass >
  13. < font file = msyh.ttf >    < font face id = 1 >    < font size = 42 >
  14. < fx width = 1280 >    < fx height = 720 >    < fx fps = 23.976 >
  15. < alignment = 2 >
  16. < x offset = 10 >    < y offset = 10 >
  17. < spacing = 0 >    < space scale = 1.000 >



  18. # style settings

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

  23. # additional settings

  24. < blur = 0.000 >
复制代码
中文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-002-jp-ch.py >    < beg line = 1 >    < end line = 0 >





  12. < k-timed ass file = jiji-02_Uchouten_Kazoku_OP_ch_k.ass >
  13. < font file = msyh.ttf >    < font face id = 1 >    < font size = 42 >
  14. < fx width = 1280 >    < fx height = 720 >    < fx fps = 23.976 >
  15. < alignment = 2 >
  16. < x offset = 10 >    < y offset = 50 >
  17. < spacing = 0 >    < space scale = 1.000 >



  18. # style settings

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

  23. # additional settings

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

查看全部评分

Rank: 4

发表于 2016-11-25 20:21:55 |显示全部楼层
很炫
您需要登录后才可以回帖 登录 | 加入社区

GitHub|TCAX 主页

GMT+8, 2018-8-18 22:45

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部
RealH