Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Why not simply draw twice, once slightly enlarged with inverted normals, painted black? That's how it was done in the old days.


That gets you the outline, not the internal contours.


Can 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?


Consider 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.


It 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.


That 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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: