View Single Post
Old 2010-07-17, 04:43  
felix
sleepyhead
*Author
 
 
Join Date: Dec 2005
Location: event horizon
Summary: The answer to your question is 42.
Photoshop is basically a set of tools. For simple stuff using just the tools is sufficient, and in your case using just a few of them in combination is sufficient.

The following are the so called "basics," feel free to skim though them at your leisure. If from the first few words of the paragraph you feel you are familiar with the concepts, I recommend skipping forward to the next.

Layers, Frames & Transparency
Layers are exactly what they say, they are "layers," overlapping pieces that form a hole. Layers go (intuitively) from bottom to top in a stack. So, whats typically called, foreground is at at the top, and the background is at the bottom of the stack.

Lets say I take a picture of a circle and a picture of a triangle (pixels outside the shape are transparent). I put these two on their own layer. If I have the layer of the circle above the one with the triangle I have a circle covering a triangle. I can move the circle layer down the stack (by dragging) and have a triangle covering a circle. In short: each layers covers the one bellow it.

You can duplicate layers, create new empty layers, dispose (ie. delete) of unneeded layers and so forth though the options at the bottom of the Layers Pallet (F7). Remember, you can hover over them for a tooltip.

You can set the transparency of the layer with the control at the top of the pallet, you can also set the transparency of only the layer contents and not the effects (such as a drop shadow etc.) by adjusting the "Fill" of the layer. Besides all this you can also set transparency per pixel though various methods. These will be discussed shortly.

At the bottom of each documents layer stack there is a invisible layer of black and white squares in a chess board pattern. If you can see through to them then the layer is transparent. Of course this example is true if you don't have any intermediate layer between. If you had and there were opaque pixels there, you would see those.

You can set the pixels in the layer to be transparent individually, but that's destructive. Yes, you could undo, but... What if you save, exit, and come back? Can't undo anymore can you. The simple solution is to just separate this hole business of transparency/visibility to another layer. Basically a so called Mask is what you use in photoshop to hide pixels; just as you would use a mask at a ball to hide part of your face. For convenience, when you "mask a layer," the mask of the layer shows on the same line as the layer.

So for example, I have a layer with a triangle. If I select the layer and go to Layer > Layer Mask > Hide All you'll see black square appear next to the layer thumbnail. That's the Layer Mask.

The pixels in the layer mask are Black, White and everything between. Just remember Black as darkness and White as light. As with everywhere else, darkness hides, light reveals (and everything between does what you'd expect).


Figure 1: Two layers in Photoshop CS3, one with a Layer Mask hiding its contents.

If you understand Layers, frames are easy. A frame is basically a state in history. Frames follow the timeline paradigm. The left side is closer to the beginning of the animation, the right side is closer to its end.

Say you have a circle. In the first frame (which always exists by default) you place the circle in the middle of the document. You then can create another frame, select it, and move the circle somewhere else. If you select the first frame you'll notice your circle is still in the middle there.

Our circle example in the above paragraph isn't very pleasant animation wise. It doesn't really feel like its moving when it just appears somewhere else. A Tween is the process of creating intermediate frames between two key points. In our case its layer movement, but it could also be layer transparency or something else.

To create a Tween select two adjacent frames and then from the button right bellow the minimize and close buttons of the pallet select Tween. Select how many frames you want to add, click Ok, and you're done.

Tools & Misc
The Tools pallet (on the left side of photoshop) contains various tool sets. At any given time one tool in the tool set is shown. You can select another tool from the tool set by Click-Hold (for a moment) on the tool set. Some tool sets actually contain only one tool (eg. Zoom, Hand) but those are in the minority.

Photoshop has different Workspace presets. You can go to Window > Workspace and select one appropriate for your current task. This may make it better or worse; if you wish to go back simply go and select Default from the same menu. Photoshop also has different Views (go to View > Screen Mode). Personally I prefer working in Full Screen Mode With Menu Bar, its typically more flexible since I can drag the document around instead of scrolling.

You can show different pallets from the Window menu. They are intuitively named, if you know what you want you should be able to find it (eg. Animation).

Each time you use select a tool, its Options will appear as a strip at the top, bellow the menubar.

Now that you know how to get around the interface. I'll cover some of the important tools (in order from top to bottom), remember you can Shift+(Tool Hotkey) to select a different tool in the set:
  • To move the layer (be it pixels, vector shape or text) use the Move tool (black arrow), shortcut V. Just click and drag.
  • To make a quick rough selection use the Lasso tool (click and drag around the shape), Polygonal Lasso tool (click to create points defining the shape), or Magnetic Lasso tool (click and drag, it will try to detect the edge). Shortcut L.
  • Another way to make quick selection is the Magic Wand tool (click on a space, get the sensitivity right and it will select the area), or the Quick Selection tool (its like a brushing magnetic lasso). Shortcut W.
  • To crop, or in other words constrain the image boundaries further use the Crop tool (drag a rectangle, shift for perfect square shape -- make sure View > Snap is off). Shortcut C.
  • Brush and Pencil tools should be self-explanatory. Shortcut B.
  • Clone Stamp tool is used to copy pixels from one spot to another. Its used often in deleting stuff. Say you want to delete something on the face, simply copy some skin from the vicinity. The way it works is you first hold alt and select a area then start brushing in the target area. Shortcut S.
  • Eraser tool does what it says. Shortcut E.
  • Gradient and Pain Bucket tools are color fill tools. Paint bucket is self explanatory, the Gradient tools works by click and drag. Shortcut G.
  • Sharpen and Blur tool do what you think. One makes it more crispy (sharp), the other makes things more blurry. Think of them as each others opposite if it makes it easier. They are useful in your case after you re-size a image. Typically you can never re-size perfectly and you might want to retouch it and make some details more "detailed." Shortcut R.
  • Horizontal Type Text (or just Text) tool is what you will use 99% of the time. It does what you think, allows you to type text. Shortcut T.
  • Eyedropper tool is used to pick a color from a image. Shortcut is I but its often accessible via Alt for many tools and also color dialogs.
  • Hand tool is used to move your view. Just press space when in any of the full screen modes. Think of it as working similar to how you MiddleClick+Drag on a webpage.
  • Zoom tool is used for zooming. Click to zoom in. Alt+Click to zoom out. You can also drag select a area to auto-zoom in on it. Shortcut Z.
I've omitted a lot of the tools that have to do with photography or are not that useful in general. I also omitted the ones that need a lot of explaining.

A few other things you should know:
  • To resize, rotate etc something on the fly simply press Ctrl+T.
  • To increase the size of the document, you can crop outside the boundaries or you can go to Image > Canvas Size... for precision.
Congratulation you are not a newb anymore.

When you import images as frames, or open a gif file, you'll get a layer for each "frame image" you extracted from the video, or in the gif. Layers can obviously exist with out frames but for the moment there's a one-to-one relationship.

I'll use your gif as a example, but do try to start from proper frames when you make them.

If you zoom in to 400% you'll see something like this:


Figure 2: Problem #1, duplicate frames.

If you have 4 frames (or whatever number) like that then just remove 3 of them and make the one remaining frame have 4 times the normal timing. In this particular instance there's not much movement in pixels, so even that big ass avatar example in fig.2 is only 42.11 KB, but it could be a lot worse. Don't bother with shallow details, things like eyes flickering are barely noticeable. Other details like mouth opening are arguably equally redundant for a gif but that's personal preference.


Figure 3: Problem #2, more pixels moving in the static part of the animation.

When you save it at 100px by 100px, people are not going to notice the small fluctuation in pixels, but the size will get effected. More movement, bigger the file size. When you lower colors some of these issues tend to go away since a lot of the pixel movement is basically color fluctuation from the video. But you don't want to sacrifice color for reasons like this.

There are quite the number of ways to get rid of this. The closer to the top the easier to pull of, the closer to the bottom the more extreme:
  • Select all that junk, RightClick > Create Layer Via Copy. Now just drag the layer so it covers all the frames with the problem, and make sure its visible on them too (you can select frames and toggle visibility of layer to toggle it for all of them). This method is easy as pie.
  • A alternative method is to just add Masks to the layers and hide stuff that way. You might want to do this for more sophisticated animations but its tedious if you're not experienced enough. Remember you can copy/paste masks around, fill via Alt+Backspace etc.
  • Sometimes you just have something like a big anime character face. Since anime characters are more or less blobs of color you can just take a pencil or brush, and erase away with one solid color. Don't worry its easy to do a "good enough" job when working with things that are avatar size, even for complete newbies.
  • A more extreme way is to just get rid of the background. Just add a white layer on top, then a white layer bellow. Basically as a foreground and background for the entire animation. Now add a Mask to the top layer and try to cover all the useless bits shared by all the layers. Now go to each layer and add a Mask and cover any remaining details by masking away (by hiding pixels you show though to the background layer). You can use black instead of white for the foreground/background or some other color, but try to use a solid color and not something sophisticated or this will become incredibly tedious. The thing here its easy (with some practice or experience) to quickly and sloppily mask away stuff. Again small size helps hide your sloppiness.
  • The most extreme way is when you have to use the Clone Stamp tool to get it done. Ugh.

The transition is a Tween. Create a frame with the end layer at 100% transparency, then another with 0% and 100% on the first frame. Then create a Tween between them, all done.

When saving, you want to do the following, by priority:
  • Keep as many colors as possible!
  • Make sure Dither is set to Diffusion and is not 100%. Never!!
  • Sacrifice some Diffusion to save space, up to around 50% (but depends), it helps a lot when it comes to keeping things look nice; such as gradients. More clear gradients you have, higher you want this.
  • Apply anything from 10 to 30 loosy, more if you have to and can safely.
  • Go back to photoshop and the animation and see if you can't squeeze some more out of it.
  • Reduce colors as a last resort.

Also, always preview the timing in the browser! not photoshop. You can use photoshop to get an idea but don't bother with anything more then that. You'll find the button for preview in browser at the bottom of the Save for web... dialog.
__________________
felix is offline   Reply With Quote