can right to left effect of \k be done?

Discuss and get help for karaoke effect creation here

can right to left effect of \k be done?

Unread postby Rashwan81 » Tue May 14, 2013 11:36 am

Hello guys;
Is there any way to make \k effect to be right to left for right to left languages?
Rashwan81
Comic Sans MS
Comic Sans MS
 
Posts: 3
Joined: Tue May 14, 2013 11:30 am

Re: can right to left effect of \k be done?

Unread postby jfs » Tue May 14, 2013 7:28 pm

Not in a simple way.
The way the ASS format is implemented, and that is not something we have the power to change, it assumes that text can only ever go from left to right. That assumption is used everywhere in the rendering code in VSFilter, it simply can't be changed without breaking everything.

The main thing to making the effect would be having an effect script that re-orders the line, by positioning the syllables from right to left. It's doable, but it also means implementing a good part of the Unicode bi-directional text algorithm in Lua.

Another thing is making sure the effects applied then also follow the reading direction. For most types of effects that might actually be doable by pretending the right edge of the syllable is actually the left edge, and giving it a negative width, but in other cases it will require special handling.
For instance, the stock \kf effect will still go from left to right in screen coordinates. That happens even if you have rotated the text. (Try it yourself: {\frz120\kf100\fs50\an5}Test! -- put that on a line, play it, and notice how the gradual fill completely disregards the rotation.)
Do not PM me asking for help with Aegisub, Automation, karaoke or anything like that, I won't reply.
Ask your questions in the public forums. Use the Search function, somebody probably asked the same question before.
All rights reserved to call you insults if you ask poorly thought out or redundant questions.
Experimenting is free and is a great way to learn things.
User avatar
jfs
Developer
 
Posts: 2994
Joined: Mon Dec 19, 2005 8:18 pm
Location: Denmark

Re: can right to left effect of \k be done?

Unread postby HiddenS » Wed May 15, 2013 5:33 am

I was just wondering. Wouldn't it be possible to make it render a style differently depending on the encoding selected?
@Rashwan81: I use \pos(!$lright+($lleft-$scenter)!,$smiddle) and it works just fine when doing right to left. I hope you get the idea
User avatar
HiddenS
{\clip\t(\clip)}
{\clip\t(\clip)}
 
Posts: 209
Joined: Tue Jan 11, 2011 4:13 am

Re: can right to left effect of \k be done?

Unread postby Rashwan81 » Wed May 15, 2013 8:53 pm

Thanks for the replies, they were really useful, I do appreciate them
Rashwan81
Comic Sans MS
Comic Sans MS
 
Posts: 3
Joined: Tue May 14, 2013 11:30 am

Re: can right to left effect of \k be done?

Unread postby HiddenS » Wed May 15, 2013 9:56 pm

What language are you trying make karaoke in?
User avatar
HiddenS
{\clip\t(\clip)}
{\clip\t(\clip)}
 
Posts: 209
Joined: Tue Jan 11, 2011 4:13 am

Re: can right to left effect of \k be done?

Unread postby Rashwan81 » Thu May 16, 2013 7:22 am

I try to use Kurdish language with Arabic characters.
Rashwan81
Comic Sans MS
Comic Sans MS
 
Posts: 3
Joined: Tue May 14, 2013 11:30 am

Re: can right to left effect of \k be done?

Unread postby HiddenS » Thu May 16, 2013 7:02 pm

Ok so what you want to do if you're trying to make timed karaoke is that you use the kara timmer and separate the syllables then use SHIT + P at the beginning if the end needs to be sticking to another letter and at the end if the first letter is sticking to another letter.

It would look like something like this:
(if you can't see the whole image click here)
Image

Now I'm not sure if the arabic keyboard has the same function with the same keys but it should have the function for making letters into half letters. Also in case you don't know "SHIFT + SPACE" is a imaginary space so you can put between words like:
می‌تونی
instead of
میتونی or می تونی
note that in the second one there is a big space between می and تونی

A few tips:
* For Persian letter based languages, the downside is that you can't put a lot of borders or a border that has too much contrast with the primary color because it will look weird when you do karaoke
* Another downside is that you can't use per character effects because it will mess up everything and there is no way around it.

I hope that was helpful and understandable cuz I work with Persian language and not arabic or kurdish. If you don't understand anything, let me know and I'll try to explain more.
User avatar
HiddenS
{\clip\t(\clip)}
{\clip\t(\clip)}
 
Posts: 209
Joined: Tue Jan 11, 2011 4:13 am

Re: can right to left effect of \k be done?

Unread postby jfs » Mon May 20, 2013 6:56 am

HiddenS, for the border thing, I assume you mean that the borders of neighboring letters overlap when they are positioned as individual lines.
One thing you can do for that, which arguably is a lot of work, is make each effect twice, one that shows just border and one that shows just fill, and place them on separate layers. That will avoid the overlap, although it can give other headaches of its own.
Do not PM me asking for help with Aegisub, Automation, karaoke or anything like that, I won't reply.
Ask your questions in the public forums. Use the Search function, somebody probably asked the same question before.
All rights reserved to call you insults if you ask poorly thought out or redundant questions.
Experimenting is free and is a great way to learn things.
User avatar
jfs
Developer
 
Posts: 2994
Joined: Mon Dec 19, 2005 8:18 pm
Location: Denmark

Re: can right to left effect of \k be done?

Unread postby HiddenS » Mon May 20, 2013 7:58 pm

Oh true. That might work. I lub ur ideas :D
jfs wrote:HiddenS, for the border thing, I assume you mean that the borders of neighboring letters overlap when they are positioned as individual syllables.
One thing you can do for that, which arguably is a lot of work, is make each effect twice, one that shows just border and one that shows just fill, and place them on separate layers. That will avoid the overlap, although it can give other headaches of its own.


Here is an example of my recent work
http://www.youtube.com/watch?v=LZolKpRerxc
even tho it's still not finished
User avatar
HiddenS
{\clip\t(\clip)}
{\clip\t(\clip)}
 
Posts: 209
Joined: Tue Jan 11, 2011 4:13 am

Re: can right to left effect of \k be done?

Unread postby FloriaN » Wed May 22, 2013 2:04 am

HiddenS wrote:Oh true. That might work. I lub ur ideas :D
jfs wrote:HiddenS, for the border thing, I assume you mean that the borders of neighboring letters overlap when they are positioned as individual syllables.
One thing you can do for that, which arguably is a lot of work, is make each effect twice, one that shows just border and one that shows just fill, and place them on separate layers. That will avoid the overlap, although it can give other headaches of its own.


Here is an example of my recent work
http://www.youtube.com/watch?v=LZolKpRerxc
even tho it's still not finished
very nice effects. You said earlier per Char stuff wouldn't work, why? I mean i haven't tried it yet but i don't see how it would be a problem technically. (unless it's cause of the foreign language/letters)
FloriaN
{\b1}
{\b1}
 
Posts: 11
Joined: Sat Jun 12, 2010 4:46 am

Re: can right to left effect of \k be done?

Unread postby HiddenS » Wed May 22, 2013 7:08 am

This is kinda hard to explain but I'll do my best.
So in Persian based languages (Just to clear things out, I'm saying "Persian based" because it should be said that way instead of what people usually say which is "Arabic based" because Persian has the same letters than Arabic but with 4 more letters so technically makes it superior and Persian language is way older than Arabic so it's obvious which should be said.) letters have two shapes.

1. Separate
2. When they stick to another letter

Let's try something. Here is a word:

می‌توانم

This word consists of 4 syllables which are
می/ت/وا/نم
Now you can notice that when I separate the letter ت from the other letters it has a different shape right? The first problem when making different syllables is that when you try to use karaoke timer, you have to manually go back after you timed and apply the "SHIT+P" function to the correct point to make the letter into the 2nd form (like this: می/ت‍ / وا /نم) because when you assign syllables to a word in the karaoke timer it can only output the first form of the letters. It cannot recognize when it has to use 2nd form so it always assumes the first one when separating two letters. I won't explain why because it takes more time.

So as I said, when the program separates two letters from each other it cannot recognize if they should be outputed in the 2nd form or the first form which creates all the problems. This can be solved for syllables because the program just has to grab whatever is written in that syllable and reapply it in the output but when using characters it has to find the input and output itself which doesn't work.

Simply put:
If I use char template it will look like this:
Image

When I has to look like this:
Image

As I said, there is no work around for this from my point of view. Cuz you can't separate each letter into a different syllable and correct them for their form so the program can grab the right input.

I hope that was not long and hard to understand.
User avatar
HiddenS
{\clip\t(\clip)}
{\clip\t(\clip)}
 
Posts: 209
Joined: Tue Jan 11, 2011 4:13 am

Re: can right to left effect of \k be done?

Unread postby FloriaN » Thu May 23, 2013 3:12 pm

So to sum it up the word/letters is written differently when attached to another word/letter as compared to when its seperate.

Could you give me a example .ass with 2 lines (1 where its seperated and 1 where its correct), feel like playing around a bit with it hehe.
FloriaN
{\b1}
{\b1}
 
Posts: 11
Joined: Sat Jun 12, 2010 4:46 am

Re: can right to left effect of \k be done?

Unread postby HiddenS » Thu May 23, 2013 5:17 pm

I'm not sure if this is what you meant but in this file the first line is the original one, the second line has the syllables but it's not corrected using the SHIT+P function and 3rd line is the corrected version. Also included some Farsi fonts for you.
or you can download from here:
http://www.ufont.ir/category/font/font-farsi/nastaliq/

PS: Do you want one of my effects to work with? If it makes it easier for you, I can give u an effect I already made for Persian language. (Basically, all you need to do is use the right positioning for syllables. I've heard there is a lua for arabic templates but I've never tried it)
Attachments
fonts.zip
(164.15 KiB) Downloaded 214 times
File.ass
(1.32 KiB) Downloaded 249 times
User avatar
HiddenS
{\clip\t(\clip)}
{\clip\t(\clip)}
 
Posts: 209
Joined: Tue Jan 11, 2011 4:13 am

Re: can right to left effect of \k be done?

Unread postby FloriaN » Thu May 23, 2013 10:08 pm

HiddenS wrote:I'm not sure if this is what you meant but in this file the first line is the original one, the second line has the syllables but it's not corrected using the SHIT+P function and 3rd line is the corrected version. Also included some Farsi fonts for you.
or you can download from here:
http://www.ufont.ir/category/font/font-farsi/nastaliq/

PS: Do you want one of my effects to work with? If it makes it easier for you, I can give u an effect I already made for Persian language. (Basically, all you need to do is use the right positioning for syllables. I've heard there is a lua for arabic templates but I've never tried it)
Sure, an effect would be cool too. Thanks very much ^^
FloriaN
{\b1}
{\b1}
 
Posts: 11
Joined: Sat Jun 12, 2010 4:46 am

Re: can right to left effect of \k be done?

Unread postby HiddenS » Thu May 23, 2013 11:04 pm

Here you go.
Attachments
File.ass
(3.13 KiB) Downloaded 264 times
User avatar
HiddenS
{\clip\t(\clip)}
{\clip\t(\clip)}
 
Posts: 209
Joined: Tue Jan 11, 2011 4:13 am


Return to Karaoke

Who is online

Users browsing this forum: No registered users and 1 guest

cron