Post subject: No anti-aliasing for subtitles?
GabCM
He/Him
Joined: 5/5/2009
Posts: 901
Location: QC, Canada
I'm working on a new animated encoding logo, based on the beginning of a level in Mega Man 2. It's all being made in AviSynth. It's supposed to be NES-style. That means I'm using an old-school arcade font. However, when I use the Subtitle function, it's anti-aliased, and it ruins my goal. Is there a parameter or another function to keep my text sharp, without any smoothing? Sorry if my question is stupid. :P
sgrunt
He/Him
Emulator Coder, Former player
Joined: 10/28/2007
Posts: 1360
Location: The dark horror in the back of your mind
According to this, Subtitle() is inherently anti-aliasing. Are you thinking of subtitles for the logo itself, or something else? If it's just for the logo and won't be changing, you could use an image editor to produce a still frame of the relevant anti-aliased text and Overlay() it on top of your logo.
GabCM
He/Him
Joined: 5/5/2009
Posts: 901
Location: QC, Canada
sgrunt wrote:
Are you thinking of subtitles for the logo itself, or something else? If it's just for the logo and won't be changing, you could use an image editor to produce a still frame of the relevant anti-aliased text and Overlay() it on top of your logo.
These subs are only for the logo. Also, I've tried Overlay on some transparent picture, and it adds black around it. I don't want this. So, I've just taken a second look at the Overlay function. Looks like the Mask parameter would do it.
Player (66)
Joined: 4/21/2011
Posts: 232
You could trying something like this. You'd have to play around with font/size to find something you like. (you could do some pointresizing if you want it even blockier.)
src=clip

blankclip(src)
subtitle("hello world!",halo_color=$FF000000,text_color=$00FFFFFF,align=5,\
font="Fixedsys",size=24)
mask=levels(0,1,1,0,255)

layer(src,mask.mask(mask))
#this will let you change the color of the text. layer(src, blankclip(src,color=$00FFFF).mask(mask)) #adjusting the 127/128 values will change how much of the antialiasing it keeps. mask=levels(127,1,128,0,255) #using this will give less smooth anti-aliasing mask=levels(0,1,192,0,3).levels(0,1,3,0,255)
Player (138)
Joined: 9/18/2007
Posts: 389
Mister Epic wrote:
I've tried Overlay on some transparent picture, and it adds black around it.
Use a black image with white text on it, but be sure to disable anti-alias in your graphics program. Gimp and even the newest mspaint use anti-aliased text by default... You'll have to use exactly the right font size, otherwise this will look quite horrible. Or maybe use a very small font size, and afterwards pointresize() the whole image. Then you can use the idea from nanoglyth and use
layer(src, subtitleimageclip.mask(subtitleimageclip)