Where the pencil marks go
Dark areas collect short strokes. Deeper shadows get another layer crossing them. Around the edges, a few lines double back or break, and the paper shows through the graphite.
Those pieces are drawn separately. Lower Shading and Smudge to see the contours more clearly, then bring Shading back to watch the hatching fill in. Even with Smudge at zero, the deepest shadows keep some soft graphite.
Following the image
The shader measures brightness changes with coarse Sobel samples to estimate a direction for each part of the picture. It stores twice the angle, so opposite directions along the same line can be averaged without canceling each other out. Gaussian smoothing spreads those directions into a steadier field.
For contours, it compares two Gaussian-weighted brightness averages of different widths. The difference brings out local structure. Samples across and along the estimated edge help connect the lines, while slowly varying pressure noise changes which parts become graphite. Line weight changes thickness; Line detail changes how much survives.
The hatching reads the smoothed direction near the center of each patch and rotates short parallel strokes to match. Darker tones activate more patches, with another rotated layer for cross-hatching in the shadows. Hatch density changes patch size and spacing, not only darkness.
A brightness gradient can come from shape, a shadow, or a painted pattern. The code follows all of them. It doesn't know the object's 3D surface or choose meaningful strokes the way someone drawing would.
Making the marks less even
Looseness adds wobble, broken contours, and faint offset copies of lines. Paper tooth interrupts the graphite with texture. Stroke spacing, length, and taper vary between patches rather than repeating one identical mark.
Graphite, Sketchbook, and Cross-hatch give you different balances of those layers. Colored pencil, or the Color control, takes the scene's hue into the marks while leaving the paper light. Switch between Normal and Sketch to see how much of the source detail remains.
The direction field and contour layer blend with previous frames to reduce flicker. That steadies the sketch but can leave lag or a residual impression when something moves. Paper and wobble textures also stay on the screen rather than tracking the subject. Fine text, foliage, and noisy shadows can become dense tangles of marks.
Value Finder shows the light and dark structure that decides where these strokes gather. Sumi Ink uses stronger contours and washes in place of hatching.