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

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

[已解决] Apply script! [复制链接]

Rank: 4

跳转到指定楼层
楼主
发表于 2013-9-8 05:09:09 |只看该作者 |倒序浏览
Hi,

Why the effect(script) only applied on the first line of ass k-time file?
  1. Dialogue: 0,0:00:08.36,0:00:15.90,Default,,0000,0000,0000,,{\K52}{\K41}夜{\K37}ヲ{\K22}{\K45}覆{\K36}ウ{\K15}目{\K47}蓋{\K23}{\K23}開{\K53}ケ{\K0} {\K29}凶{\K41}キ{\K28}影{\K15}ヲ{\K28}恐{\K13}レ{\K14}ル{\K14}ナ{\K14}カ{\K164}レ
  2. Dialogue: 0,0:00:18.79,0:00:31.80,Default,,0000,0000,0000,,{\K43}{\K73}仄{\K15}く{\K29}ら{\K48}き{\K117}柩{\K42}か{\K61}ら{\K233} {\K45}産{\K55}み{\K15}堕{\K12}と{\K36}さ{\K43}れ{\K70}た{\K56}{\K104}人{\K61}形{\K42}の{\K22}よ{\K25}う{\K54}に
复制代码

Rank: 4

沙发
发表于 2013-9-8 12:32:21 |只看该作者
本帖最后由 Alex 于 2013-9-8 12:41 编辑

Anyway

I found the solution,  I have to change  end line number


< py file = bezier.py >     < beg line = 1 >    < end line = 5 >

Rank: 4

板凳
发表于 2013-9-8 14:58:20 |只看该作者
I have another question

What is the best position for _x & _y to use it for romaji (English) ?

  1.     dx = _x  
  2.     dy = _y
复制代码

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

地板
发表于 2013-9-8 18:37:02 |只看该作者
Alex 发表于 2013-9-8 14:58
I have another question

What is the best position for _x & _y to use it for romaji (English) ?

I think this script can also be applied on romaji karaoke files without modification :)

So you started using TCAX? cool~

Rank: 4

5#
发表于 2013-9-8 21:07:52 |只看该作者
本帖最后由 Alex 于 2013-9-8 21:09 编辑

thank you

this is my first FX by using TCAX
D files : http://www.speedyshare.com/EXSu9/test-s.zip

I used showjim old script, to start with TCAX
  1.     dx, dy = _x, _y

  2.     if _j == 0:
  3.         global infad
  4.         infad = 0

  5.     c1, c3 = "\\1c&HFFFFFF&", "\\3c&HFFFFFF&"
  6.     dur2 = _k * 20 + infad

  7.     line_fx = "\\bord1\\blur2\\3a&H30&"
  8.     text = "{\\an5%s%s\\move(%f1.2,%f1.2,%f1.2,%f1.2)\\fad(%f1.2,0)\\org(%f1.2,%f1.2)%s}%s" % (c1,c3,dx+70,dy,dx,dy,infad/2, dx,dy, line_fx,_txt)
  9.     ass_main(ASS_BUF, SubL(_start - 200 + infad, _start - 8 + infad, 2), '', text)

  10.     text = "{\\an5%s%s\\bord1\\blur2\\3a&H30&\\move(%f1.2,%f1.2,%f1.2,%f1.2)%s}%s" % (c1,c3,dx,dy,dx,dy,line_fx,_txt)=D
  11.     ass_main(ASS_BUF, SubL(_start - 8 + infad, _start + _elapk , 2), '', text)
  12.     infad += 50 / _n

  13.     text = "{\\an5%s%s\\bord1\\blur2\\3a&H30&\\move(%f1.2,%f1.2,%f1.2,%f1.2)\\t(\\fscx150\\fscy150)\\t(\\alpha&H%d&)%s} %s" % (c1,c3,dx, dy, dx ,dy,dur2,line_fx,_txt)
  14.     ass_main(ASS_BUF, SubL(_start + _elapk, _start + _elapk + _k*1.5, 3), '', text)
复制代码
thank you =D

Rank: 4

6#
发表于 2013-9-8 21:11:14 |只看该作者


My new question is, how i will use char method and pixel ?

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

7#
发表于 2013-9-8 21:12:04 |只看该作者
Alex 发表于 2013-9-8 21:07
thank you

this is my first FX by using TCAX


Good job~

tips: TCAX provides ASS tag functions, such as pos(_x, _y), t(t1, t2, a, code), color1("aabbcc"), etc.

they are more convenient and are recommended when writing TCAX scripts. check any of the existing scripts you'll find how to use these tag functions.

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

8#
发表于 2013-9-8 21:17:56 |只看该作者
Alex 发表于 2013-9-8 21:11
My new question is, how i will use char method and pixel ?


Several ways,

here is one example,

http://www.tcax.org/forum.php?mod=viewthread&tid=176

other recommended tutorials (not related)
http://www.tcax.org/forum.php?mod=viewthread&tid=177
http://www.tcax.org/forum.php?mod=viewthread&tid=178

a good way for learning to write TCAX scripts is to check out the shared existing ones
http://www.tcax.org/forum.php?mod=forumdisplay&fid=42

Rank: 4

9#
发表于 2013-9-8 21:33:22 |只看该作者
本帖最后由 Alex 于 2013-9-8 21:34 编辑
milkyjing 发表于 2013-9-8 21:12
Good job~

tips: TCAX provides ASS tag functions, such as pos(_x, _y), t(t1, t2, a, code), color1( ...


yes I know that, and it's same like a lua by using  zheox library (zheolib \ Spanish guy)
but i like to use a lua method
no problem i will start to use provides way =D

thank you 4 examples and tutorials


-

Rank: 4

10#
发表于 2013-9-13 17:22:54 |只看该作者
there is problem in line 39 - return (ASS_BUF, TCAS_BUF)
I don't know why exactly ?
  1. from tcaxPy import *
  2. from extLibs.small_code import *


  3. def tcaxPy_Init():
  4.     global _Fs
  5.     global _Spacing
  6.     global Font
  7.     global pos_fix
  8.     _FontFileName = GetVal(val_FontFileName)
  9.     _FaceID       = GetVal(val_FaceID)
  10.     _Fs           = GetVal(val_FontSize)
  11.     _Spacing = GetVal(val_Spacing)
  12.     Font = InitFont(_FontFileName, _FaceID, _Fs, _Spacing, GetVal(val_SpaceScale), MakeRGB(0, 0, 0), 0, False)


  13. def tcaxPy_Fin():
  14.     FinFont(Font)

  15. def tcaxPy_Main(_i, _j, _n, _start, _end, _elapk, _k, _x, _y, _a, _txt):

  16.     ASS_BUF  = []      
  17.     TCAS_BUF = []   

  18.     dx = _x         
  19.     dy = _y     

  20.     ts_0 = _start - 40 + 2 * _FD / 10 * _j
  21.     ts = ts_0 + 40
  22.     te = _end - 2 * _FD / 10 * (_n - _j - 1)
  23.     te_0 = te + 40


  24.     ass_main(ASS_BUF, SubL(Start = ts_0, End = ts_0 + 40, Layer = 1), mov(_x + 50, _y - 20, _x, _y) + fad(300, 0) + bord(3) + blur(2), _txt)
  25.     ass_main(ASS_BUF, SubL(Start = ts_0, End = ts_0 + 40, Layer = 2), mov(_x + 50, _y - 20, _x, _y) + fad(300, 0) + bord(1) + color3('000000'), _txt)
  26.     ass_main(ASS_BUF, SubL(Start = ts_0, End = ts_0 + 40, Layer = 3), mov(_x + 50, _y - 20, _x, _y) + fad(300, 0) + bord(0), _txt)


  27.   return (ASS_BUF, TCAS_BUF)
复制代码


Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

11#
发表于 2013-9-13 23:48:43 |只看该作者
Alex 发表于 2013-9-13 17:22
there is problem in line 39 - return (ASS_BUF, TCAS_BUF)
I don't know why exactly ?

This is a Python Grammar error... Python requires strict indention.

The code of the same level (block) should be aligned, i.e., have the same indention.

so, the solution to your question is to add two more white spaces to the beginning of line 39 - return (ASS_BUF, TCAS_BUF)

Rank: 4

12#
发表于 2013-9-14 00:04:25 |只看该作者
本帖最后由 Alex 于 2013-9-14 13:58 编辑

Yeah, u r right, it's working now

k, I used picture after that I applied the effect(script), the result was TCAS file not ass file (fx)
so what is the way to deal with this kind of file?


sorry man, I have a lots of questions

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

13#
发表于 2013-9-14 19:43:55 |只看该作者
Alex 发表于 2013-9-14 00:04
Yeah, u r right, it's working now

k, I used picture after that I applied the effect(script), the re ...


use AVS script to do the preview.

to preview ASS file, we use VSFilter.dll plugin and TextSub function

Analogously, we use TcasFilter.dll plugin (placed in the TCAX's root directory) and TcasSub function to preview TCAS file

p.s. feel free to ask

Rank: 4

14#
发表于 2013-9-14 20:52:31 |只看该作者
本帖最后由 Alex 于 2013-9-15 02:07 编辑


thank you

Rank: 4

15#
发表于 2013-9-15 02:56:19 |只看该作者
本帖最后由 Alex 于 2013-9-15 03:03 编辑

Wt is the problem again  



font+script+ass file+pic : http://www.megafileupload.com/en/file/450991/test-fx-zip.html



-

Administrator

Shanzhai Pro.

Rank: 7Rank: 7Rank: 7

16#
发表于 2013-9-15 14:36:18 |只看该作者
Alex 发表于 2013-9-15 02:56
Wt is the problem again   

Set the tag of TCC file 'tcaxpy user' =false,the problem will be solved.
FYI: TCC File Format Specification http://www.tcax.org/forum.php?mod=viewthread&tid=25

Rank: 4

17#
发表于 2013-9-15 15:55:07 |只看该作者
本帖最后由 Alex 于 2013-9-15 16:03 编辑

thank you,

it's really good to learn and know new things


OK, I want to know how can i use char(fx)
and is this tool supporting Arabic lang.


thank you  

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

18#
发表于 2013-9-15 19:09:13 |只看该作者
Alex 发表于 2013-9-15 15:55
thank you,

it's really good to learn and know new things


what do you mean by char fx? sorry, but I'm not familiar with Aegisub.

give some specific example (the char fx you want to create), then I may help you figure it out about how to do the same thing in TCAX.

I didn't test TCAX with Arabic Language, but I think it does support. since the font Engine used by TCAX is the great FreeType Library, if you encounter any problem, please inform me.  

Rank: 4

19#
发表于 2013-9-15 20:08:08 |只看该作者
本帖最后由 Alex 于 2013-9-15 20:11 编辑

Char = character (letter)
it's making each letter separately in each line

Eaxample : http://docs.aegisub.org/manual/K ... _Template_modifiers

Other modifiers >> Char

I read that FreeType Library supporting AR language (Right to left Language)
anyway i will test by myself  


thank you

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

20#
发表于 2013-9-17 23:33:47 |只看该作者
Alex 发表于 2013-9-15 20:08
Char = character (letter)
it's making each letter separately in each line

Open a TCC file, and set < k mode = normal > to syllable ?

I don't know what exactly you want, since I'm not too familiar with Aegisub.

you can try this exampel http://tcxcore.googlecode.com/files/example.zip and learn the TCAX way to accomplish your FX if you have enough interests.
您需要登录后才可以回帖 登录 | 新人加入

GitHub|TCAX 主页

GMT+8, 2024-11-23 00:21

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部
RealH