2 ms·
Oversimplification, but the high-level problem is that you have a 3D object, with overlapping bits, holes, thin jutting edges, and other unusual geometry. The o
by bastawhiz 5y ago
Oversimplification, but the high-level problem is that you have a 3D object, with overlapping bits, holes, thin jutting edges, and other unusual geometry. The outline is behind that shape (and usually, only that shape), but the outline is a "flat" 2D shape.
As the images with the black outline show near the top of the article, scaling up the component parts and drawing them as black don't achieve a good effect. The "correct" approach is to find each opaque bit of the 3D object you're outlining and draw opaque outline pixels within a radius of the outline width around it. This is slow, however, since you're essentially operating per-pixel. To achieve reasonable performance, there's a good amount of optimizing that needs to happen.