back

by raphlinus·22h ago·view on hn ↗
Super good questions.

First, for hair rendering you've got a 3D trajectory, which Béziers can handle just fine, but I'm not sure about these spirals. I do have a chapter in my thesis and there has been a bit of followup from others, but I can't say anything with confidence.

That said, because of the specular reflections, applications like hair really would benefit from higher degrees of continuity. Cem Yuksel has a recent SIGGRAPH paper on how to tweak Béziers to get more continuity. In fact, seeing that was one of the motivations to take this work off the back burner.

I'm not sure about maps. But I do know of applications representing the centerline for autonomous vehicles that use polynomial spiral representations, specifically because of the extremely high degrees of continuity you can attain. For that, you don't have to represent these high-tension curvature regions.

I do think there is a specific application for drawing smooth connecting lines in autogenerated diagrams. These tend to be S-shaped, and with Béziers you tend to get curvature peaks near the endpoints. You're much better off with monotonic curvature and with spirals that's easier to achieve. And I also believe being able to get those squircle/superellipse shapes would help as well.

1 comments
> because of the specular reflections, applications like hair really would benefit from higher degrees of continuity.

Oh this is interesting. So FWIW - I’ve done a bit of CG hair in production (in a previous life, for DreamWorks) - and now that everyone’s ray tracing, I like to advocate for considering quadratic B-splines for CG hair over cubics. In practice, I don’t personally think you can see anything in hair specular reflections that is based on degree or continuity beyond C1. Catmull-Rom is only C1 and people have been using Catroms for hair for a long time (and interesting side note - I’ve found that Catmull-Rom curves are pretty lumpy and ugly, even lumpier than quadratic B-splines. This is possibly very similar to the issue of designing with subdivision you mentioned).

My opinion here does not apply to surface patches - with surfaces, the continuity can be visible in the reflections. But at my work among the researchers there was a very strong assumption that cubic B-spline curves would be visibly better than quadratic, and that quadratic would suffer from reflection artifacts due to the C1 continuity, which just doesn’t seem to be true (and ignores the history of Catmull-Rom). Quadratic curves are faster and more accurate for ray intersections and bbox calculations, and they offer some interesting advantages like having an analytic rotation-minimizing frame (with the Frenet frame, even…). Of course with procedural curves, I recommend only the quadratic B-spline, not Bézier. With a uniform B-spline, the degree of the curve is essentially nothing more than a smoothing factor. Production hair/fur/sim data tends to be over-sampled already, so the smoothing factor doesn’t buy you much.

BTW, yes I know Cem and I’m familiar with his work. He also has published on some non-polynomial curve types, so your post reminded me of him as well.