[Bf-blender-npr] Feature/improvement idea for Freestyle
Terry Hancock
lunatics.ml14 at anansispaceworks.com
Tue Apr 8 15:01:52 CEST 2014
> I agree that what we like to have is a number quantifying how close to a
> contour.
>
> [...]
>
> Reference:
> http://gfx.cs.princeton.edu/proj/sg05lines/course7-5-linetypes.pdf
(Yeah, that's the paper I remember reading. :-)).
> Radial curvatures are positive in convex areas, negative in concave
> areas, and zero at inflection point. So the magnitude (absolute value)
> of radial curvature could represent the closeness of a contour to an
> inflection point.
Yeah, it's from a dot product between the camera vector and the normal vector,
I suppose.
> In Freestyle, radial curvatures are computed at individual input mesh
> vertices, only when the Face Smoothness option is enabled and mesh faces
> are flagged as smooth shading. Radial curvatures are only available
> through the Freestyle Python API at the moment.
OK. I can see I should probably learn more about this API.
> I did a quick test again: https://vimeo.com/91383521 .
>
> In the video clip, line thickness is a function of the magnitude of
> radial curvatures. Since curvatures are computed at input mesh vertices,
> the input mesh have to be very fine (I used subsurface division at the
> maximum level 6). The high mesh resolution translates to a long view map
> computation time. That is a downside of this solution. The upside is a
> smooth transition of line thickness when the lines appear and disappear.
>
> What do you think?
I think: "Hot damn! That's it!" :-)
The smooth surface issue may not be such a big deal for me. At least in the
case I was thinking of the line was already on a mesh edge. I could get it to
stay by making the crease angle extremely shallow, but then too many lines
would show up, so I was picking it up as a contour. (This can happen when
the model has bevels -- not so good for Freestyle).
I can see how it might be a problem in other situations.
> Suggestive contours as in Freestyle for Blender tend to produce
> unpredictable and noisy line results as you may have noticed. By noisy I
> mean jagged, discontinuous pieces of line segments. I did not rely on
> them this time, although these lines might be a starting point toward
> what we like to have.
Yeah, I've seen that problem all right. So this is not the same thing as a
suggestive contour, then. Interesting, because I thought it had to be.
Well, I don't know what your dev priorities are exactly, but it would be very
useful if this became available as a style modifier.
In the meantime, I guess I'll have to learn how this is done in Python. Can
one write a new modifer in the Python API? If so, I might attempt it.
Cheers,
Terry
--
Terry Hancock
Director/Producer - "Lunatics" Project - http://lunatics.tv
Anansi Spaceworks
More information about the Bf-blender-npr
mailing list