4 ms·
Why not simply draw twice, once slightly enlarged with inverted normals, painted black? That's how it was done in the old days.
by dvh 3y ago
Why not simply draw twice, once slightly enlarged with inverted normals, painted black? That's how it was done in the old days.
- kookamamie 3y agoThat gets you the outline, not the internal contours.
- HWR_14 3y agoCan you describe what an internal contour is. As far as I can tell from reading the article and linked pages, it's just an edge with a sharp drop off in depth map?
- cbolton 3y agoConsider the pig picture in the article (the one under "The Occluding Contour Problem"). The method proposed by dvh would give the outline, but not the contour of the pig's left ear for example.
- yorwba 3y agoIt would, if the enlargement is not by linear scaling but instead produces a shell around the object at some distance from the surface. The inverted-normal shell of the ear would then occlude the body behind it, while itself being occluded by the slightly smaller ear, producing a contour line.
- qwery 3y agoThat hack was a common way to render outlines in fixed function pipeline days, yes. It only really works for simple, convex forms and "works" is probably a bit generous. It's far from a general-purpose outline technique and an outline is just one effect you might want an occluding contour for.