Hey are you aware of an exact "tapered quadratic bezier" sdf formulation in 2D? (trying to draw some clean curves :)
I found this shadertoy.com/view/ldj3Wh, but looks like the trick of 'shrink radius based on t' isn't exact, and produces artifacts at the bends?
Conversation
Replying to
Yes, it will produce artifacts in high curvature areas or strong tapering.
Maybe you can have two curves, one for each side of the stroke? Can use this as a starting point: shadertoy.com/view/MlKcDD
But still, seems to me thickening curves (SDF or polys) is a difficult problem
3
2
6
Replying to
1
Yeah I tried the shrink radius on t and it was indeed buggy. I guess you have to write in your exact radius as a function of t formula and probably solve a slightly higher order polynomial?
1
1
Yep I think if spheres-swept-along-a-curve is the goal then you'd want a distance field to a "canal surface" (en.wikipedia.org/wiki/Channel_s), but constructing this distance field directly seems difficult.
3
5
Is the dreams spline buggy in the same way then? I feel like I never saw issues like that with it (or is it just more solvable in maxnorm land?)
1
Yep has the same issues AFAIK, splines are L2 so that when we offset the field by the radius we get circles :)
Ah yeah makes sense. Interesting that I never saw the glitches, I guess the splats cover them up, or maybe people just don't bend them so hard in practice.



