TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua
标题:
TCAX 三段样式的制作方法(待改进)
[打印本页]
作者:
Seekladoom
时间:
2022-3-6 02:35:07
标题:
TCAX 三段样式的制作方法(待改进)
本帖最后由 Seekladoom 于 2022-3-6 02:56 编辑
注:如下压缩包中的样式目前是先用Aegisub设置好以后,再用TCAX的tcc文件中的< inherit ass header = true >这行代码生成的:
【TCAX】Little Busters OP 三段样式(OPJP、OPJP 2、OPJP 3).rar
(13.47 KB, 下载次数: 2423)
2022-3-6 02:35:04 上传
下载次数: 2423
压缩包中的内容
2022-3-6 02:37:16 上传
下载附件
(52.91 KB)
tcc文件中的< inherit ass header = true >
2022-3-6 02:50:45 上传
下载附件
(85.08 KB)
中日特效同时生成
优点:一次性生成
缺点:目前tcc文件一次只能设置一个样式,其他样式要正常实现,需要在tcc的基础上对py脚本中的相应行修改ASS特效标签
2022-3-6 02:37:26 上传
下载附件
(12.65 KB)
【Python脚本】
from tcaxPy import *
def tcaxPy_Init():
pass
def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _A, _TXT):
ASS_BUF = [] # used for saving ASS FX lines
# ----------日文----------
if _i < 3:#OPJP
ass_main(ASS_BUF, SubL(_BT+_j*3-20,_BT+_SK,0,'OPJP'), an(5)+pos(_X,_Y)+color1('3767E6')+color3('FFFFFF')+blur(2)+fad(200,0), _TXT) #入场特效 - start2syl
ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,0,'OPJP'), an(5)+pos(_X,_Y)+blur(2)+t(color1('FFFFFF')+color3('3767E6')), _TXT) #卡拉OK特效 - syl
ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET-(_n-_j-1)*3+20,0,'OPJP'), an(5)+pos(_X,_Y)+color1('FFFFFF')+color3('3767E6')+blur(2)+fad(0,200), _TXT) #退场特效 - syl2end
if _i > 2 and _i < 6:#OPJP 2
ass_main(ASS_BUF, SubL(_BT+_j*3-20,_BT+_SK,0,'OPJP 2'), an(5)+pos(_X,_Y)+color1('3767E6')+color3('FFFFFF')+blur(2)+fad(200,0), _TXT) #入场特效 - start2syl
ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,0,'OPJP 2'), an(5)+pos(_X,_Y)+blur(2)+t(color1('FFFFFF')+color3('3767E6')), _TXT) #卡拉OK特效 - syl
ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET-(_n-_j-1)*3+20,0,'OPJP 2'), an(5)+pos(_X,_Y)+color1('FFFFFF')+color3('3767E6')+blur(2)+fad(0,200), _TXT) #退场特效 - syl2end
if _i > 5 and _i < 9:#OPJP 3
ass_main(ASS_BUF, SubL(_BT+_j*3-20,_BT+_SK,0,'OPJP 3'), an(5)+pos(_X,_Y)+color1('3767E6')+color3('FFFFFF')+blur(2)+fad(200,0), _TXT) #入场特效 - start2syl
ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,0,'OPJP 3'), an(5)+pos(_X,_Y)+blur(2)+t(color1('FFFFFF')+color3('3767E6')), _TXT) #卡拉OK特效 - syl
ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET-(_n-_j-1)*3+20,0,'OPJP 3'), an(5)+pos(_X,_Y)+color1('FFFFFF')+color3('3767E6')+blur(2)+fad(0,200), _TXT) #退场特效 - syl2end
# ----------中文----------
if _i > 8 and _i < 12:#OPCN
ass_main(ASS_BUF, SubL(_BT+_j*3-20,_ET-(_n-_j-1)*3+20,0,'OPCN'), pos(_X,_Y+1038)+blur(2)+fad(200,200), _TXT) #整体特效 - line
if _i > 11 and _i < 15:#OPCN 2
ass_main(ASS_BUF, SubL(_BT+_j*3-20,_ET-(_n-_j-1)*3+20,0,'OPCN 2'), pos(_X,_Y+1038)+blur(2)+fad(200,200), _TXT) #整体特效 - line
if _i > 14 and _i < 18:#OPCN 3
ass_main(ASS_BUF, SubL(_BT+_j*3-20,_ET-(_n-_j-1)*3+20,0,'OPCN 3'), pos(_X,_Y+1038)+blur(2)+fad(200,200), _TXT) #整体特效 - line
return (ASS_BUF, None)
复制代码
【TCC】
# tcc file version
< tcc file version = 1.000 >
# mode configuration
< inherit ass header = true >
< k mode = syl >
< text layout = horizontal >
< tcaxpy init = true >
< tcaxpy user = false >
< tcaxpy fin = false >
# py settings
< py file = Little Busters OP.py > < beg line = 1 > < end line = 0 >
# main settings
< k-timed ass file = LBOP_K.ass >
< font file = SourceHanSerif-Bold.otf > < font face id = 1 > < font size = 70 >
< fx width = 1920 > < fx height = 1080 > < fx fps = 23.976 >
< alignment = 8 >
< x offset = 0 > < y offset = 0 >
< spacing = 3 > < space scale = 1.0 >
# style settings
< font face name = "" >
< bord = 0 > < shad = 0 >
< primary color = FFFFFF > < secondary color = 000000 > < outline color = 000000 > < back color = 000000 >
< primary alpha = 0 > < secondary alpha = 0 > < outline alpha = 0 > < back alpha = 0 >
# additional settings
< blur = 0.000 >
复制代码
中日特效分开生成(需最后复制粘贴回来)
优点:中文和日文样式不易搞混
缺点:两个字幕最后需要手动复制粘贴合并到一起,再进行压制
2022-3-6 02:37:31 上传
下载附件
(22.25 KB)
【Python脚本:Little Busters OPJP】
from tcaxPy import *
def tcaxPy_Init():
pass
def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _WID, _TXT):
ASS_BUF = [] # used for saving ASS FX lines
# ----------日文----------
if _i < 3:#OPJP
ass_main(ASS_BUF, SubL(_BT+_j*3-20,_BT+_SK,0,'OPJP'), an(5)+pos(_X,_Y)+color1('3767E6')+color3('FFFFFF')+blur(2)+fad(200,0), _TXT) #入场特效 - start2syl
ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,0,'OPJP'), an(5)+pos(_X,_Y)+blur(2)+t(color1('FFFFFF')+color3('3767E6')), _TXT) #卡拉OK特效 - syl
ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET-(_n-_j-1)*3+20,0,'OPJP'), an(5)+pos(_X,_Y)+color1('FFFFFF')+color3('3767E6')+blur(2)+fad(0,200), _TXT) #退场特效 - syl2end
if _i > 2 and _i < 6:#OPJP 2
ass_main(ASS_BUF, SubL(_BT+_j*3-20,_BT+_SK,0,'OPJP 2'), an(5)+pos(_X,_Y)+color1('3767E6')+color3('FFFFFF')+blur(2)+fad(200,0), _TXT) #入场特效 - start2syl
ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,0,'OPJP 2'), an(5)+pos(_X,_Y)+blur(2)+t(color1('FFFFFF')+color3('3767E6')), _TXT) #卡拉OK特效 - syl
ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET-(_n-_j-1)*3+20,0,'OPJP 2'), an(5)+pos(_X,_Y)+color1('FFFFFF')+color3('3767E6')+blur(2)+fad(0,200), _TXT) #退场特效 - syl2end
if _i > 5 and _i < 9:#OPJP 3
ass_main(ASS_BUF, SubL(_BT+_j*3-20,_BT+_SK,0,'OPJP 3'), an(5)+pos(_X,_Y)+color1('3767E6')+color3('FFFFFF')+blur(2)+fad(200,0), _TXT) #入场特效 - start2syl
ass_main(ASS_BUF, SubL(_BT+_SK,_BT+_SK+_KT,0,'OPJP 3'), an(5)+pos(_X,_Y)+blur(2)+t(color1('FFFFFF')+color3('3767E6')), _TXT) #卡拉OK特效 - syl
ass_main(ASS_BUF, SubL(_BT+_SK+_KT,_ET-(_n-_j-1)*3+20,0,'OPJP 3'), an(5)+pos(_X,_Y)+color1('FFFFFF')+color3('3767E6')+blur(2)+fad(0,200), _TXT) #退场特效 - syl2end
return (ASS_BUF, None)
复制代码
【TCC:Little Busters OPJP】
# tcc file version
< tcc file version = 1.000 >
# mode configuration
< inherit ass header = true >
< k mode = syl >
< text layout = horizontal >
< tcaxpy init = true >
< tcaxpy user = false >
< tcaxpy fin = false >
# py settings
< py file = Little Busters OPJP.py > < beg line = 1 > < end line = 0 >
# main settings
< k-timed ass file = LBOP_K.ass >
< font file = SourceHanSerif-Bold.otf > < font face id = 1 > < font size = 70 >
< fx width = 1920 > < fx height = 1080 > < fx fps = 23.976 >
< alignment = 8 >
< x offset = 0 > < y offset = 5 >
< spacing = 3 > < space scale = 1.0 >
# style settings
< font face name = "" >
< bord = 0 > < shad = 0 >
< primary color = FFFFFF > < secondary color = 000000 > < outline color = 000000 > < back color = 000000 >
< primary alpha = 0 > < secondary alpha = 0 > < outline alpha = 0 > < back alpha = 0 >
# additional settings
< blur = 0.000 >
复制代码
【Python脚本:Little Busters OPCN】
from tcaxPy import *
def tcaxPy_Init():
pass
def tcaxPy_Main(_i, _j, _n, _BT, _ET, _SK, _KT, _X, _Y, _WID, _TXT):
ASS_BUF = [] # used for saving ASS FX lines
# ----------中文----------
if _i > 8 and _i < 12:#OPCN
ass_main(ASS_BUF, SubL(_BT+_j*3-20,_ET-(_n-_j-1)*3+20,0,'OPCN'), pos(_X,_Y)+blur(2)+fad(200,200), _TXT) #整体特效 - line
if _i > 11 and _i < 15:#OPCN 2
ass_main(ASS_BUF, SubL(_BT+_j*3-20,_ET-(_n-_j-1)*3+20,0,'OPCN 2'), pos(_X,_Y)+blur(2)+fad(200,200), _TXT) #整体特效 - line
if _i > 14 and _i < 18:#OPCN 3
ass_main(ASS_BUF, SubL(_BT+_j*3-20,_ET-(_n-_j-1)*3+20,0,'OPCN 3'), pos(_X,_Y)+blur(2)+fad(200,200), _TXT) #整体特效 - line
return (ASS_BUF, None)
复制代码
【TCC:Little Busters OPCN】
# tcc file version
< tcc file version = 1.000 >
# mode configuration
< inherit ass header = true >
< k mode = syl >
< text layout = horizontal >
< tcaxpy init = true >
< tcaxpy user = false >
< tcaxpy fin = false >
# py settings
< py file = Little Busters OPCN.py > < beg line = 1 > < end line = 0 >
# main settings
< k-timed ass file = LBOP_K.ass >
< font file = SourceHanSerifSC-Bold.otf > < font face id = 1 > < font size = 70 >
< fx width = 1920 > < fx height = 1080 > < fx fps = 23.976 >
< alignment = 2 >
< x offset = 0 > < y offset = -24 >
< spacing = 6 > < space scale = 1.0 >
# style settings
< font face name = "" >
< bord = 0 > < shad = 0 >
< primary color = FFFFFF > < secondary color = 000000 > < outline color = 000000 > < back color = 000000 >
< primary alpha = 0 > < secondary alpha = 0 > < outline alpha = 0 > < back alpha = 0 >
# additional settings
< blur = 0.000 >
复制代码
附件:
【TCAX】Little Busters OP 三段样式(OPJP、OPJP 2、OPJP 3).rar
(2022-3-6 02:35:04, 13.47 KB) / 下载次数 2423
http://tcax.org/forum.php?mod=attachment&aid=MjkxOXw4ZDVhZjQ5OHwxNzMyMjEwMjQwfDB8MA%3D%3D
图片附件:
分开.png
(2022-3-6 02:37:31, 22.25 KB) / 下载次数 1791
http://tcax.org/forum.php?mod=attachment&aid=MjkyMnw4NDE5OWI4ZHwxNzMyMjEwMjQwfDB8MA%3D%3D
图片附件:
合并.png
(2022-3-6 02:37:26, 12.65 KB) / 下载次数 1929
http://tcax.org/forum.php?mod=attachment&aid=MjkyMXwzOTMwNTk1MHwxNzMyMjEwMjQwfDB8MA%3D%3D
图片附件:
三段.png
(2022-3-6 02:37:16, 52.91 KB) / 下载次数 1991
http://tcax.org/forum.php?mod=attachment&aid=MjkyMHw3ZmI5NWUzOHwxNzMyMjEwMjQwfDB8MA%3D%3D
图片附件:
继承ASS文件头部样式.png
(2022-3-6 02:50:45, 85.08 KB) / 下载次数 1889
http://tcax.org/forum.php?mod=attachment&aid=MjkyM3wzODI2Y2IxMHwxNzMyMjEwMjQwfDB8MA%3D%3D
作者:
Seekladoom
时间:
2022-3-6 03:05:29
本帖最后由 Seekladoom 于 2022-3-6 03:09 编辑
相关链接:
建议允许多样式
目前的TCAX自身还不支持多样式设置,但可以通过1楼的方法降低TCAX设置多段样式的难度,进一步简化看后续TCAX的GUI开发工作了,敬请期待。
欢迎光临 TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua (http://tcax.org/)
Powered by Discuz! X2