Friday, April 29, 2011

Pixel Art Dithering Tutorial

Dither pixel art


Pixel art is art created with a paint program capable of drawing at the smallest graphical element of your display hardware. That element is called a picture element or pixel. The problem of jagged edges is common to pixel art. Jagged edges occur when you create pixel art with only a limited color palette and draw lines that aren't purely horizontal or vertical but somewhat diagonal. In such lines, the high contrast between the color of your line and the background color makes individual pixels visible. This is the source of jagged edges. The process of smoothing these edges is called dithering.


Instructions


1. Open two instances of Windows Paint and paste the photo into one of the instances. Locate a clear, straight diagonal line in the photo. The closer the line is to being horizontal, the more dithering you'll do doing.








2. Select Paint's "Zoom" tool (the magnifying glass) and zoom in on the center of the line you found in step 2. Study carefully what you see, which should be a row of progressively darker or lighter values for a single color. "Value" refers to how dark or light a color appears.


3. Select Paint's "Rectangle" selection tool and use it to select a complete row of dithered cells from step 3. Copy the selection to the clipboard.


4. Paste the selection into the other instance of Paint, which you ran in step 2. You now have a mini palette that you can use to recreate and dither the line you selected from the photo.


5. Click Paint's line button to enter the mode for drawing straight line segments. Then, click the "Eyedropper" button.


6. Use the "Zoom" tool to zoom into the maximum extent of the mini palette-row you pasted in step 5. Then, click the row's middle pixel. This pixel will be midway between the palette's darkest and lightest values.


7. Zoom out to the maximum extent, then draw a line segment that matches approximately the slope of the edge you selected in step 2. Notice the jagged quality of the line.


8. Zoom back in to the maximum extent, so that you can see both the mini palette and a complete row of pixels in the line you just drew.








9. Click the "Pencil" tool to enter freehand drawing mode. Then, Use the color "Eyedropper" tool to select the mini palette's leftmost value, which will be either its darkest or lightest. Paint will automatically return you to the freehand drawing mode.


10. Click the leftmost pixel in the row of your line, which you zoomed to in step 9. Your pixel's color now matches the palette's color (which you copied from the original line you selected from the photo).


11. Repeat steps 10 and 11 repeatedly, moving from left to right as you copy the mini palette's values onto your line's pixels. When you're done, you'll have one complete row of dithered pixels.


12. Repeat steps 10 through 12 for a second row of pixels from the line you drew, to create another dithered row. At this point, you've dithered enough of the line to zoom out and see the smoothing effect of your dithering.


13. Complete the dithering by repeating steps 10 through 12 for the remaining rows in the line you drew.

Tags: mini palette, maximum extent, your line, complete dithered, darkest lightest