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

标题: tcas_main function! [打印本页]

作者: Alex    时间: 2014-4-11 21:16:41     标题: tcas_main function!

Hi

I have Q regarding tcas_main function

If i'm going to use image can i use move tag?
I want to move image like from x-20 to x+20
but I thought we can't move image in this case when u using  tcas_main(TCAS_BUF. right?


example this fx "http://www.tcax.org/forum.php?mod=viewthread&tid=158"
for SAi, the images have one position  only!
作者: 几年    时间: 2014-4-11 21:25:53

you can use frame by frame(or just define you minimum stride yourself) pos to make it.
作者: Alex    时间: 2014-4-11 23:26:35

How can I do that?
作者: 几年    时间: 2014-4-12 07:08:34

Alex 发表于 2014-4-11 23:26
How can I do that?

see nyuFx  docs utils.frames

you can implement one by yourself
作者: Alex    时间: 2014-4-13 01:20:32

thanx
作者: milkyjing    时间: 2014-4-20 16:37:40

Alex 发表于 2014-4-11 23:26
How can I do that?


if you just want to translate the image from one position to another without modifying the content,

use key framing tech.

see below,

## Append a pair of key frame PIXs to the TCAS_BUF list.
# @param TCAS_BUF a list, the list containing the raw TCAS FX data chunks
# @param pix_start a PIX, the target start key frame PIX that is going to be added into the TCAS_BUF
# @param pix_end a PIX, the target end key frame PIX that is going to be added into the TCAS_BUF
# @param start an integer, the starting time of the PIX
# @param end an integer, the end time of the PIX
# @param offsetX a float, offset of the PIX in the horizontal direction
# @param offsetY a float, offset of the PIX in the vertical direction
# @param type an integer, type of the key frame PIX, 1 - normal, 2 - use bilinear filtering to make smooth motion
# @param layer an integer, layer of the PIX
# @return 0 on success
def tcas_keyframe(TCAS_BUF, pix_start, pix_end, start, end, offsetX, offsetY, type, layer):



sorry for the late reply

作者: Alex    时间: 2014-4-20 17:44:16

I know that I have to use tcas_keyframe
but there is only one offsetX, offsetY!
because of that I put this question

and I have other question, it's in this topic (last comment)
http://www.tcax.org/forum.php?mo ... &extra=page%3D2

作者: milkyjing    时间: 2014-4-20 21:13:31

Alex 发表于 2014-4-20 17:44
I know that I have to use tcas_keyframe
but there is only one offsetX, offsetY!
because of that I pu ...

the point lies in the PIX structure

PIX = ((x, y), (width, height), (r, g, b, a, r, g, b, a, ....))

so pix_start can be ((x_src, y_src), (width, height), (r, g, b, a, r, g, b, a, ....))

pix_end can be ((x_dest, y_dest), (width, height), (r, g, b, a, r, g, b, a, ....))
作者: Alex    时间: 2014-4-20 21:28:42

It's clear now. Shishime ^^




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