DgrayGT

Karaoker Aegisubs

Efecto Shine Para Template

Anteriormente habia colocado un .lua para hacer un efecto "shine" con AssPen o como ahora se llama NyuFx pero pues no era tan bueno como algunos quisieran, pues entonces esta forma creo que tiene unas cuantas cosas a tomar en cuenta pero es mas facil de trabajar y de encodear aparte que se puede usar con cualquier metodo, Script Lua,Template,NyuFx etc bueno en fin aca el codigo:


function Get_Shine(length,strength,scale,x,y,mode1,mode2,time1,time2)
     if not mode2 then
          setmod = "pos"
          else
          setmod = "move"
     end
         maxloop(length) set_a = _G.ass_alpha(math.ceil((strength*0.01)*255))
          int_alpha = _G.interpolate_alpha(j/maxj , set_a , "&HFF&" )
          x_size,y_size = 100+(j*scale) , 100+(j*scale)
         tsh1,tsh2 = 0+(j-1)*2 , 0+(j)*2
          -- MODE 1--
         if mode1 == 1 then
             x_pos,y_pos = x-(j-1) , y+(j-1)
             elseif mode1 == 2 then
                 x_pos,y_pos = x , y+(j-1)
         end
         if mode1 == 3 then
             x_pos,y_pos = x+(j-1) , y+(j-1)
             elseif mode1 == 4 then
                 x_pos,y_pos = x-(j-1) , y
         end
         if mode1 == 5 then
             x_pos,y_pos = x , y
             elseif mode1 == 6 then
             x_pos,y_pos = x+(j-1) , y
         end
         if mode1 == 7 then
             x_pos,y_pos = x-(j-1) , y-(j-1)
             elseif mode1 == 8 then
                 x_pos,y_pos = x , y-(j-1)
         end
         if mode1 == 9 then
              x_pos,y_pos = x+(j-1) , y-(j-1)
         end
         --MODE 2--
         if mode2 == 1 then
             x_pos2,y_pos2 = x-(j-1) , y+(j-1)
             elseif mode2 == 2 then
                 x_pos2,y_pos2 = x , y+(j-1)
         end
         if mode2 == 3 then
             x_pos2,y_pos2 = x+(j-1) , y+(j-1)
             elseif mode2 == 4 then
                 x_pos2,y_pos2 = x-(j-1) , y
         end
         if mode2 == 5 then
             x_pos2,y_pos2 = x , y
             elseif mode2 == 6 then
                 x_pos2,y_pos2 = x+(j-1) , y
         end
         if mode2 == 7 then
             x_pos2,y_pos2 = x-(j-1) , y-(j-1)
             elseif mode2 == 8 then
                 x_pos2,y_pos2 = x , y-(j-1)
         end
         if mode2 == 9 then
              x_pos2,y_pos2 = x+(j-1) , y-(j-1)
         end
         if setmod == "pos" then
             intpos = x_pos..","..y_pos
             shine = "\\"..setmod.."("..intpos..")".."\\alpha&HFF&".."\\fscx"..x_size.."\\fscy"..y_size.."\\t("..tsh1..","..tsh2..",\\alpha"..int_alpha..")"
         elseif setmod == "move" then
             intpos = x_pos..","..y_pos..","..x_pos2..","..y_pos2
             shine = "\\"..setmod.."("..intpos..","..time1..","..time2..")".."\\alpha&HFF&".."\\fscx"..x_size.."\\fscy"..y_size.."\\t("..tsh1..","..tsh2..",\\alpha"..int_alpha..")"
         end
     return shine
end


EXPLICACION:

Get_Shine(length,strength,scale,x,y,mode1,mode2,time1,time2)

length: la longitud de los rayos, por pixeles desde 0 hasta su gusto xD
strength: es la fuerza de los rayos, en porcentaje de 0 hasta 100
Scale: es el tamaño final de los rayos, se usa para setear el angulo de los rayos respecto del origen. va de 0 hasta su gusto
X & Y: posiciones u origen de los rayos.
Mode1 & (OPCIONAL)Mode2: es para controlar los movimientos de los rayos si es que asi lo quisieramos es igual a la alineacion \an1-9, el mode 1 indica la posicion de los rayos inicialmente y el mode2 la posicion final. si no quieren movimiento solo se coloca mode1.
time1,time2: opciones para cuando usamos la opcion mode2 y da el tiempo que tardan los rayos en moverse de la posicion inicial a la final.

Okey eso es todo dejo un script para que vean como se usa y un video de ejemplo:
VIDEO
SCRIPT EJEMPLO

esta funcion fue idea de Youka creador de Nyufx, yo solo agregue mas codigo para hacer la vida mas facil.xD japi lish.

Efecto Con NyuFXTags Variables Para Template

Comments

AlexSkedgar Wednesday, October 20, 2010 11:39:29 PM

Uhhh!! Muy buen ejemplo XD! Ni se me paso por la mente eso xD!

Pd: Se agradece tu positivismo p

Luis ADgrayGT Thursday, October 21, 2010 7:56:05 PM

seee, ya hecho es mas sencillo que cualquier cosa xD

ALKOONalkoon Friday, November 5, 2010 12:41:40 PM

Woow.. it's really great Fx .. like it very much =D
waiting more =D
hmmm ... but can u make example script lua.4..^^
for this function

Luis ADgrayGT Tuesday, November 16, 2010 7:38:55 PM

Originally posted by alkoon:

but can u make example script lua.4..^^
for this function



mmm... i'll try to make it. xD

ALKOONalkoon Wednesday, November 17, 2010 5:04:02 AM

hmmm ... i think it's hard .. lol
anyway .. i just want use this function ( function GetVTags )
if u can conver it to lua.4 .. smile
i tryed it ... but the result was failing knockout

Write a comment

New comments have been disabled for this post.