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

 找回密码
 新人加入
查看: 9201|回复: 12

【葬桜】散落的花瓣 [复制链接]

Super Moderator

{\clip\t(\clip)}∀.I.R.nesSub

Rank: 6Rank: 6

发表于 2012-8-5 13:01:04 |显示全部楼层
本帖最后由 BurySakura 于 2012-8-8 02:35 编辑

mask.png
c.png
  1. from cairo import *
  2. from math import *
  3. from random import *

  4. SYL_FON_WID = 40
  5. SYL_FON_HEI = 40

  6. surface = ImageSurface(FORMAT_ARGB32, SYL_FON_WID, SYL_FON_HEI)
  7. ctx = Context(surface)

  8. ctx.scale(1 / 64, 1 / 64)
  9. ctx.arc(20*64, 20*64, 20*64, 0 ,2*pi)   
  10. ctx.clip()

  11. linear = LinearGradient(0, 0, SYL_FON_WID*64, SYL_FON_HEI*64)
  12. linear.add_color_stop_rgb(0, 0, 0.3, 0.8)
  13. linear.add_color_stop_rgb(1, 0, 0.8, 0.3)
  14.             
  15. radial = RadialGradient(SYL_FON_WID*64*randint(0,10)/10, SYL_FON_HEI*64*randint(0,10)/10, SYL_FON_WID*64*0,
  16.                         SYL_FON_WID*64*randint(0,10)/10, SYL_FON_HEI*64*randint(0,10)/10, SYL_FON_WID*64*1)
  17. radial.add_color_stop_rgba(0, 0, 0, 0, 0)
  18. radial.add_color_stop_rgba(0.8, 0, 0, 0, 1)

  19. ctx.set_source(linear)
  20. ctx.mask(radial)

  21. surface.write_to_png('mask.png')
复制代码
1

查看全部评分

Super Moderator

{\clip\t(\clip)}∀.I.R.nesSub

Rank: 6Rank: 6

发表于 2012-8-5 13:10:34 |显示全部楼层
本帖最后由 BurySakura 于 2012-8-5 13:22 编辑

c1.png
  1. from cairo import *
  2. from math import *
  3. from random import *

  4. SYL_FON_WID = 40
  5. SYL_FON_HEI = 40

  6. surface = ImageSurface(FORMAT_ARGB32, SYL_FON_WID, SYL_FON_HEI)
  7. ctx = Context(surface)
  8. mask = ImageSurface(FORMAT_ARGB32, SYL_FON_WID, SYL_FON_HEI)
  9. cr = Context(mask)

  10. ctx.scale(SYL_FON_WID, SYL_FON_HEI)
  11. linear = LinearGradient(0, 0, 1, 1)
  12. linear.add_color_stop_rgb(0, 0, 0.3, 0.8)
  13. linear.add_color_stop_rgb(1, 0, 0.8, 0.3)
  14.             
  15. radial = RadialGradient(random(), random(), 0,
  16.                         random(), random(), 1)
  17. radial.add_color_stop_rgba(0, 0, 0, 0, 0)
  18. radial.add_color_stop_rgba(0.8, 0, 0, 0, 1)

  19. ctx.set_source(linear)
  20. ctx.mask(radial)

  21. cr.set_source_surface(surface,0,0)
  22. cr.scale(1 / 64, 1 / 64)
  23. cr.arc(20*64, 20*64, 20*64, 0, 2*pi)
  24. cr.clip()
  25. cr.paint()

  26. mask.write_to_png('mask.png')
复制代码

Super Moderator

{\clip\t(\clip)}∀.I.R.nesSub

Rank: 6Rank: 6

发表于 2012-8-5 13:22:20 |显示全部楼层
本帖最后由 BurySakura 于 2012-8-5 13:22 编辑

chara01.png

c1.png
  1. from cairo import *
  2. from math import *
  3. from random import *

  4. SYL_FON_WID = 40
  5. SYL_FON_HEI = 40
  6. PAT_IMG_FIL = r'.\chara01.png'

  7. img = ImageSurface.create_from_png(PAT_IMG_FIL)
  8. width = img.get_width()
  9. height = img.get_height()

  10. imgpat = SurfacePattern(img)

  11. scaler = Matrix()
  12. scx = width / SYL_FON_WID
  13. scy = height / SYL_FON_HEI
  14. #1 = 100%; 2 = 50%;0.5 = 200%
  15. scaler.scale(scx,scy)
  16. imgpat.set_matrix(scaler)

  17. #set resampling filter
  18. imgpat.set_filter(FILTER_BEST)
  19.             
  20. mask = ImageSurface(FORMAT_ARGB32, SYL_FON_WID, SYL_FON_HEI)
  21. cr = Context(mask)

  22. cr.set_source(imgpat)
  23. cr.scale(1 / 64, 1 / 64)
  24. cr.arc(20*64, 20*64, 15*64, 0, 2*pi)
  25. cr.clip()
  26. cr.paint()

  27. mask.write_to_png('mask.png')
复制代码

Super Moderator

{\clip\t(\clip)}∀.I.R.nesSub

Rank: 6Rank: 6

发表于 2012-8-5 23:53:10 |显示全部楼层
本帖最后由 BurySakura 于 2012-8-6 01:49 编辑

mask.png
  1. from cairo import *
  2. from math import *

  3. class translation(object):
  4.     def __init__(self, filename, width, height, img):

  5.         img = self.img = ImageSurface.create_from_png(img)
  6.         imgw = img.get_width()
  7.         imgh = img.get_height()

  8.         imgpat = SurfacePattern(img)

  9.         scaler = Matrix()
  10.         scx = imgw / width
  11.         scy = imgh / height
  12.         #1 = 100%; 2 = 50%;0.5 = 200%
  13.         scaler.scale(scx, scy)
  14.         imgpat.set_matrix(scaler)

  15.         #set resampling filter
  16.         imgpat.set_filter(FILTER_BEST)
  17.                     
  18.         self.mask = ImageSurface(FORMAT_ARGB32, width, height)
  19.         cr = self.cr = Context(self.mask)

  20.         cr.translate(10, 10)
  21.         cr.set_source(imgpat)

  22.         cr.translate(-10, -10)

  23.         cr.scale(1 / 64, 1 / 64)
  24.         cr.arc(20*64,  20*64,  15*64,  0 , 2*pi)
  25.         cr.clip()
  26.         cr.paint()

  27.         self.mask.write_to_png(filename + '.png')
  28.         self.mask.finish()

  29. if __name__ == '__main__':
  30.     SYL_FON_WID = 40
  31.     SYL_FON_HEI = 40
  32.     PAT_IMG_FIL = r'.\chara01.png'
  33.     translation('mask', SYL_FON_WID, SYL_FON_HEI, PAT_IMG_FIL)
复制代码

Super Moderator

{\clip\t(\clip)}∀.I.R.nesSub

Rank: 6Rank: 6

发表于 2012-8-8 00:06:00 |显示全部楼层
warpedtext.png
  1. #!/usr/bin/env python

  2. import cairo
  3. import math

  4. def warpPath(ctx, function):
  5.   first = True

  6.   for type, points in ctx.copy_path():
  7.     if type == cairo.PATH_MOVE_TO:
  8.       if first:
  9.         ctx.new_path()
  10.         first = False
  11.       x, y = function(*points)
  12.       ctx.move_to(x, y)

  13.     elif type == cairo.PATH_LINE_TO:
  14.       x, y = function(*points)
  15.       ctx.line_to(x, y)

  16.     elif type == cairo.PATH_CURVE_TO:
  17.       x1, y1, x2, y2, x3, y3 = points
  18.       x1, y1 = function(x1, y1)
  19.       x2, y2 = function(x2, y2)
  20.       x3, y3 = function(x3, y3)
  21.       ctx.curve_to(x1, y1, x2, y2, x3, y3)

  22.     elif type == cairo.PATH_CLOSE_PATH:
  23.       ctx.close_path()

  24. def spiral(x, y):
  25.   theta0 = -math.pi * 3 / 4
  26.   theta = x / Width * math.pi * 2 + theta0
  27.   radius = y + 200 - x/7
  28.   xnew = radius*math.cos(theta)
  29.   ynew = radius*math.sin(-theta)
  30.   return xnew + Width/2, ynew + Height/2

  31. def curl(x, y):
  32.   xn = x - Textwidth/2
  33.   #yn = y - Textheight/2
  34.   xnew = xn
  35.   ynew = y + xn ** 3 / ((Textwidth/2)**3) * 70
  36.   return xnew + Width/2, ynew + Height*2/5


  37. Width, Height = 512, 512
  38. surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, Width, Height)
  39. ctx = cairo.Context(surface)
  40. solidpattern = ctx.get_source()

  41. # background
  42. pat = cairo.LinearGradient (0.0, 0.0, 0, Height)
  43. pat.add_color_stop_rgba (1, 0, 0, 0, 1)
  44. pat.add_color_stop_rgba (0, 1, 1, 1, 1)

  45. ctx.rectangle (0,0,Width,Height)
  46. ctx.set_source (pat)
  47. ctx.fill ()

  48. # foreground
  49. ctx.set_source (solidpattern)
  50. ctx.set_source_rgb (1,1,1)

  51. ctx.select_font_face("Sans")
  52. ctx.set_font_size(80)

  53. # spiral text
  54. ctx.new_path()
  55. ctx.move_to(0, 0)
  56. ctx.text_path("pycairo - " + "spam " * 5)
  57. warpPath(ctx, spiral)
  58. ctx.fill()

  59. # curly text
  60. ctx.new_path()
  61. ctx.move_to(0, 0)
  62. ctx.set_source_rgb(0.3, 0.3, 0.3)
  63. text = "I am curly :)"
  64. ctx.text_path(text)
  65. Textwidth, Textheight = ctx.text_extents(text)[2:4]
  66. warpPath(ctx, curl)
  67. ctx.fill()

  68. surface.write_to_png("warpedtext.png")
复制代码

Super Moderator

{\clip\t(\clip)}∀.I.R.nesSub

Rank: 6Rank: 6

发表于 2012-8-8 01:00:52 |显示全部楼层
本帖最后由 BurySakura 于 2012-8-8 01:08 编辑

关于特效制作


本帖最后由 BurySakura 于 2011-4-10 13:34 在妇联字幕板块编辑。
当时没有TCAX,所以没有提到请见谅,TCAX大家最熟悉不过,也轮不到我来介绍。


我做的特效并不多,所以经验也不怎么丰富,就随便说说我对特效制作方面的体会。

      一、必须掌握一种工具的使用

      现在比较常用的是jfs写的Aegisub。至于如何使用,我写过一篇《Aegisub简易外挂ASS特效制作教程》,这个只是Automation 4的皮毛而已,想完全掌握对Automation 4的使用,必须要会Lua的前提下。不过它应该也可以使用纯Lua脚本制作特效,我没有使用过,所以也不怎么了解。具体参考Youka写的NyuFX vs. Automation 4:http://youka.xobor.de/t86f4-NyuFX-vs-Automation.html

      既然提到了NyuFX,那下面开始讲NyuFX吧。这是Youka写的一个相对纯脚本来说比较容易使用的工具。写一段只应用于特效的Lua脚本,然后用C/C++写的NyuFX生成ASS。而且在使用ASS的前提下,效果制作方面应该可以说是能完成所有特效的工具之一。工具只是工具,不过看了下作品(包括别人使用NyuFX制作的),在ASS限制的条件下还是没有人能达到Tenka_Muteki-7X3那个境界。使用方法:http://youka.xobor.de/t61f4-Tutorials.html

      然后就是Tenka_Muteki-7X3写的SSA Pawaa xD~。7X3可以说是EP特效的鼻祖,在那个没有VSFilter2.39的时代能完成这样的效果,即便是拿到今天,我个人认为还是没有出现使用ASS能超越7X3的人。至于如何使用SSA Pawaa xD~嘛,首先要会Python,然后得花时间把整个脚本完全理解,纯脚本看上去比较可怕,而且7X3变量又写得那么整齐,看着看着就晕了。我这里有份西班牙文的教程,如果有同学需要可以问我拿,西班牙文发出来也没有任何意义。不过活教程倒是有几只,说是活教程,其实都是半死不活。WLGO的small,绯空的卜卜猪,还有算上我吧(死。同样是使用SSA Pawaa xD~,但是效果方面跟7X3还是有一定的差距,思茅可能是因为怕卡所以也没有使用华丽的特效,不过他能把SSA Pawaa xD~山寨成自己的small_code,并且解决了生成中文乱码之类的问题。

      后面就是思茅写的small_code,使用方法完全跟SSA Pawaa xD~一样,就不具体介绍了。

      再来就是milkyjing写的milkyjing.pyc,没有拿到过,所以不知道长什么样。但是那就是牛奶看SSA Pawaa xD~晕了以后的产物,都是使用Python的,大概也就长那样了。不过牛奶实现了边框的点凑字。牛奶还写了TCSub,就是套用别人写了的效果,但是这就没有特效制作的乐趣了,我是这么认为了,大概后面也坑了吧。不过牛奶还是EP写了tcxCore,那个大概是抛弃VSFilter的产物,基本已经成形,不过没看见有人使用,GUI也坑那里了。
http://code.google.com/p/tcxcore

      最后我提的就是MeteorX用C#写的MeteorX.AssTools,使用的话需要首先掌握C#。XX是使用ASS制作光效最好的,而且作品以华丽的效果让人折服。XX大概也是第一个用1M以内的ASS爆掉VSFilter的人,当然也有至今为止用于正常效果而制作的最大ASS。

      上面所提到的都是一些ASS特效制作方面的工具,还有一些像combo_k写的我不知道叫啥也没有接触过(拖,Cysub,MexFX我不了解就不做介绍了,有兴趣的同学可以自己查找资料。AE我也不介绍了,据小艾说比较好用的脚本是KAK。

      不使用ASS的工具有jfs的OverLua,Youka正在写的FLuaG。OverLua是Lua + Cairo的产物,可以制作一些超越EP的效果,不过使用要求也相对比较高,相对的效果也是我看到过最好的。不过除了jfs写的Gundam00的特效,其他估计他没怎么花时间跟精力去制作,看上去不像jfs写出来的效果。FLuaG(Floating Lua Graphics) = Avisynth + Lua + OpenGL (+ WinGDI)基本已经写的差不多了,使用了GPU,实现了3D效果,不过3D怎么也跟Animation搭不上边。
http://www.youtube.com/watch?v=NtwKdRZ1mBM
http://www.youtube.com/watch?v=jBQKdDen2Zs

      二、特效制作方面

      制作特效需要一份歌词的K值,这个用Aegisub可以完成。制作不准确的时间,我看上去比较明显,影响特效的美观性,所以K值的制作也不能忽视。至于教程,WLGO的Mystryl有录过一段视频:http://mystryl.cn/2009/01/wlgo%e ... %e8%af%ad%e9%9f%b3/

      在掌握了一只特效制作工具之后,可以按照自己的意愿制作效果,当然在制作过程中有一些需要注意的地方。
      句子之间的时间差要掌握好,尽量避免句子进入跟退出时重叠,否则影响特效的观赏性。这一点思茅跟曲奇做得很好,这样特效看上去就比较柔和。由于追求效果的EP,导致持续时间不够用,从而压缩句子间的时间差那也是没有办法的事。
      效果尽量跟画面去融合,这个只是个人的想法。结合整个画面做背景不把文字独立出来的话,就算特效不华丽,那也是完美之作。不过华丽的特效也是有可取之处的。如果可以结合音乐,那再好不过了。
      特效不宜占用画面过多的空间,造成特效重点,动画次要的感觉,得尽量避免污染画面。
      有些特效看上去就像文字挂在画面之上,特别是ASS特效,给人格格不入的感觉,就像是纯粹了玩文字罢了。所以做特效时要注意文字的柔化跟模糊。
      特效制作最重要的就是细心跟耐心,要能有N天都蹲在计算姬前制作一个效果的思想准备。不断的尝试怎样的效果才是自己希望得到的,如果想敷衍当然是很容易的事情,随便给个\t就是一个效果。看着自己花很久写出满意的效果,这就是特效制作特效最大的乐趣吧。
      特效还需要一定的想象能力,提取画面元素并能使用到文字中去。想法也是非常重要的,这个应该也是在会工具的前提下比较让人头疼的问题。工具毕竟只是工具,想法才是特效的灵魂。拿工具实现特效的过程是最快乐的,虽然实现过程并不是很容易的事情。所以少年啊,要热爱生活,从生活中寻找特效的灵感。于是在寻找灵感的过程中,渐渐淡忘特效。那不是人做的事,会花费很多的时间跟精力,好好享受生活才是最最最重要的。(啊嘞嘞,好像混进了奇怪的东西的说 的说
      以上只是个人的体会,当然带有个人的偏见,所以仅供参考。

      好吧,就写这么多,感觉歪了,像是在介绍特效制作工具。不过工具的使用才是特效制作的重点,如果连工具都不会用,谈什么特效制作。当然,最好的办法就是自己写工具,这样就能更深入的理解特效制作的过程。
1

查看全部评分

Super Moderator

{\clip\t(\clip)}∀.I.R.nesSub

Rank: 6Rank: 6

发表于 2012-8-8 01:16:40 |显示全部楼层
HOW TO LEARN MAKING KARAOKE
http://forum.aegisub.org/viewtopic.php?f=13&t=1566

[转载]如何学习制作卡拉OK特效
http://www.tcax.org/forum.php?mod=viewthread&tid=50

Super Moderator

{\clip\t(\clip)}∀.I.R.nesSub

Rank: 6Rank: 6

发表于 2012-8-8 01:56:34 |显示全部楼层
本帖最后由 BurySakura 于 2012-8-8 01:59 编辑

Overlay.jpg
  1. #Overlay test

  2. cb = colorbars(512, 384)

  3. bg = blankclip(cb, color=$FFFFFF)

  4. text = blankclip(cb).subtitle("人家才不会什么特效呢!哼~", x = 50, y = 235, size = 40,
  5. \          text_color=$ffffff)

  6. Overlay(bg, cb, mask = text)
复制代码
1

查看全部评分

Super Moderator

{\clip\t(\clip)}∀.I.R.nesSub

Rank: 6Rank: 6

发表于 2014-4-18 09:31:44 |显示全部楼层
  1.             #font_mask
  2.             
  3.             SYL_FON_VEC = vector_fonts(SYL_SCR_VAL, VAL_FON_FAC, SYL_FON_WID, FON_LEV_ADJ)

  4.             x_m = int(SYL_POS_LEV)<<6
  5.             y_m = int(SYL_POS_VER)<<6

  6.             ass_clip = move_vector(SYL_FON_VEC,x_m,y_m)

  7.             point = ['m']
  8.             
  9.             for i in range(20):
  10.                 x = randint(-25, 25)
  11.                 y = randint(-25, 25)
  12.                 point.append(str(x))
  13.                 point.append(str(y))
  14.                 if i == 0:
  15.                     point.append('l')

  16.             draw = ' '.join(point)

  17.             val_lay_num = 0
  18.             syl_str_tim = LIN_STR_TIM + CON_SYL_KAR * 5 - 30
  19.             syl_end_tim = LIN_END_TIM - 5*(NUM_SYL_KAR-1) + 5*CON_SYL_KAR + 30  
  20.             val_ass_tag = an(7)+pos(SYL_POS_LEV,SYL_POS_VER)+c1('B25478')+be(1)+p(1)\
  21.                           +clip(7,ass_clip)+fad(300,300)
  22.             syl_scr_val = draw

  23.             LIS_LIN_EVE = eve_line(val_lay_num, syl_str_tim, syl_end_tim, val_sty_nam, val_ass_tag, syl_scr_val, GER_SYL_SCR)
复制代码
嘛,我只是路过刷下存在感而已。
1

查看全部评分

Super Moderator

{\clip\t(\clip)}∀.I.R.nesSub

Rank: 6Rank: 6

发表于 2014-4-22 16:03:58 |显示全部楼层
本帖最后由 BurySakura 于 2014-4-22 16:09 编辑

  1.             SYL_FON_VEC = vector_fonts(SYL_SCR_VAL, VAL_FON_FAC, SYL_FON_WID, FON_LEV_ADJ)

  2.             x_m = int(SYL_POS_LEV)<<6
  3.             y_m = int(SYL_POS_VER)<<6

  4.             ass_clip = move_vector(SYL_FON_VEC,x_m,y_m)

  5.             point = ['m']
  6.             con = 6

  7.             for i in range(con*4):
  8.                
  9.                 if i%4 == 1:
  10.                     point.append('b')
  11.                 else:                    
  12.                     x = randint(-40, 40)
  13.                     y = randint(-40, 40)
  14.                     point.append(str(x))
  15.                     point.append(str(y))

  16.                     if i == 0:
  17.                         xt = x
  18.                         yt = y
  19.                     if i == con*4-1:
  20.                         x = xt
  21.                         y = yt
  22.                         point.append(str(x))
  23.                         point.append(str(y))                        
  24.                         
  25.             draw = ' '.join(point)

  26.             _ele = SYL_FON_VEC.split()
  27.             _mark = 0

  28.             for _i,_c in enumerate(_ele):
  29.                 if not _c in ['m','n','l','b','s','p','c']:
  30.                     if _mark == 0:
  31.                         x = int(_c)
  32.                         _ele[_i] = str(x+randint(-2<<6,2<<6))
  33.                         _mark = 1
  34.                     else:
  35.                         y   = int(_c)
  36.                         _ele[_i] = str(y+randint(-2<<6,2<<6))
  37.                         _mark = 0

  38.             SYL_FON_VEC_ = ' '.join(_ele)

  39.             x_m = int(SYL_POS_LEV)<<6
  40.             y_m = int(SYL_POS_VER)<<6

  41.             ass_clip_ = move_vector(SYL_FON_VEC_,x_m,y_m)

  42.             val_lay_num = 0
  43.             syl_str_tim = SYL_STR_TIM
  44.             syl_end_tim = SYL_END_TIM        
  45.             val_ass_tag = an(7)+pos(SYL_POS_LEV,SYL_POS_VER)+c1('420096')\
  46.                           +bord(1)+blur(2)+be(8)+shad(3)+fscxy(120)+p(7)
  47.             syl_scr_val = SYL_FON_VEC_
  48.             
  49.             LIS_LIN_EVE = eve_line(val_lay_num, syl_str_tim, syl_end_tim, val_sty_nam, val_ass_tag, syl_scr_val, GER_SYL_SCR)

  50.             val_lay_num = 0
  51.             syl_str_tim = SYL_STR_TIM
  52.             syl_end_tim = SYL_END_TIM
  53.             val_ass_tag = an(7)+pos(SYL_POS_LEV+0,SYL_POS_VER)+c1('FFFFFF')\
  54.                           +be(2)+p(1)+clip(7,ass_clip_)
  55.             syl_scr_val = draw
  56.             
  57.             LIS_LIN_EVE = eve_line(val_lay_num, syl_str_tim, syl_end_tim, val_sty_nam, val_ass_tag, syl_scr_val, GER_SYL_SCR)
复制代码

Super Moderator

{\clip\t(\clip)}∀.I.R.nesSub

Rank: 6Rank: 6

发表于 2014-5-6 13:04:19 |显示全部楼层
  1.             space = 16

  2.             x1 = SYL_POS_LEV - SYL_FON_WID / 2
  3.             y1 = SYL_POS_VER - SYL_FON_HEI / 2
  4.             x2 = x1
  5.             y2 = SYL_POS_VER + SYL_FON_HEI / 2
  6.             x3 = SYL_POS_LEV + SYL_FON_WID / 2
  7.             y3 = y2
  8.             x4 = x3
  9.             y4 = y1

  10.             if CON_SYL_KAR%4 == 0:
  11.                 x_1 = x2
  12.                 y_1 = y2
  13.                 x_2 = x4
  14.                 y_2 = y4
  15.                
  16.             if CON_SYL_KAR%4 == 2:
  17.                 x_1 = x1
  18.                 y_1 = y1
  19.                 x_2 = x3
  20.                 y_2 = y3

  21.             fx = x1 - space

  22.             fy = (y_2-y_1)/(x_2-x_1)*(fx-x_1)+y_1

  23.             _x1 = fx
  24.             _y1 = fy
  25.             _x2 = 2*SYL_POS_LEV-_x1
  26.             _y2 = _y1
  27.             _x3 = _x2
  28.             _y3 = 2*SYL_POS_VER-_y1
  29.             _x4 = _x1
  30.             _y4 = _y3

  31.             clip_piont = ['m', str(round(_x1)), str(round(_y1)),
  32.                           'l', str(round(_x2)), str(round(_y2)),
  33.                                str(round(_x3)), str(round(_y3))]
  34.             iclip_piont = ['m', str(round(_x1)), str(round(_y1)),
  35.                            'l', str(round(_x4)), str(round(_y4)),
  36.                                 str(round(_x3)), str(round(_y3))]
  37.             
  38.             _clip  = ' '.join(clip_piont)
  39.             _iclip = ' '.join(iclip_piont)            

  40.             distance = 4
  41.             
  42.             dy = SYL_POS_VER + distance
  43.             dx = (x_2-x_1)/(y_2-y_1)*(dy-y_1)+x_1

  44.             mx1 = SYL_POS_LEV
  45.             my1 = SYL_POS_VER
  46.             mx2 = dx
  47.             my2 = dy

  48.             t1 = kc
  49.             t2 = t1 + SYL_KAR_VAL*10
  50.             kc = t2

  51.             if CON_SYL_KAR%4 == 0:
  52.                 fx1 = pos(SYL_POS_LEV,SYL_POS_VER)+clip(_clip)+fad(0,300)
  53.                 fx2 = move(mx1,my1,mx2,my2,t2,t2+300)+clip(_iclip)+fad(0,300)
  54.                 lay1 = 0
  55.                 lay2 = 2
  56.                
  57.             if CON_SYL_KAR%4 == 2:
  58.                 fx1 = move(mx1,my1,mx2,my2,t2,t2+300)+clip(_clip)+fad(0,300)
  59.                 fx2 = pos(SYL_POS_LEV,SYL_POS_VER)+clip(_iclip)+fad(0,300)
  60.                 lay1 = 2
  61.                 lay2 = 0

  62.             c = random_color()#100,255,100,255,100,255)

  63.             val_lay_num = lay1
  64.             syl_str_tim = LIN_STR_TIM
  65.             syl_end_tim = SYL_END_TIM+30           
  66.             val_ass_tag = an(5)+blur(2)+be(2)+fx1
  67.             syl_scr_val = SYL_SCR_VAL

  68.             LIS_LIN_EVE = eve_line(val_lay_num, syl_str_tim, syl_end_tim, val_sty_nam, val_ass_tag, syl_scr_val, GER_SYL_SCR)
  69.                         
  70.             val_lay_num = lay2         
  71.             val_ass_tag = an(5)+blur(2)+be(2)+fx2
  72.             syl_scr_val = SYL_SCR_VAL

  73.             LIS_LIN_EVE = eve_line(val_lay_num, syl_str_tim, syl_end_tim, val_sty_nam, val_ass_tag, syl_scr_val, GER_SYL_SCR)

  74.             dx1 = x1 - space
  75.             dy1 = y1
  76.             dx2 = x3 + space
  77.             dy2 = y3

  78.             if CON_SYL_KAR%4 == 0:
  79.                 dmx1 = round(x2-space, 5)
  80.                 dmy1 = round(y2, 5)
  81.                 dmx2 = round(x4+space, 5)
  82.                 dmy2 = round(y4, 5)
  83.             if CON_SYL_KAR%4 == 2:
  84.                 dmx1 = round(x1-space, 5)
  85.                 dmy1 = round(y1, 5)
  86.                 dmx2 = round(x3+space, 5)
  87.                 dmy2 = round(y3, 5)
  88.                
  89.             dfr = round(math.atan((dmy2-dmy1)/(dmx2-dmx1))*180/math.pi, 5)
  90.             
  91.             val_lay_num = 1
  92.             syl_str_tim = SYL_STR_TIM
  93.             syl_end_tim = SYL_END_TIM+30           
  94.             val_ass_tag = an(7)+p(1)+move(dmx1,dmy1,dmx2,dmy2,0,SYL_KAR_VAL*10)+c1('3F5579')+c3('FFFFFF')\
  95.                           +clip(dx1,dy1,dx2,dy2)+be(2)+blur(2)+fr(-dfr)+fad(0,300)+a1(50)
  96.             syl_scr_val = 'm 0 0 b -9 8 -17 13 -23 14 b -27 15 -33 16 -36 16 b -37 16 -37 15 -37 14 b -35 13 -35 12 -34 9 b -26 8 -26 4 -36 4 l -500 4 l -500 -4 l -36 -4 b -26 -4 -26 -8 -34 -9 b -35 -13 -35 -14 -37 -14 b -37 -15 -37 -16 -36 -16 b -33 -16 -27 -15 -23 -14 b -17 -13 -9 -8 0 0'

  97.             ass_clip = move_vector(syl_scr_val,40,0)
  98.             
  99.             LIS_LIN_EVE = eve_line(val_lay_num, syl_str_tim, syl_end_tim, val_sty_nam, val_ass_tag, ass_clip, GER_SYL_SCR)
复制代码
1

查看全部评分

Rank: 4

发表于 2016-6-1 22:18:10 |显示全部楼层
好复杂

Rank: 4

发表于 2022-2-6 21:25:35 |显示全部楼层
BurySakura 发表于 2014-5-6 13:04

替身使者:白金之星!
您需要登录后才可以回帖 登录 | 新人加入

GitHub|TCAX 主页

GMT+8, 2024-3-29 23:45

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部
RealH