1
00:00:00.03 --> 00:00:02.04
- In this movie, I'll show
you how to align objects

2
00:00:02.04 --> 00:00:04.03
to the pixel grid and I'll explain

3
00:00:04.03 --> 00:00:06.05
why it's so very important to do so

4
00:00:06.05 --> 00:00:09.00
when you're exporting
pixel-based screen graphics

5
00:00:09.00 --> 00:00:11.03
whether they're bound
for the web, a device,

6
00:00:11.03 --> 00:00:14.00
a presentation, or what have you.

7
00:00:14.00 --> 00:00:15.06
So, here we are looking at a slide

8
00:00:15.06 --> 00:00:19.00
from my Adobe Pen Tools
Fundamentals Course.

9
00:00:19.00 --> 00:00:21.06
And, let's say I go ahead and zoom in

10
00:00:21.06 --> 00:00:23.05
by control + spacebar clicking,

11
00:00:23.05 --> 00:00:26.05
that's command + spacebar
clicking on the Mac.

12
00:00:26.05 --> 00:00:29.01
And, as you can see, no
matter how far I zoom in,

13
00:00:29.01 --> 00:00:31.07
everything looks absolutely perfect

14
00:00:31.07 --> 00:00:35.01
and that's because Illustrator
is continuously rendering

15
00:00:35.01 --> 00:00:39.07
my vector-based artwork to my
pixel-based screen on the fly.

16
00:00:39.07 --> 00:00:42.00
But, that's not how things
work when you export

17
00:00:42.00 --> 00:00:44.09
a pixel-based image, and
that's because pixels are

18
00:00:44.09 --> 00:00:47.05
always little squares of color.

19
00:00:47.05 --> 00:00:49.08
And so, to get a sense for
what your screen graphic

20
00:00:49.08 --> 00:00:52.03
is going to look like, you
can go up to the View menu,

21
00:00:52.03 --> 00:00:54.04
and choose Pixel Preview.

22
00:00:54.04 --> 00:00:56.03
You also have that key board shortcut

23
00:00:56.03 --> 00:01:00.00
of control + alt + Y, or
command + option + Y on the Mac

24
00:01:00.00 --> 00:01:02.01
which is based on that
shortcut that allows us

25
00:01:02.01 --> 00:01:04.07
to switch back and forth
between the Outline

26
00:01:04.07 --> 00:01:06.04
and Preview modes.

27
00:01:06.04 --> 00:01:09.05
Anyway, I'll go ahead
and choose Pixel Preview

28
00:01:09.05 --> 00:01:13.07
and notice, now, we can see
all these choppy transitions.

29
00:01:13.07 --> 00:01:15.06
Now, these transitional
pixels, right here,

30
00:01:15.06 --> 00:01:18.06
are not blurry pixels,
rather they're what's known

31
00:01:18.06 --> 00:01:20.07
as anti-aliasing.

32
00:01:20.07 --> 00:01:22.06
So, the idea is this.

33
00:01:22.06 --> 00:01:26.08
If a pixel occurs entirely
inside this white letter, s,

34
00:01:26.08 --> 00:01:28.03
it's going to be white.

35
00:01:28.03 --> 00:01:31.00
If it occurs entirely
inside this blue bar,

36
00:01:31.00 --> 00:01:32.03
it's going to be blue,

37
00:01:32.03 --> 00:01:35.07
but if it strides the line,
then it's going to be some

38
00:01:35.07 --> 00:01:37.04
sort of mix of the two.

39
00:01:37.04 --> 00:01:39.09
Generally speaking, that's
really a great thing,

40
00:01:39.09 --> 00:01:42.06
because even though it looks
pretty jagged up close,

41
00:01:42.06 --> 00:01:44.07
it looks very smooth from far away,

42
00:01:44.07 --> 00:01:47.06
and you can see that's the
case if I press control + 1,

43
00:01:47.06 --> 00:01:51.00
or command + 1 on the
Mac, to zoom out to 100%

44
00:01:51.00 --> 00:01:54.04
at which point everything
looks pretty darn good.

45
00:01:54.04 --> 00:01:56.08
I'll go ahead and control + spacebar,

46
00:01:56.08 --> 00:01:59.00
or command + spacebar, click again.

47
00:01:59.00 --> 00:02:00.03
And notice, by the way,

48
00:02:00.03 --> 00:02:02.08
if you zoom into 600% or further,

49
00:02:02.08 --> 00:02:04.04
you're going to see the pixel grid

50
00:02:04.04 --> 00:02:07.02
which are all these little
lines between the pixels.

51
00:02:07.02 --> 00:02:08.08
I'm going to zoom out a bit, here,

52
00:02:08.08 --> 00:02:10.09
so that we can see the big problem,

53
00:02:10.09 --> 00:02:14.03
and, that is, the perpendicular edges.

54
00:02:14.03 --> 00:02:16.09
So, anytime you have a
horizontal or vertical line

55
00:02:16.09 --> 00:02:21.05
or edge, you're going to get
unnecessary anti-aliasing.

56
00:02:21.05 --> 00:02:23.02
And the reason that
this isn't necessary is

57
00:02:23.02 --> 00:02:26.05
because the perpendicular
edges fit very nicely

58
00:02:26.05 --> 00:02:28.06
inside square pixels.

59
00:02:28.06 --> 00:02:31.08
So, what we want to do is
turn the anti-aliasing off

60
00:02:31.08 --> 00:02:35.00
for these objects, by aligning
them to the pixel grid,

61
00:02:35.00 --> 00:02:38.06
and you do that by selecting
the objects, like so.

62
00:02:38.06 --> 00:02:40.06
In my case, by partially marqueeing them

63
00:02:40.06 --> 00:02:42.01
with my black arrow tool.

64
00:02:42.01 --> 00:02:44.02
And then, you have one of two options.

65
00:02:44.02 --> 00:02:46.06
You can right-click
inside the document window

66
00:02:46.06 --> 00:02:49.06
and choose this command right
here, Make Pixel Perfect,

67
00:02:49.06 --> 00:02:52.05
or you also have this icon
that's available to you

68
00:02:52.05 --> 00:02:54.09
on the far right side of the control panel

69
00:02:54.09 --> 00:02:58.01
that will align the selected
art to the pixel grid.

70
00:02:58.01 --> 00:03:00.00
And notice, as soon as I click on it,

71
00:03:00.00 --> 00:03:02.03
all of that anti-aliasing

72
00:03:02.03 --> 00:03:06.03
around the horizontal and
vertical edges disappears.

73
00:03:06.03 --> 00:03:07.05
Now, you need to bear in mind

74
00:03:07.05 --> 00:03:10.05
that not all objects need to be aligned

75
00:03:10.05 --> 00:03:12.08
to the pixel grid inside Illustrator.

76
00:03:12.08 --> 00:03:15.03
And so, for example,
if I were to select one

77
00:03:15.03 --> 00:03:17.05
of these curving drops, right here,

78
00:03:17.05 --> 00:03:19.02
by clicking on any one of them.

79
00:03:19.02 --> 00:03:20.07
Notice that they're
currently grouped together.

80
00:03:20.07 --> 00:03:23.03
Because we have these
smooth organic curves,

81
00:03:23.03 --> 00:03:27.03
not everything is going
to fit into square pixels.

82
00:03:27.03 --> 00:03:29.04
And so, in this case,
if I were to go ahead

83
00:03:29.04 --> 00:03:31.01
and click on that same icon,

84
00:03:31.01 --> 00:03:32.09
I'm going to get a warning that tells me

85
00:03:32.09 --> 00:03:36.00
that the selected art cannot
be made pixel perfect,

86
00:03:36.00 --> 00:03:39.07
and that's because curves
always require anti-aliasing

87
00:03:39.07 --> 00:03:42.03
when they're converted to square pixels.

88
00:03:42.03 --> 00:03:44.02
But, consider this artwork right here.

89
00:03:44.02 --> 00:03:47.03
If I go ahead and, once
again, partially marquee it

90
00:03:47.03 --> 00:03:48.07
with the black arrow tool,

91
00:03:48.07 --> 00:03:51.09
we have some curves as
well as these straight

92
00:03:51.09 --> 00:03:53.07
and perpendicular lines.

93
00:03:53.07 --> 00:03:57.08
Now, like curves, angled
lines require anti-aliasing,

94
00:03:57.08 --> 00:03:59.06
because, again, they're not going to fit

95
00:03:59.06 --> 00:04:01.03
into the perfect squares.

96
00:04:01.03 --> 00:04:03.02
But, any edge that's perpendicular,

97
00:04:03.02 --> 00:04:06.00
and, once again, by that
I mean exactly horizontal

98
00:04:06.00 --> 00:04:08.05
or vertical, then you can align that edge

99
00:04:08.05 --> 00:04:11.06
to the pixel grid by clicking on this icon

100
00:04:11.06 --> 00:04:14.02
on the far right side
of the control panel.

101
00:04:14.02 --> 00:04:15.09
And just like that, as you can see,

102
00:04:15.09 --> 00:04:17.07
all the anti-aliasing along

103
00:04:17.07 --> 00:04:20.00
that horizontal edge disappears.

104
00:04:20.00 --> 00:04:21.07
Now, you make take
issue with that and say,

105
00:04:21.07 --> 00:04:22.07
"Well, wait a second.

106
00:04:22.07 --> 00:04:25.08
"We still have a little
bit of anti-aliasing

107
00:04:25.08 --> 00:04:28.00
"right there along the top of that edge."

108
00:04:28.00 --> 00:04:30.08
And that's coming to us from
a different piece of artwork,

109
00:04:30.08 --> 00:04:33.00
namely this guy right here.

110
00:04:33.00 --> 00:04:34.08
So, to make it disappear,
I'll just go ahead

111
00:04:34.08 --> 00:04:36.07
and click on it to select it,

112
00:04:36.07 --> 00:04:38.05
and then, just for the sake of variety,

113
00:04:38.05 --> 00:04:40.05
I'll right click inside
the document window

114
00:04:40.05 --> 00:04:42.04
and choose Make Pixel Perfect,

115
00:04:42.04 --> 00:04:46.05
and that final bit of
anti-aliasing goes away.

116
00:04:46.05 --> 00:04:48.09
And that, friends, is
how you align horizontal

117
00:04:48.09 --> 00:04:51.01
and vertical edges so that they snap

118
00:04:51.01 --> 00:04:53.06
into exact alignment with the pixel grid

119
00:04:53.06 --> 00:04:57.08
when preparing screen graphics
here inside Illustrator.

