Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weighted smoothing, mesh cleanup etc. #199

Merged
merged 22 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
277f5fc
Update vtkio traits, Real vec/mat conversion trait
w1th0utnam3 Jul 18, 2023
62c06e3
Support for mixed tri/quad mesh
w1th0utnam3 Jul 18, 2023
81e5cdb
Implement tris to quads postprocessing
w1th0utnam3 Jul 18, 2023
9c8d704
Implement basic half-edge triangle mesh, geometry helper functions
w1th0utnam3 Jul 18, 2023
2884047
Laplacian smoothing and "barnacle decimation"
w1th0utnam3 Sep 13, 2023
75d78f0
Add particle densities to reconstruction output for subdomain grid
w1th0utnam3 Jul 25, 2023
4716006
Collect global neighborhood list from subdomains
w1th0utnam3 Jul 28, 2023
74b123e
Implement MC cleanup postprocessing step
w1th0utnam3 Sep 12, 2023
6314e9b
Simplify CellConnectivity
w1th0utnam3 Sep 12, 2023
aaef0f0
Move keep_cells and clamp from TriMesh to all meshes
w1th0utnam3 Sep 12, 2023
ad93f37
Implement mesh clamping for MeshWithData, implement keep_vertices
w1th0utnam3 Sep 13, 2023
2f5cfc5
Update command line args
w1th0utnam3 Sep 13, 2023
d31341b
Implement functions to find non-manifold edges and vertices
w1th0utnam3 Sep 13, 2023
9c580a3
Update check mesh function with non-manifold checks
w1th0utnam3 Sep 13, 2023
d7f2064
Update changelog
w1th0utnam3 Sep 13, 2023
f06dbaf
Update docs
w1th0utnam3 Sep 13, 2023
1dcecdd
cargo update
w1th0utnam3 Sep 21, 2023
99c7f29
Small fixes
w1th0utnam3 Sep 21, 2023
f426a04
Disable mesh cleanup by default
w1th0utnam3 Sep 25, 2023
de0d1b4
Update readme and changelog
w1th0utnam3 Sep 25, 2023
e141247
cargo update
w1th0utnam3 Sep 25, 2023
fa38bbd
Fix compile error/warning with --no-default-features
w1th0utnam3 Sep 25, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,24 @@

The following changes are present in the `main` branch of the repository and are not yet part of a release:

- N/A

## Version 0.10.0

This release implements ["Weighted Laplacian Smoothing for Surface Reconstruction of Particle-based Fluids" (Löschner, Böttcher, Jeske, Bender; 2023)](https://animation.rwth-aachen.de/publication/0583/), mesh cleanup based on ["Mesh Displacement: An Improved Contouring Method for Trivariate Data" (Moore, Warren; 1991)](https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.49.5214&rep=rep1&type=pdf) and a new, more efficient domain decomposition (see README.md for more details).

- Lib: Implement new spatial decomposition based on a regular grid of subdomains (subdomains are dense marching cubes grids)
- CLI: Make new spatial decomposition available in CLI with `--subdomain-grid=on`
- Lib: Implement new spatial decomposition based on a regular grid of subdomains, subdomains are dense marching cubes grids
- Lib: Support for reading and writing PLY meshes
- Lib: Implement weighted Laplacian smoothing to remove bumps from surfaces according to paper "Weighted Laplacian Smoothing for Surface Reconstruction of Particle-based Fluids" (Löschner, Böttcher, Jeske, Bender 2023)
- CLI: Add arguments to enable and control weighted Laplacian smoothing `--mesh-smoothing-iters=...`, `--mesh-smoothing-weights=on` etc.
- Lib: Implement `marching_cubes_cleanup` function: a marching cubes "mesh cleanup" decimation inspired by "Mesh Displacement: An Improved Contouring Method for Trivariate Data" (Moore, Warren 1991)
- CLI: Add argument to enable mesh cleanup: `--mesh-cleanup=on`
- Lib: Add functions to `TriMesh3d` to find non-manifold edges and vertices
- CLI: Add arguments to check if output meshes are manifold (no non-manifold edges and vertices): `--mesh-check-manifold=on`, `--mesh-check-closed=on`
- Lib: Support for mixed triangle and quad meshes
- Lib: Implement `convert_tris_to_quads` function: greedily merge triangles to quads if they fulfill certain criteria (maximum angle in quad, "squareness" of the quad, angle between triangle normals)
- CLI: Add arguments to enable and control triangle to quad conversion with `--generate-quads=on` etc.
- Lib: Support for reading and writing PLY meshes (`MixedTriQuadMesh3d`)
- CLI: Support for filtering input particles using an AABB with `--particle-aabb-min`/`--particle-aabb-max`
- CLI: Support for clamping the triangle mesh using an AABB with `--mesh-aabb-min`/`--mesh-aabb-max`

Expand Down Expand Up @@ -69,9 +84,9 @@ The following changes are present in the `main` branch of the repository and are

This release fixes a couple of bugs that may lead to inconsistent surface reconstructions when using domain decomposition (i.e. reconstructions with artificial bumps exactly at the subdomain boundaries, especially on flat surfaces). Currently there are no other known bugs and the domain decomposed approach appears to be really fast and robust.

In addition the CLI now reports more detailed timing statistics for multi-threaded reconstructions.
In addition, the CLI now reports more detailed timing statistics for multi-threaded reconstructions.

Otherwise this release contains just some small changes to command line parameters.
Otherwise, this release contains just some small changes to command line parameters.

- Lib: Add a `ParticleDensityComputationStrategy` enum to the `SpatialDecompositionParameters` struct. In order for domain decomposition to work consistently, the per particle densities have to be evaluated to a consistent value between domains. This is especially important for the ghost particles. Previously, this resulted inconsistent density values on boundaries if the ghost particle margin was not at least 2x the compact support radius (as this ensures that the inner ghost particles actually have the correct density). This option is now still available as the `IndependentSubdomains` strategy. The preferred way, that avoids the 2x ghost particle margin is the `SynchronizeSubdomains` where the density values of the particles in the subdomains are first collected into a global storage. This can be faster as the previous method as this avoids having to collect a double-width ghost particle layer. In addition there is the "playing it safe" option, the `Global` strategy, where the particle densities are computed in a completely global step before any domain decomposition. This approach however is *really* slow for large quantities of particles. For more information, read the documentation on the `ParticleDensityComputationStrategy` enum.
- Lib: Fix bug where the workspace storage was not cleared correctly leading to inconsistent results depending on the sequence of processed subdomains
Expand All @@ -91,7 +106,7 @@ Otherwise this release contains just some small changes to command line paramete

The biggest new feature is a domain decomposed approach for the surface reconstruction by performing a spatial decomposition of the particle set with an octree.
The resulting local patches can then be processed in parallel (leaving a single layer of boundary cells per patch untriangulated to avoid incompatible boundaries).
Afterwards, a stitching procedure walks the octree back upwards and merges the octree leaves by averaging density values on the boundaries.
Afterward, a stitching procedure walks the octree back upwards and merges the octree leaves by averaging density values on the boundaries.
As the library uses task based parallelism, a task for stitching can be enqueued as soon as all children of an octree node are processed.
Depending on the number of available threads and the particle data, this approach results in a speedup of 4-10x in comparison to the global parallel approach in selected benchmarks.
At the moment, this domain decomposition approach is only available when allowing to parallelize over particles using the `--mt-particles` flag.
Expand Down
8 changes: 4 additions & 4 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: splashsurf
title: '"splashsurf" Surface Reconstruction Software'
message: >-
If you use this software in your work, please consider
citing it using these metadata.
Expand All @@ -12,10 +12,10 @@ authors:
given-names: Fabian
affiliation: RWTH Aachen University
orcid: 'https://orcid.org/0000-0001-6818-2953'
url: 'https://www.floeschner.de/splashsurf'
url: 'https://splashsurf.physics-simulation.org'
abstract: >-
Splashsurf is a surface reconstruction tool and framework
for reconstructing surfaces from particle data.
license: MIT
version: 0.9.1
date-released: '2023-04-19'
version: 0.10.0
date-released: '2023-09-25'
Loading