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

 找回密码
 新人加入
查看: 5724|回复: 7

[特效算法] [内置特效EXT]火焰效果test [复制链接]

Administrator

TCAX Dev.

Rank: 7Rank: 7Rank: 7

发表于 2011-9-1 17:09:09 |显示全部楼层
说明

感谢X大提供源代码(C#)

此效果出处:
http://u.115.com/file/e60g9ugh#
[X]010_MAD_Shakugan_no_shana.mkv

附件为预览及脚本下载

移植过来的py脚本, (TCAX内置特效兼容)
  1. ################################################################################
  2. ### description:
  3. ### fire test script, incomplete


  4. from tcaxPy import *


  5. def tcaxPy_Init():
  6.     global _FD                         # frame duration, in millisecond
  7.     global _Fs
  8.     global Font
  9.     global fire_str
  10.     _FD = 1000 / GetVal(val_FXFPS)
  11.     _Fs = GetVal(val_FontSize)
  12.     Font = InitFont(GetVal(val_FontFileName), GetVal(val_FaceID), _Fs, GetVal(val_Spacing), GetVal(val_SpaceScale), 0xFFFFFF, 0, 0)
  13.     fire_str = ('{\\p5}m 0 0 b 8 1 9 -28 -2 -41 b 3 -23 -17 0 0 0{\\p0}',
  14.                 '{\\p5}m 1 41 b 20 39 1 13 13 -11 b 5 1 -18 22 1 41{\\p0}',
  15.                 '{\\p4}m 6 39 b 4 29 1 13 27 -37 b -1 -3 -15 34 6 39{\\p0}',
  16.                 '{\\p5}m -3 43 b -9 22 -1 33 16 -47 b 1 3 -17 0 -3 43{\\p0}')


  17. def tcaxPy_Fin():
  18.     FinFont(Font)


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

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

  24.     ts = _start + _j * time_fac * _FD / 10 - time_gap * _FD / 10
  25.     te = _end - (_n - _j - 1) * time_fac * _FD / 10 + time_gap * _FD / 10 - 30
  26.     count = int(te - ts)
  27.     step = int(_FD / 10)
  28.     PIX = TextPix(Font, _txt)
  29.     points = PixPoints(PIX)
  30.     pt_num = len(points)
  31.     dx = _x - int(_a / 2 + 0.5) + PIX[0][0]
  32.     dy = _y - int(_Fs / 2 + 0.5) + PIX[0][1]
  33.     for i in range(0, count, step):
  34.         pt = points[randint(0, pt_num - 1)]
  35.         t0 = randint(int(ts), int(te))
  36.         t1 = t0 + 30
  37.         tmpz = randint(0, 359)
  38.         tmpstr = fire_str[randint(0, 3)]
  39.         x = dx + pt[0]
  40.         y = dy + pt[1]
  41.         EFT = move(x, y, x, y - 25) + \
  42.               alpha1(100) + color1('3F7EF6') + alpha3(150) + color3('3F7EF6') + \
  43.               bord(3) + blur(3) + frz(tmpz) + t(fsc(80, 80) + bord(1) + fry(361) + frz(-57)) + fad(0, 200)
  44.         ass_main(ASS_BUF, SubL(t0, t1, 10, Pix_Style), EFT, tmpstr)

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

preview.mp4

293.21 KB, 下载次数: 2142

预览

ext_fire.py

2.15 KB, 下载次数: 1575

脚本

2

查看全部评分

Rank: 4

发表于 2017-8-16 14:53:30 |显示全部楼层
附件无法查取,论坛崩了??

Rank: 4

发表于 2017-8-16 23:03:05 |显示全部楼层
下载不了咋整

Rank: 1

发表于 2017-9-10 23:12:55 |显示全部楼层
的飒飒发 繁琐撒撒
2.jpg

Rank: 1

发表于 2017-9-10 23:13:59 |显示全部楼层
hy+yjh.jpg

Rank: 4

发表于 2018-1-30 14:08:42 |显示全部楼层

Rank: 4

发表于 2018-1-30 14:12:34 |显示全部楼层
特效表现方式为ext,其实在ext文件夹里面就有了

Rank: 4

发表于 2018-1-30 14:12:48 |显示全部楼层
改个文件名就可以了

Rank: 4

发表于 2019-7-31 17:09:26 |显示全部楼层
谢谢分享。
您需要登录后才可以回帖 登录 | 新人加入

GitHub|TCAX 主页

GMT+8, 2024-3-28 23:00

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部
RealH