Youka
4th December 2012, 01:27
I'm planning to develop a new subtitle render filter + format as alternative to VSFilter (http://en.wikipedia.org/wiki/DirectVobSub) and ASS (http://en.wikipedia.org/wiki/SubStation_Alpha#Advanced_SubStation_Alpha), but focused on typesetting.
Main advantage should be a better choice of more powerful styling tags (http://aegisub.cellosoft.com/docs/ASS_Tags), so simple 3D rendering, gradients and animations by math expressions should be possible too.
The filter should support plugin interfaces for DShow, VDub and AviSynth, be able to render softsub (so it should be very fast) and make subbing more enjoyable.
Currently my blueprint for a new format looks like that:
#META
Title: Test
Author: Youka
Version: 1
Description: Hello world!
#DESTINATION
Width: 800
Height: 600
Depth: 1000
View: orthogonal
#STYLES
MyShape: [border=2;join=miter;color=00FF00,00FF00,00FFFF,00FFFF;mode=lines]
Simple: [font=Times New Roman;size=80.5;bold=n;underline=y;position=200.5,-6.125,-30.5;alignment=0.5,0.5;space=0,-10]
Advanced: [Simple;translate-x=50;matrix=1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1;border=2;color=FFFF00;alpha=A0;blend=add;blur-v=4;(500,-1000,sin(t*_pi),position=0,300.25&color=0000FF);(balpha=00)]
#SOURCE
//I'm a comment!
0-8.0|MyShape|Just some lines|0 0 100.5 100 200 -20.25 200 200
10.0-1:25.0|Advanced||ひらがな\n [italic=y]Ähm
Styling tags are planned as...
font
size
bold
italic
underline
strikeout
language
position
alignment
margin
direction
space
rotate
scale
translate
shear
matrix
reset
mode
border
join
deform
color
bcolor
alpha
balpha
texture
texfill
stencil
blend
blur
kdur
kset
keff
(animation)
-----------------------
font="Arial"
size=30.0
bold=n
italic=n
underline=n
strikeout=n
language=en_US
position=0.0,0.0
position=0.0,0.0,0.0
alignment=7
alignment=0.0,0.0
margin=0.0
margin=0.0,0.0,0.0,0.0
margin-top=0.0
margin-right=0.0
margin-bottom=0.0
margin-left=0.0
direction=0.0
space=0.0
space=0.0,0.0
space-h=0.0
space-v=0.0
rotate=0.0,0.0,0.0
rotate-x=0.0
rotate-y=0.0
rotate-z=0.0
scale=0.0,0.0
scale-x=0.0
scale-y=0.0
translate=0.0,0.0,0.0
translate-x=0.0
translate-y=0.0
translate-z=0.0
shear=0.0,0.0
shear-x=0.0
shear-y=0.0
matrix=0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
reset
mode=text
border=0.0
join=round
deform=
color=FFFFFF
color=FFFFFF,FFFFFF,FFFFFF,FFFFFF
bcolor=FFFFFF
bcolor=FFFFFF,FFFFFF,FFFFFF,FFFFFF
alpha=FF
alpha=FF,FF,FF,FF
balpha=FF
balpha=FF,FF,FF,FF
texture=
texfill=0.0,0.0,1.0,1.0
texfill=0.0,0.0,1.0,1.0,clamp
stencil=clear
blend=normal
blur=0.0
blur=0.0,0.0
blur-h=0.0
blur-v=0.0
kdur=0
kset=0
keff=FF0000
(position=100,0)
(sin(t*_pi),position=100,0)
(1000,-1000,position=100,0)
(1000,-1000,sin(t*_pi),position=100,0)
For the beginning, colorspace RGB24/32 should be supported, other colorspaces and VFR (http://en.wikipedia.org/wiki/Variable_frame_rate) follows.
Now i'm asking me how to render 2D + 3D to memory (directly) in a fast way. Currently i tend to D2D(+DWrite for complex scripting) & DX11, but that means no support for WinXP anymore.
I hope for constructive criticism and suggestions (and maybe contributors later). Thanks for your attention and time to read this.
Main advantage should be a better choice of more powerful styling tags (http://aegisub.cellosoft.com/docs/ASS_Tags), so simple 3D rendering, gradients and animations by math expressions should be possible too.
The filter should support plugin interfaces for DShow, VDub and AviSynth, be able to render softsub (so it should be very fast) and make subbing more enjoyable.
Currently my blueprint for a new format looks like that:
#META
Title: Test
Author: Youka
Version: 1
Description: Hello world!
#DESTINATION
Width: 800
Height: 600
Depth: 1000
View: orthogonal
#STYLES
MyShape: [border=2;join=miter;color=00FF00,00FF00,00FFFF,00FFFF;mode=lines]
Simple: [font=Times New Roman;size=80.5;bold=n;underline=y;position=200.5,-6.125,-30.5;alignment=0.5,0.5;space=0,-10]
Advanced: [Simple;translate-x=50;matrix=1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1;border=2;color=FFFF00;alpha=A0;blend=add;blur-v=4;(500,-1000,sin(t*_pi),position=0,300.25&color=0000FF);(balpha=00)]
#SOURCE
//I'm a comment!
0-8.0|MyShape|Just some lines|0 0 100.5 100 200 -20.25 200 200
10.0-1:25.0|Advanced||ひらがな\n [italic=y]Ähm
Styling tags are planned as...
font
size
bold
italic
underline
strikeout
language
position
alignment
margin
direction
space
rotate
scale
translate
shear
matrix
reset
mode
border
join
deform
color
bcolor
alpha
balpha
texture
texfill
stencil
blend
blur
kdur
kset
keff
(animation)
-----------------------
font="Arial"
size=30.0
bold=n
italic=n
underline=n
strikeout=n
language=en_US
position=0.0,0.0
position=0.0,0.0,0.0
alignment=7
alignment=0.0,0.0
margin=0.0
margin=0.0,0.0,0.0,0.0
margin-top=0.0
margin-right=0.0
margin-bottom=0.0
margin-left=0.0
direction=0.0
space=0.0
space=0.0,0.0
space-h=0.0
space-v=0.0
rotate=0.0,0.0,0.0
rotate-x=0.0
rotate-y=0.0
rotate-z=0.0
scale=0.0,0.0
scale-x=0.0
scale-y=0.0
translate=0.0,0.0,0.0
translate-x=0.0
translate-y=0.0
translate-z=0.0
shear=0.0,0.0
shear-x=0.0
shear-y=0.0
matrix=0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
reset
mode=text
border=0.0
join=round
deform=
color=FFFFFF
color=FFFFFF,FFFFFF,FFFFFF,FFFFFF
bcolor=FFFFFF
bcolor=FFFFFF,FFFFFF,FFFFFF,FFFFFF
alpha=FF
alpha=FF,FF,FF,FF
balpha=FF
balpha=FF,FF,FF,FF
texture=
texfill=0.0,0.0,1.0,1.0
texfill=0.0,0.0,1.0,1.0,clamp
stencil=clear
blend=normal
blur=0.0
blur=0.0,0.0
blur-h=0.0
blur-v=0.0
kdur=0
kset=0
keff=FF0000
(position=100,0)
(sin(t*_pi),position=100,0)
(1000,-1000,position=100,0)
(1000,-1000,sin(t*_pi),position=100,0)
For the beginning, colorspace RGB24/32 should be supported, other colorspaces and VFR (http://en.wikipedia.org/wiki/Variable_frame_rate) follows.
Now i'm asking me how to render 2D + 3D to memory (directly) in a fast way. Currently i tend to D2D(+DWrite for complex scripting) & DX11, but that means no support for WinXP anymore.
I hope for constructive criticism and suggestions (and maybe contributors later). Thanks for your attention and time to read this.