- [Instructor] Another great use
for the knockout group check box
is that you can turn fill and stroke attributes into holes
from the appearance panel,
and this is one of those tricks
that the first time I saw it, it just blew my mind,
and so here we are looking at an angled version
of that atom art that we created back in chapter 19
of the advanced course.
Now this artwork goes a little farther than that,
which is why I'm going to tell you
that you can find out more about it if you want,
in Deke's Techniques numbers 508 and 509.
So that's entirely up to you.
And by the way, if you end up getting a font warning
when you open this document,
don't worry about it because we're just going
to throw this layer away starting now,
so I'll just go ahead and click the trash icon
at the bottom of the layers panel
and click the yes button.
Alright, so currently I have a flat red background
and I've filled each one of the electrons
with red as well, so the electrons appear
as if they're transparent.
But what if I add some interest to that background?
I'll go ahead and twirl open the back layer right here
and I'll turn on this gradient rectangle,
at which point it's pretty obvious
that these are red electrons,
as opposed to transparent ones.
Things get even worse if I were to click
on a big red rectangle to select it
and change its fill color to let's say blue,
at which point it's absolutely obvious
that this isn't what I want.
In fact, this is what I want right here.
I want these guys to be absolutely transparent
wherever they occur,
and this is something I can achieve
using the knockout group check box.
Alright, so I'll just go ahead and switch back
to my artwork at hand,
and I'll press control shift A,
or command shift A on a Mac,
in order to deselect the art,
and I'll go ahead and collapse that back layer as well.
Now you may recall that this is just a single ellipse,
and so I'll press control Y or command Y on a Mac
to reveal it in the outline mode.
That way I can easily select it by clicking on it like so,
and so everything is coming off that ellipse
in a form of a bunch of fill and stroke attributes.
Alright, now I'll press control Y or command Y on a Mac
to switch back to the preview mode,
and I'll switch back to the appearance panel as well,
and let's just go ahead and briefly build this guy up,
just in case you forget what's going on,
and so I'll just go ahead and turn off all the effects
and attributes one by one,
and we'll start with a stroke,
which is getting repeated three times,
thanks to this transform effect right here,
and then we've got another fill right there in the center.
The reason it's a little circle
is because we applied an ellipse effect,
and then we've got a bunch of additional fills right here
that represent each one of the electrons,
and so this is all the white stuff,
and then we have three red fills at the top,
which represent the holes,
even though of course that's not working currently.
Then finally, I transformed the entire thing
in order to rotate it at an angle.
Alright, so what we need to do
is twirl open any one of these red fills here,
and it really doesn't matter what color you start with,
by the way.
The color of your shapes and your attributes
does not matter at all,
and then what I'm going to do is click
on the word opacity and I'm going to change it,
once again, to 50%,
and that's this guy right here at the top,
so I'll just go ahead and zoom in on it.
Now what we want to do is select the entire path.
You don't want to leave this fill selected.
You want to click on this path item
up here at the top of the appearance panel
and then turn on the knockout group check box.
Now the first time I'm clicking on it,
in my case anyway, I'm seeing the neutral state.
That little dash doesn't do you any good.
Click again in order to get a check box,
at which point you will begin to see through
that translucency.
Alright, and now all we need to do is click on the fill
in order to select it and change its opacity value
to zero percent, and we end up
with an absolute hole, like that.
Alright now we just need to do it again,
but of course it'd be nice to see the entire artwork,
so I'll go ahead and press control zero
or command zero on a Mac to zoom out,
and I'll select this fill attribute right there,
and I'll just tap the tilde key,
and so if you loaded D keys and you have a tilde key
on your keyboard, it's that simple.
If not, then of course just go ahead
and twirl the fill open, click on its opacity option,
and enter an opacity value of zero percent, like so,
and we end up with real, true, honest to goodness holes,
where each and every one of our three electrons appears.
And that's how you can turn fill and stroke attributes
into holes, by assigning opacity values
from the appearance panel and by turning on
the knockout group check box for the entire object.