Repository navigation
tiler_bunny_test: the contour tiler end to end on the Stanford bunny (SDF, ortho slices, isocontours, tiling, Hausdorff) - #1352
Merged
Conversation
The bunny's signed distance field (cvc::sdf, SDF_V1, 72^3) is cut into z slices by the ortho slicer (cvc::extract_slice). Each slice's zero isocontours are traced by marching squares (in the test) into a cvc::contour_stack, and cvc::tile_contours puts a surface through them. That surface is measured against the bunny mesh both ways, with a small uniform-grid point-to-triangle search (no libigl needed). Measured on Windows (MSVC, Release), in slice spacings h: - every bunny point is within 1.78 h of the tiled surface; - every tiled point above the base band is within 1.38 h of the bunny; - the mean distance is 0.28 h one way and 0.25 h the other; - the Hausdorff distance is 3.54 h, from the tiled surface capping the holes in the bunny's base (bun_zipper is open there). The tolerances are about 1.4 times these. SDF_V2's sign leaks through those holes, so the test uses SDF_V1. Tiling skips curation: the contours are level sets of one field and never cross. It takes about a minute in Release, so the suite name holds "Integration", which puts it with ci.yml's heavy suites (Release pushes, not every PR). Built only with CVC_ENABLE_SDF; it skips without cvc::planar.
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.
An end-to-end test of the contour tiler (P3b, #1332 and #1334) on the Stanford bunny, as Joe asked: take the bunny's SDF, slice it with the ortho slicer, trace each slice's zero isocontours, tile them, and check that the surface comes back within a tolerance of the original mesh.
What
tiler_bunny_testdoestest.bunny(34,835 vertices), scaled to span 100 units. The tiler's tolerances are absolute and set for coordinates of order 1 to 10^4; the built-in bunny spans about 0.15.cvc::sdf(..., SDF_V1)on a 72^3 grid, with 3 voxels of padding so every isocontour closes inside its slice. Spacing h = 1.54.SDF_V2: bun_zipper is open at its base, and V2's sign leaks through the holes, so "inside" reaches the grid border.cvc::extract_slice(sdf, slice_axis::z, k)for every k.cvc::tile_contours, withcuration_delta = 0. The contours are level sets of one field and never cross, and curating them doubled the tiling time for the same surface.Measured (Windows, MSVC 19.44, Release), in slice spacings h
The tiler also warns six times: four untiled regions it can't trace ("No chord was legal") and two medial-axis fills it abandons. These are legacy behaviours, as in the
branchparity case. They leave small gaps, which the bunny → tiled distance bounds.Cost and where it runs
About 45–60 s in Release: the SDF and the tiling take about half each, and the distances about 1.5 s. The suite is named
TilerBunnyIntegration, which puts it with ci.yml's heavy suites (STRESS_REGEX): skipped on PRs and run on Release pushes to master. So this PR's CI builds the test but doesn't run it. It is built only withCVC_ENABLE_SDF, and it skips withoutcvc::planar.The roadmap's P3b section gets a short paragraph with these numbers.
Checked locally: Windows, MSVC 19.44, Release: passes, about 45 s;
git-clang-formatis clean. Not run locally: Linux, macOS and Debug (CI's Release push runs the first two).