-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathtypesetting_tutorial.ass
58 lines (56 loc) · 11.9 KB
/
typesetting_tutorial.ass
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
[Script Info]
; Script generated by Aegisub r5587M (development version, TheRyuu)
; http://www.aegisub.org/
Title: Default Aegisub file
ScriptType: v4.00+
WrapStyle: 0
PlayResX: 640
PlayResY: 480
ScaledBorderAndShadow: yes
Last Style Storage: Default
Video File: ?dummy:23.976000:40000:640:480:22:35:44:
Video Aspect Ratio: 0
Video Zoom: 8
Video Position: 1897
[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Style 1,Arial,30,&H00FFFFFF,&H000BFF00,&H00FF5052,&HA0000000,0,0,0,0,100,100,0,0,1,1.2,2,5,10,10,10,1
Style: Style 2,Times New Roman,30,&H003F61C2,&H000000FF,&H00FFFFFF,&H00000000,0,0,0,0,100,100,0,0,1,2,0,2,10,10,10,1
[Events]
Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
Dialogue: 0,0:00:00.00,0:00:02.00,Style 1,,0000,0000,0000,,This guide is made for 640x480 resolution.\NUse Dummy Video from the menu with that resolution.\N\NMost lines are static but some are animated, so you have to 'play' them.
Dialogue: 0,0:00:02.00,0:00:05.00,Style 1,,0000,0000,0000,,Typesetting basics:\N\NEach style and line has 4 colors associated with it:\N--Color 1 is the main text color\N--Color 2 is the color of unhighlighted karaoke\N--Color 3 is the outline color\N--Color 4 is the shadow color
Dialogue: 0,0:00:05.00,0:00:07.50,Style 1,,0000,0000,0000,,{\K25}You can change the colors from the style menu,\N{\K25}or in-line with override tags, like such:\N{\K50\1c&HFFF300&}\1c&HFFF300& (main color)\N{\K50\2c&H0000FF&}\2c&H0000FF& (karaoke color)\N{\K50\3c&HBF58B7&}\3c&HBF58B7& (outline color)\N{\K50\4c&HADFFFE&}\4c&HADFFFE& (shadow color)
Dialogue: 0,0:00:07.50,0:00:09.50,Style 1,,0000,0000,0000,,The color tags look confusing, but you can break them down like this:\N\Nslash + color number + "c" + "&H" + color code + "&".\N\NAll hex codes in Advanced Substation Alpha are surrounded by & signs and must start with an H. All override tags start with a slash.
Dialogue: 0,0:00:09.50,0:00:11.50,Style 1,,0000,0000,0000,,Override tags are NOT like HTML tags, where you must have open and closed tags surrounding what you want to modify.\N\NInstead, override tags do what their name implies: they override the default properties of the line, affecting all parts of the line that come after the tag.\N\NA \c&H00FF00& tag says {\c&H00FF00&}from this point on, the main text color is green. A \frz-5 tag says \N\N{\frz-5} from this point on, the text is rotated -5 degrees around the z axis. It's still green because of the previous tag.
Dialogue: 0,0:00:11.50,0:00:13.50,Style 1,,0000,0000,0000,,(note: for convenience, \c&H...& does the same thing as \1c&H...&. There are a handful of similar convenience tags)
Dialogue: 0,0:00:13.50,0:00:15.50,Style 1,,0000,0000,0000,,Get familiar with all the override tags including {\fscx200}x-deform, {\r\fscy200}y-deform, {\r\fs12}font size, {\r\fnTimes New Roman}font name, {\r\bord6}border and {\r\shad10}shadow size,\N\N\N{\r\frz-10}and the{\frx60}various {\frx10\frz10\fry50}rotations{\r}\N\N\NThere's also the {\be5\3c&H00FFFF&}edge blur{\r} tag, but higher values might lag the sub renderer.\N\N{\blur5}Blur with border {\bord0\blur2}or without it {\r}might lag some more.
Dialogue: 0,0:00:15.50,0:00:17.50,Style 1,,0000,0000,0000,,You notice in the previous line I used the \r tag. \r is a convenient way to reset the line to default style. You can also write \r[style name] to switch to all the parameters of a different style. For example, {\rStyle 2}\rStyle 2 {\r}\r\N\NSince {\i1}italicized text{\fscx130} {\r}sometimes "leans into" the next word, I like to put an extra space after the italicized text. I do this by expanding the space about 130% in the x-direction with \fscx130, and then canceling both the italics and the x distortion using \r
Dialogue: 0,0:00:17.50,0:00:19.50,Style 1,,0000,0000,0000,,Remember, don't write in tags that you don't need. For example, if an italicized word is at the end of the line, or if the entire line is italic, there's no need for an \i0 or \r at the end of the line.\N\NAs little difference as it may make, you should try to give the subtitle renderer less work when you can.\N\NOne extra \i0 may be no big deal, but when you have 20 lines of typesetting onscreen at once, that's when lag becomes a real danger.
Dialogue: 0,0:00:19.50,0:00:21.50,Style 1,,0000,0000,0000,,It's vital that you understand what the override tags mean when you read them in the script, but thankfully you don't have to write them yourself all the time. Aegisub has handy visual typesetting tools that let you choose the 4 colors using color selectors and let you position, rotate, scale, and move the text, right onscreen.
Dialogue: 0,0:00:21.50,0:00:23.50,Style 1,,0000,0000,0000,,{\fs20\pos(295,32)}<-Up here is the position tool. Simply double-click anywhere on screen to position the text there. When this tool is selected you can also obtain the coordinates of any part of the screen; very handy for other purposes.
Dialogue: 0,0:00:23.50,0:00:25.50,Style 1,,0000,0000,0000,,{\fs20\pos(225,43)}<-This is the drag tool, for fine-tuning your positioning. It also lets you move subtitles. More on that later.
Dialogue: 0,0:00:25.50,0:00:27.50,Style 1,,0000,0000,0000,,{\fs20\pos(204,143)}<-Here are your rotation tools. Just play around with them; they're easy to figure out.\N\N\N{\3c&H863E3F&}The 2nd one can mess things up though,\Nand anime isn't exactly 3D,\Nso most of the time you can use\N{\fax0.3}\fax {\fax0}and {\fay0.2}\fay instead.\N\N\N{\fay0\fs16\bord1}[They need very low values and also work with \Nnegative ones for the opposite direction.]
Dialogue: 0,0:00:27.50,0:00:29.50,Style 1,,0000,0000,0000,,{\fs20\pos(199,93)}<-This is the scale tool. Again, easy to figure out.
Dialogue: 0,0:00:29.50,0:00:31.50,Style 1,,0000,0000,0000,,{\fs20\pos(310,156)}<-These are the clip tools. They're a bit tricky. They'll let you "crop" the text so that only parts within a certain area will show up. The top one allows you to draw a rectangular area; the bottom allows you to draw a freeform vector shape.
Dialogue: 0,0:00:31.50,0:00:33.50,Style 1,,0000,0000,0000,,How your text interacts with your positioning and rotation tags depends on the alignment of the text (this also, obviously, changes the text alignment).\N\NThe ASS format has a default alignment tag that's utterly useless. Use \an (align numpad) which will align text corresponding to the position of numbers on your numpad.
Dialogue: 0,0:00:33.50,0:00:35.50,Style 1,,0000,0000,0000,,{\an7}For example, \an7 aligns to the\ntop left corner, which\Nis where the 7 is on\Nthe number pad.
Dialogue: 0,0:00:33.50,0:00:35.50,Style 1,,0000,0000,0000,,{\an2}\an2 aligns to the bottom center,\Nand so on.
Dialogue: 0,0:00:35.50,0:00:37.50,Style 1,,0000,0000,0000,,{\an9\pos(554,66)}\an9 aligns to the top right, \Nso when you position the text with \pos(x,y), \Nyou are positioning the top right corner, \Nand so on for the other aligns.
Dialogue: 0,0:00:35.50,0:00:37.50,Style 1,,0000,0000,0000,,{\an9\frx4\fry334\frz27.601\pos(514,223)}This also means the rotate tags rotate around the top right corner.
Dialogue: 2,0:00:37.50,0:00:39.50,Style 2,,0000,0000,0000,,{\pos(469,176)}Layer 2
Dialogue: 1,0:00:37.50,0:00:39.50,Style 1,,0000,0000,0000,,{\pos(312,175)}You might also want to pay attention to layers. {\fs10\bord1\b1}this is layer 1
Dialogue: 0,0:00:37.50,0:00:39.50,Style 2,,0000,0000,0000,,{\pos(336,205)}Otherwise your lines might not overlap correctly. {\fs10\bord3\b1}this is layer 0
Dialogue: 0,0:00:39.50,0:00:41.50,Style 1,,0000,0000,0000,,One last tag to mention before moving on to dynamic tags.\N\NThe \alpha tag sets the transparency of the line in terms of a number from 0 to 255 (hex 00 to FF). A solid line is \alpha&H00& while a fully transparent line is \alpha&HFF&.\N\NYou can set the alpha of only the main color, or only the shadow, using \1a, \2a, \3a, and \4a. For example, {\1a&H55&}the main color is now semitransparent, {\r\3a&H66}the border is now semitransparent.
Dialogue: 0,0:00:41.50,0:00:43.50,Style 1,,0000,0000,0000,,Now, dynamic tags! These are tags that will change the text over time. The most robust is \t(), which tells the line to smoothly transition to a different style over a set period of time.
Dialogue: 0,0:00:43.50,0:00:45.50,Style 1,,0000,0000,0000,,{\t(0,1000,\fscx130\fscy130\3c&H0000FF&)}\t(0,1000,\fscx130\fscy130\3c&H0000FF&)\N\Nin other words:\Nstarting at 0 milliseconds (relative to the start of the line) and ending at 1000 milliseconds,\Nchange the x-scale to 130% and the y-scale to 130%\Nand make the border red.
Dialogue: 0,0:00:45.50,0:00:47.50,Style 1,,0000,0000,0000,,Basically, \t() takes in the start time, the end time, and as many override tags as you want. Everything that describes how you want your line to look goes in the last part of the \t() tag. Also, if you want the start and end times to be the same as the start and end of the line, just ignore the start and end numbers and write, for example, {\t(\fscy400)}\t(\fscy400)
Dialogue: 0,0:00:47.50,0:00:49.50,Style 1,,0000,0000,0000,,Unfortunately, \t() does not work with everything. You cannot use \t() on vector clips (however, you can use it for rectangular ones!). It won't change the font, alignment, or word wrapping {\fs15}(that's the \q tag, which is not often used but very important to know for when you need it){\r}. You also can't use \t() to change the \org() origin tag. Finally, \t() does not work with \pos(), but...
Dialogue: 0,0:00:49.50,0:00:51.50,Style 1,,0000,0000,0000,,... that's what \move() is for!\N\N\move() takes in 6 parameters:\N\N\move(x1,y1,x2,y2,starttime,endtime)\N\Nwhere x1 etc. are the start and end coordinates, and starttime and endtime are self explanatory.\N\NIf you skip the last two parameters, \move() will start at the start of the line and end at the end.
Dialogue: 0,0:00:51.50,0:00:53.50,Style 1,,0000,0000,0000,,Using the drag tool you can move text visually. While you're in the drag tool, find the frame where the movement ends and set the video to that frame. Then press the blue arrow below the video and it will generate a move tag with the correct end time. Drag the circle to set the end position of your move. Move the video to the start of the movement and drag the square to set the start position of your move.\N\NIt's important that the video is on the correct frames when you drag, or Aegisub will not write the correct start and end times into \move()!\N\N{\fs15}(by the way, clicking the red bracket thing after you click the arrow changes the \move() back into a \pos() tag)
Dialogue: 0,0:00:53.50,0:00:55.50,Style 1,,0000,0000,0000,,I won't put a \move() example here because it's best that you get a feel for this tag yourself. However, with what you now know, you can make a line of text spin around, move across the screen, grow in size, and change color, all at once.
Dialogue: 0,0:00:55.50,0:00:57.50,Style 1,,0000,0000,0000,,One last thing that I mentioned earlier is the \org() tag. If you want your line to rotate around a different point and you can't make it happen with \an, you'll need to use \org(). The effect is most obvious when combined with \t().
Dialogue: 0,0:00:57.50,0:00:59.50,Style 1,,0000,0000,0000,,{\t(\frx360)}This is a default line doing a 360 around the x axis.
Dialogue: 0,0:00:59.50,0:01:01.50,Style 1,,0000,0000,0000,,{\org(462,328)\t(\frx360)}Now I've put the origin below the line.
Dialogue: 0,0:01:01.50,0:01:03.50,Style 1,,0000,0000,0000,,{\org(462,328)\t(\frx360\frz360)}Now we're rotating around both x and z axes.
Dialogue: 0,0:01:03.50,0:01:18.50,Style 1,,0000,0000,0000,,{\fad(0,3500)}Pretty crazy, right? This is where geometry skills, visualization, planning, and most of all experience come into play. This is also where I leave you.\N\NI haven't covered every ASS capability (vector drawing, for example) but this should give you all the fundamentals you need to know. For a full list of the tags, see the ASS specs document.