Well right now, the edge rendering system is really very simple, and runs as a separate step after rendering. Basically it does edge detection of the image’s zbuffer (depth for each point), and draws edges depending upon the amount of change there is between adjacent points.
It works, but it is deffinately insufficient for serious use. Simple to be able to use it in a project with interlaces output I had to edit it because outwise it gerates edges two times thicker in the Y axis than in the X axis. (the same problem applies in any case of nonsquare pixels like anamorphic wide screen) Also, trying to adapt it to operate on certain objects and not others would actually be a bit of a challenge, since it isn’t really operating on objects.
Matching that finalToon product is quite a tall order. It even handles good reflection and refration of edges. But I have been playing around with ideas myself for implementing a better (but not that good) edge system. (Though who knows when I’ll get around to it.) Edges would still be rendered as an after effect, but it would actually the render edges, not performing a dilter on the zbuffer. Objects would have properties to:
- Render outlines – to render or no render an edge is determined by the two faces attached to the edge. If the normal of one face points towards the camera, and the normal of the other face points away from the camera, the edge is drawn.
- Render edges – the user provides an angle. if the angle between two faces is more than the provided angle, the edge is rendered
Edges them selves would have the options:
- Force render – forces the edge to be rendered regardless of the above criteria
- zoffset – edges can be drawn in space above the object. i.e. lines for eybrows can be drawn in front of the hair.
Since it’s a post rendering effect, it’s deffinately a doable approach. Though it may be necissary to have edge information propgated though the pipe and maintained intelligently for s-meshes. And it has the side effect of not working for reflected or refracted objects. (though I guess that could be done too, but testing the face’s reflection / refratcion)
To enhance it, you could specify perhaps a pen to use, and the pen could be setup to support various widths or brush stroke styles.
Anyways, just my ideas. I would like to see better edge rendering and NPR shading in blender. In the mean time, you may want to check out the flash plugin. The author of the seems to have his own edge rendering system that would maybe be expanded upon.
PS: What is the trick with single sided faces?