Fix B-spline curve silhouette gradients - #1906
Draft
fknfilewalker wants to merge 8 commits into
Draft
Conversation
Member
|
cc @ziyi-zhang |
fknfilewalker
marked this pull request as draft
June 26, 2026 11:10
Contributor
Author
|
Still has some issues at the curve openings. |
fknfilewalker
force-pushed
the
bsplinecurve-fix
branch
from
September 6, 2026 16:07
3f2f395 to
ea0b05a
Compare
Fixes a number of issues in the `bsplinecurve` shape plugin that made the projective integrators produce wrong boundary and interior gradients. * Store `ss.uv` in the primitive parameterization (segment-local `v`, azimuth) so that the projective integrators can reconstruct the foreground interaction through `pi.prim_uv`. * Rebuild the position/normal partials from the consistent local frame and its analytic derivatives instead of the Frenet torsion, which depends on the discontinuous third derivative and injects spurious gradients at the segment borders. * Bracket the silhouette azimuths on the full circle instead of a fixed half circle around the seed: both roots can lie on the same side, which silently dropped the boundary gradient of entire `v`-ranges of a bent tube seen head-on. * Account for the azimuthal drift of the silhouette curve in the interior pdf, and for the number of roots found by the projection. * Flip `ss.n` at concave folds so that it always points from the foreground to the background side of the image-space edge. * Recover the `v`-motion of the interaction point from the full first fundamental form instead of projecting onto `dp_dv` alone. * Keep grazing hits and the open curve ends when culling backfaces, and add the missing segment index bounds checks.
fknfilewalker
force-pushed
the
bsplinecurve-fix
branch
from
September 6, 2026 16:08
ea0b05a to
cbd7d16
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes bugs related to the
bsplinecurveshape plugin in connection with the projective integrator.bsplinecurveshapethat caused the projective integrator to produce wrong gradients.
its analytic derivatives instead of the Frenet torsion, which depends on
the discontinuous third derivative and injected spurious gradients at the
segment borders.
Debug Views