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

标题: 再次请教大神!!入场效果 in_fluf002 万分感谢 [打印本页]

作者: 250775115    时间: 2012-12-22 00:08:29     标题: 再次请教大神!!入场效果 in_fluf002 万分感谢

本帖最后由 250775115 于 2012-12-22 16:07 编辑



我们的夏天网友发的脚本!!   001能调用,只有002出现问题。那贴中说了(控制字间时间差)不是很懂。
http://www.tcax.org/forum.php?mod=viewthread&tid=399&extra=page%3D1





002脚本如下:
from tcaxPy import *


def tcaxPy_Init():
    global _FD                              # frame duration, in millisecond
    global _Blur, _Bord
    global _FS
    _FD = 1000 / GetVal(val_FXFPS)
    _Blur = GetVal(val_Blur)
    _Bord = GetVal(val_Bord)
    _FS = GetVal(val_FontSize)


def tcaxPy_Fin():
    pass


time_gap = 1    # you can change this value to 0, or 2 or any other number
time_fac = 1    # you can change this value to 0, or 2 or any other number

def tcaxPy_Main(_i, _j, _n, _start, _end, _elapk, _k, _x, _y, _a, _txt):
    ASS_BUF  = []        # used for saving ASS FX lines
    TCAS_BUF = []        # used for saving TCAS FX raw data

   
    te = _start + _j * time_fac * _FD / 10 - time_gap * _FD / 10                      # end time, in semi-second
    ts = _start - randint(10, 30)                                               # start time, in semi-second
    dur = int((te - ts) * 10)                                                # effect duration, in millisecond
   
    EFT = pos(_x, _y) + fad(randint(100, dur), 0) + fs(_FS * 1.4) + t(fs(_FS))
    if _Blur > 0:
        EFT += blur(_Blur)
    if _Bord > 0:
        EFT += bord(_Bord * 0.3) + t(bord(_Bord))
    ass_main(ASS_BUF, SubL(ts, te), EFT, _txt)
   

    return (ASS_BUF, TCAS_BUF)
TTC如下
# tcc file version

< tcc file version = 1.0 >


# mode configuration

< inherit ass header = false >
< k mode = syl >
< text layout = horizontal >
< tcaxpy init = true >
< tcaxpy user = false >
< tcaxpy fin = true >


# py settings

< py file = !in_fluf002.py >     < beg line = 1 >    < end line = 0 >
< py file = !main_001.py >     < beg line = 1 >    < end line = 0 >




# main settings

< k-timed ass file = Eureka NCED3_ch.ass >
< font file = DFPHuaZongW5-B5.ttf >    < font face id = 1 >    < font size = 50 >
< fx width = 1440 >    < fx height = 1080 >    < fx fps = 23.976 >
< alignment = 2 >
< x offset = 0 >    < y offset = 16 >
< spacing = 4 >    < space scale = 1.0 >


# style settings

< font face name = "" >
< bord = 3 >    < shad = 2 >
< primary color = F0E7DA >    < secondary color = BB4400 >    < outline color = 000044 >    < back color = 000000 >
< primary alpha = 0 >    < secondary alpha = 255 >    < outline alpha = 0 >    < back alpha = 155 >


# additional settings

< blur = 0.0 >
K我只打了一半,主要是尝试效果。用Aegisub2.9

[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,浪漫雅圆,48,&H009C5E01,&H0000FFFF,&H00895302,&H005A2F00,-1,0,0,0,100,100,0.6,0,1,1.6,0.4,2,15,15,15,1
Style: Default2,華康華綜體,48,&H009C5E01,&H00DC8606,&H00FFFFFF,&H005A2F00,-1,0,0,0,100,100,0.6,0,1,2.6,0.4,2,15,15,15,1
Style: Default-JP,EPSON 太明朝体B,33,&H00FFFFFF,&H00DC8606,&H009C5E01,&H005A2F00,-1,0,0,0,100,100,0.6,0,1,1.6,0.4,2,15,15,75,1

[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.00,0:00:00.00,Default2,NTP,0000,0000,0000,,
Dialogue: 0,0:00:09.13,0:00:13.66,Default2,NTP,0000,0000,0000,,{\k4}{\k12}Na{\k1} {\k12}Na{\k15} {\k61}Na{\k41} why{\k0} {\k37}so{\k11} {\k39}why?{\k44} {\K53}試著{\k95}想像{\K43}吧{\K0}
Dialogue: 0,0:00:13.70,0:00:17.13,Default2,NTP,0000,0000,0000,,{\k70}Just {\k57}you {\k76}like{\k30} {\k46}喜歡{\k27}的{\k45}事
Dialogue: 0,0:00:17.16,0:00:24.48,Default2,NTP,0000,0000,0000,,{\k69}不止{\k63}一{\k93}扇{\k21} {\k61}妳{\k55}打{\k42}開{\k65}的{\k92}門{\k171}扉
Dialogue: 0,0:00:25.21,0:00:27.65,Default2,NTP,0000,0000,0000,,{\k59}答案{\k31}在那{\k22}兒{\k53}嗎?{\k35}不在{\k44}嗎?{\k0}
Dialogue: 0,0:00:27.69,0:00:29.60,Default2,NTP,0000,0000,0000,,{\k20}I {\k40}don’t {\k27}know{\k6} {\k37}現在{\k21}也{\k20}不{\k20}明白{\k0}
Dialogue: 0,0:00:29.60,0:00:31.47,Default2,NTP,0000,0000,0000,,{\k21}我們{\k30}一{\k17}直{\k24}都是{\k29}迷路{\k25}的{\k41}孩子{\k0}
Dialogue: 0,0:00:31.67,0:00:33.59,Default2,NTP,0000,0000,0000,,如大人所說 “Just a child…”
Dialogue: 0,0:00:33.72,0:00:35.50,Default2,NTP,0000,0000,0000,,但是解開謎題會很高興
Dialogue: 0,0:00:35.53,0:00:37.54,Default2,NTP,0000,0000,0000,,雖然也許無法立刻解開
Dialogue: 0,0:00:37.63,0:00:40.01,Default2,NTP,0000,0000,0000,,大家總有無盡的疑惑
Dialogue: 0,0:00:40.01,0:00:42.18,Default2,NTP,0000,0000,0000,,不要放棄 在解開之前
Dialogue: 0,0:00:42.37,0:00:46.15,Default2,NTP,0000,0000,0000,,就算是失敗
Dialogue: 0,0:00:46.45,0:00:49.79,Default2,NTP,0000,0000,0000,,“All right !!” 也請這樣說
Dialogue: 0,0:00:49.81,0:00:56.49,Default2,NTP,0000,0000,0000,,竭盡全力在想像的海洋中遊泳
Dialogue: 0,0:00:57.20,0:01:01.85,Default2,NTP,0000,0000,0000,,Na Na Na why so why? 試著想像吧
Dialogue: 0,0:01:01.89,0:01:05.04,Default2,NTP,0000,0000,0000,,Just you like 喜歡的事
Dialogue: 0,0:01:05.21,0:01:13.25,Default2,NTP,0000,0000,0000,,不止一個 唯有妳才知道的未來
Dialogue: 0,0:01:13.25,0:01:15.25,Default2,,0000,0000,0000,,


作者: 我们的夏天    时间: 2012-12-22 00:23:44

本帖最后由 我们的夏天 于 2012-12-22 00:25 编辑

可以麻烦把tcc和k值文件发一下吗,可能是k值里某句词的始末时间出问题了
作者: 250775115    时间: 2012-12-22 10:06:07

我们的夏天 发表于 2012-12-22 00:23
可以麻烦把tcc和k值文件发一下吗,可能是k值里某句词的始末时间出问题了

大神,我已经发了。。编辑在一楼。
作者: 250775115    时间: 2012-12-22 10:23:07

本帖最后由 250775115 于 2012-12-22 10:24 编辑
我们的夏天 发表于 2012-12-22 00:23
可以麻烦把tcc和k值文件发一下吗,可能是k值里某句词的始末时间出问题了

大神,不要麻烦您啦,我自己摸索已解决了!参考milk大神的TCC文件详细说明!ttc文件  k mode, syl改用normal
作者: 我们的夏天    时间: 2012-12-22 11:25:40

本帖最后由 我们的夏天 于 2012-12-22 11:26 编辑

k值最好是每句都要有,下半没打于是会报错。。
测试时为了方便,可以在未打k的每句第一个字前加{\k0}
例如
  1. Dialogue: 0,0:01:05.21,0:01:13.25,Default2,NTP,0000,0000,0000,,{\k0}不止一個 唯有妳才知道的未來
复制代码





欢迎光临 TCAX 字幕特效制作工具官方论坛 | ASS | TCAS | Python | Aegisub | Lua (http://tcax.org/) Powered by Discuz! X2