I have tried searching the web to no avail, maybe someone here can point me in the right direction.
I am trying to render a simple scene to look as if hand drawn (sketch, I.e. mesh with some lines to long to short, not perfectly straight etc.) . The flow is:
1 Given the geometry and camera find all points that would produce lines in current view (I.e for a for a triangle partly obscured behind another all vertices for one of them, some on the intersection etc)
2 generate lines between the now calculated vertices positions as series of rectangles, mapping textures onto them.
So my question is, is this a reasonable setup, and if so how do I find the intersection points?
Don’t find intersection points. Just make the textures for the models have hand-drawn lines on them. Then, to get the outline around the entire model, you can render the model again but with no textures, front face culling, and completely opaque, while making the model “puff out” a bit by sliding vertex positions along the vertex normals in a vertex shader. Check out this link: http://unitygems.com/noobs-guide-shaders-6-toon-shader/
Thanks for your reply.
However, just mapping textures was my first attempt. The problem is that hand drawn lines typically look different in the ends (quite straight in the middle and deviations and thicker in the ends). Using this approach I could not get the line end look where a line is partly hidden, that’s whyI thought of finding the intersection and generating a new line.
Do I gather from your answer that this is impossible?