Help with trans changing color

Discuss and get help for karaoke effect creation here

Help with trans changing color

Unread postby NoB » Sat Jan 21, 2017 3:23 am

Hello guys, I'm trying to do my karaoke script for translation function as the original karaoke, more specifically on the color change, but change is not being made by only gradually, but, character-by-character only. How do I get the color change all at once?

In my romaji the change is made as instant:
Image

But, in trans code the change is not made in the same way:
Image

Trans code:
Code: Select all
Comment: 0,0:00:00.00,0:00:00.00,Default,,0,0,0,code line all,count={0};
Comment: 0,0:00:00.00,0:00:00.00,Default,,0,0,0,code once,function inc() count[1]=count[1]+1; return "" end
Comment: 2,0:00:00.00,0:00:00.00,Default,,0,0,0,template char,!retime("line",20*count[1]-400,20*count[1]-100)!!inc()!{\an5\org(!$scenter-10!,!$smiddle-10!)\fad(0,300)\move(!$scenter+100+math.random(-30,30)!,!$smiddle+math.random(-30,30)!,$scenter,$smiddle,0,300)\1vc(&H1E81FE&,&H1E81FE&,&H706764&,&H706764&)\t(550,551,\1vc(&HF6E4FF&,&HF6E4FF&,&H8F0ECC&,&H8F0ECC&))}
Comment: 0,0:00:24.46,0:00:27.28,Default,,0,0,0,karaoke,Quando percebi, eu já estava longe demais


I appreciate any help.
NoB
{\b1}
{\b1}
 
Posts: 16
Joined: Fri Sep 11, 2015 4:48 am

Re: Help with trans changing color

Unread postby zahj » Sat Jan 21, 2017 12:55 pm

Comment: 2,0:00:00.00,0:00:00.00,Default,,0,0,0,template char,!retime("line",20*count[1]-400,20*count[1]-100)

The start time is the problem. This works for the "composing" effect you're using (the letters move one by one to their position), but this brings the color to change gradually (just like the letters' move). This happens everytime you put a moltiplication and a non-static variable together in the start time calculus, like "($si-1)*30" or "count[1]*20". To fix this problem I suggest you to split it in 3 templates:
1) the first one keeps the "composing" effect but vanishes as soon as the letters reach their position
2) the second one appears as soon as the previous one vanishes, it has a static position (so "\pos" tag and not "\move") and changes its color (so you don't need to use a moltiplication as start time).
3) the third one needs to reproduce the gradually disappearing of the letters, so you need to put "20*count[1]-100" as ending time and paste the actual outro effect of the template (so "\move" and "\fad" tags).
You should fix it like this.
User avatar
zahj
{\b1}
{\b1}
 
Posts: 7
Joined: Wed Sep 28, 2016 8:21 pm

Re: Help with trans changing color

Unread postby NoB » Sat Jan 21, 2017 1:40 pm

zahj wrote:
Comment: 2,0:00:00.00,0:00:00.00,Default,,0,0,0,template char,!retime("line",20*count[1]-400,20*count[1]-100)

The start time is the problem. This works for the "composing" effect you're using (the letters move one by one to their position), but this brings the color to change gradually (just like the letters' move). This happens everytime you put a moltiplication and a non-static variable together in the start time calculus, like "($si-1)*30" or "count[1]*20". To fix this problem I suggest you to split it in 3 templates:
1) the first one keeps the "composing" effect but vanishes as soon as the letters reach their position
2) the second one appears as soon as the previous one vanishes, it has a static position (so "\pos" tag and not "\move") and changes its color (so you don't need to use a moltiplication as start time).
3) the third one needs to reproduce the gradually disappearing of the letters, so you need to put "20*count[1]-100" as ending time and paste the actual outro effect of the template (so "\move" and "\fad" tags).
You should fix it like this.


Splitting in pre-line and line? I tried that way but not worked.
NoB
{\b1}
{\b1}
 
Posts: 16
Joined: Fri Sep 11, 2015 4:48 am

Re: Help with trans changing color

Unread postby pyointa2001 » Sun Jan 22, 2017 9:57 am

Code: Select all
Comment: 2,0:00:00.00,0:00:00.00,Default,,0,0,0,template char,!retime("preline",syl.center-line.width-300,0)!{\an5\org(!$scenter-10!,!$smiddle-10!)\move(!$scenter+100+math.random(-30,30)!,!$smiddle+math.random(-30,30)!,$scenter,$smiddle,0,300)\1vc(&H1E81FE&,&H1E81FE&,&H706764&,&H706764&)}
Comment: 0,0:00:00.00,0:00:00.00,Default,,0,0,0,template char,!retime("line",0,-line.width)!{\an5\pos($center,$middle)\1vc(&H1E81FE&,&H1E81FE&,&H706764&,&H706764&)\t(550,551,\1vc(&HF6E4FF&,&HF6E4FF&,&H8F0ECC&,&H8F0ECC&))}
Comment: 0,0:00:00.00,0:00:00.00,Default,,0,0,0,template char,!retime("postline",-line.width,syl.center+300)!{\an5\pos($center,$middle)\1vc(&HF6E4FF&,&HF6E4FF&,&H8F0ECC&,&H8F0ECC&)\fad(0,300)}
Comment: 0,0:00:24.46,0:00:27.28,Default,,0,0,0,karaoke,Quando percebi, eu já estava longe demais
pyointa2001
{\b1}
{\b1}
 
Posts: 19
Joined: Sat Apr 06, 2013 11:30 pm

Re: Help with trans changing color

Unread postby NoB » Sun Jan 22, 2017 5:49 pm

pyointa2001 wrote:
Code: Select all
Comment: 2,0:00:00.00,0:00:00.00,Default,,0,0,0,template char,!retime("preline",syl.center-line.width-300,0)!{\an5\org(!$scenter-10!,!$smiddle-10!)\move(!$scenter+100+math.random(-30,30)!,!$smiddle+math.random(-30,30)!,$scenter,$smiddle,0,300)\1vc(&H1E81FE&,&H1E81FE&,&H706764&,&H706764&)}
Comment: 0,0:00:00.00,0:00:00.00,Default,,0,0,0,template char,!retime("line",0,-line.width)!{\an5\pos($center,$middle)\1vc(&H1E81FE&,&H1E81FE&,&H706764&,&H706764&)\t(550,551,\1vc(&HF6E4FF&,&HF6E4FF&,&H8F0ECC&,&H8F0ECC&))}
Comment: 0,0:00:00.00,0:00:00.00,Default,,0,0,0,template char,!retime("postline",-line.width,syl.center+300)!{\an5\pos($center,$middle)\1vc(&HF6E4FF&,&HF6E4FF&,&H8F0ECC&,&H8F0ECC&)\fad(0,300)}
Comment: 0,0:00:24.46,0:00:27.28,Default,,0,0,0,karaoke,Quando percebi, eu já estava longe demais

Thanks pyointa2001, it worked perfectly!
NoB
{\b1}
{\b1}
 
Posts: 16
Joined: Fri Sep 11, 2015 4:48 am


Return to Karaoke

Who is online

Users browsing this forum: No registered users and 1 guest