Recent Releases of splashsurf
splashsurf - v0.13.0
- Py: Major refactor of the Python bindings, interface is much simpler and more "pythonic"
- Unified separate F64/F32 classes and functions and infer data type automatically
- Nearly all inputs, outputs and attributes are now zero-copy (e.g. mesh vertices and faces can be accessed as attributes without copies)
- Py: Add a function for a plain marching cubes reconstruction from a contiguous 3D array without any SPH interpolation
- Lib: Add support for "dense"
DensityMap(borrowed & owned) as input for the marching cubes triangulation, useful for the Python bindings - Lib: Replace usage of
DiscreteSquaredDistanceCubicKernelby standardCubicSplineKernelfor SPH interpolation (no noticeable performance difference) - Lib: Enforce that
Indextypes are signed integers implementing thenum_traits::Signedtrait. Currently, the reconstruction does not work (correctly) with unsigned integers. - Lib: Make most fields of
SurfaceReconstructionpublic, remove previous getter functions - CLI: Add some tests for the
reconstruction_pipelinefunction - CLI: Fix post-processing when particle AABB filtering is enabled
- Lib: Support subdomain "ghost particle" margins to be up to the size of the subdomain itself (previously limited to half the size)
- CLI/Lib: Option to automatically disable subdomain decomposition for very small grids
- Lib: Support for borrowed data in
MeshAttribute, avoids copies in CLI and Python package
- Rust
Published by w1th0utnam3 6 months ago
splashsurf - v0.12.0
This release adds Python bindings for the CLI and library! See README for more details.
- CLI: Add a library target to the
splashsurfcrate to allow using high-level CLI functions from other crates - CLI: Add an argument
--mesh-cleanup-snap-distto limit the snapping distance along cube edges (relative to marching cube size) of the marching cubes cleanup step (default is to snap without limit) - CLI: Enable mesh cleanup by default if smoothing is enabled
- Rust
Published by w1th0utnam3 8 months ago
splashsurf - v0.11.0
- CLI: Add a switch
--check_mesh_orientationto check if the mesh orientation is consistent (i.e. vertex normals have the same orientation as all adjacent face normals) - CLI: Support for reading point/particle attributes (integers, floats and vectors of floats) from BGEO files
- Lib: Remove octree-based domain decomposition (superseded by regular grid subdivision approach
--subdomain-grid) - CLI: Set
--subdomain-grid=onby default - CLI: Remove all arguments for octree-based domain decomposition
- CLI: Remove options to output some debug files (octree grid, density map, etc.)
- Lib: Fixed a rare bug where the "density map" did not always contain a full zero one-ring around the function values (See https://github.com/InteractiveComputerGraphics/splashsurf/issues/215)
- Rust
Published by w1th0utnam3 11 months ago
splashsurf - v0.10.0
This release implements "Weighted Laplacian Smoothing for Surface Reconstruction of Particle-based Fluids" (Löschner, Böttcher, Jeske, Bender; 2023), mesh cleanup based on "Mesh Displacement: An Improved Contouring Method for Trivariate Data" (Moore, Warren; 1991) 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 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=onetc. - Lib: Implement
marching_cubes_cleanupfunction: 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
TriMesh3dto 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_quadsfunction: 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=onetc. - 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
- Rust
Published by w1th0utnam3 over 2 years ago
splashsurf - v0.9.3
Version 0.9.3
- CLI: Make input filename/input sequence pattern a positional argument instead of separate arguments, arguments
--input-fileand--input-sequenceare removed - CLI: Introduce some short arguments:
-rfor--particle-radius,-lfor--smoothing-length,-cfor--cube-size,-tfor--surface-threshold - CLI: Add arguments
-s/--start-indexand-e/--end-indexto specify the first and last index to process for a sequence of files - CLI: Process sequences of files in natural sort order instead of alphabetical order
- CLI: Show progress bar when reconstructing a sequence of files
Version 0.9.2
- Lib: In the
UniformCartesianCubeGrid3d::from_aabbconstructor, re-align the min-coordinate of the AABB to multiples of the cube size by default. This way multiple frames of an animation will be automatically consistent in terms of marching cubes grid alignment without having to manually specify an AABB for the entire simulation.
- Rust
Published by w1th0utnam3 over 2 years ago
splashsurf - v0.9.1
- CLI: Fix bug where no input sequence files were found if the sequence pattern path did not contain any "parent" path (e.g.
file_{}.vtkinstead of./file_{}.vtk)
- Rust
Published by w1th0utnam3 almost 3 years ago
splashsurf - v0.9.0
- Upgrade to Rust edition 2021
- Lib: Update to
nalgebra0.32.1 - Lib: Support for writing particles as JSON
- Lib: Support for writing particles as BGEO
- CLI: Support for new writers in
convertsubcommand - Lib: Rename
AxisAlignedBoundingBox*dtypedefs toAabb3dandAabb2d - Lib: Support reading VTU (VTK XML) files
- CLI: Support reconstruction of particles from VTU (VTK XML) files, including attributes
- CLI: Support for specifying an output pattern (e.g. "surface_{}.obj") using
--output-file/-owhen processing sequences of files, this allows to specify a different output format than VTK for sequences (which was the only available output format for sequences before) - CLI: Files belonging to a sequence are now detected by treating the placeholder "{}" as a "(\d+)" regex (i.e. any number of digits) and sorting the matching files lexicographically (previously, the tool just counted up from 1)
- Rust
Published by w1th0utnam3 almost 3 years ago
splashsurf -
- Lib: Update to
nalgebra0.29 - Lib: All the particle/mesh file IO code was moved from the
splashsurfbinary crate to thesplashsurf_libcrate. They are behind the optionaliofeature flag. This allows using the IO code in tests of the library itself (previously the code was duplicated). But these functions may also be helpful to library users building their own pipeline if they wan to to quickly test code by e.g. loading particle data from files. - Lib: Replace some unsafe blocks by using
bytemuckinstead - Lib: Redesign the API for SPH kernel functions
- Lib: Add module
sph_interpolationfor the interpolation of normals, scalar fields and vector fields to arbitrary points using SPH based interpolation - CLI: The
--output-normals=on/offargument was renamed to--normals=on/off - CLI: Add command line switch
--sph-normals=on/off(enabled by default) to toggle whether to use SPH interpolation (instead of area weighted triangle normals) to compute normals when--normalsis on - CLI: Support for writing surfaces meshes (including normals) to OBJ files directly from the
reconstructsubcommand (previously this was only supported for theconvertsubcommand) (See https://github.com/w1th0utnam3/splashsurf/pull/29) - CLI: Support for specifying names of point attribute fields via the argument
--interpolate-attributes=...that should be interpolated to the reconstructed surface. Currently it is only possible to load these fields from VTK files and the interpolated values can also only be written if the output file format is VTK. - CLI: All
on/offarguments now require using an equal sign to set them. Primarily, this was done to prevent the CLI from accepting empty values which would be replaced by the respective default arguments. E.g. previously--normalswas equivalent to the default--normals=offwhich is quite confusing. Now the default is only applied when the argument is not provided at all while--normalsresults in an error and--normals=oncan be used to override the default.
- Rust
Published by w1th0utnam3 over 4 years ago
splashsurf -
- Lib: Fix a bug that caused the neighborhood search results to be incomplete
- Lib: Update to
nalgebra0.27 with const generics and removed usage ofnalgebratypes that are deprecated - Lib: Add a "naive"
O(n^2)neighborhood search for testing purposes - Lib: Rename other neighborhood search functions to
neighborhood_search_spatial_hashingandneighborhood_search_spatial_hashing_parallel - CLI: Add a command line option
--output-normalsto thereconstructsub-command to write mesh normals to the output file. Note that currently the normals are only computed using an area weighted average of triangle normals. - CLI: Add JSON files as supported particle input file
- CLI: Change the
convertsub-command to allow both conversion of particle files and conversion of mesh formats. Instead of using the--inputoption you now have to either use the--particlesor--meshoption to specify the input file depending on whether you want to convert a particle or mesh file. For particlesVTK, BGEO, PLY, XYZ, JSON -> VTK, PLYis supported. For meshes onlyVTK, PLY -> OBJis supported. - CLI: Rename the command line option to specify a sequence of input files from
--input-sequence-patternto--input-sequence
- Rust
Published by w1th0utnam3 over 4 years ago
splashsurf -
- Lib: Add docs.rs metadata to manifest to document all features and to build only for a single target
- Rust
Published by w1th0utnam3 about 5 years ago
splashsurf -
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.
Otherwise this release contains just some small changes to command line parameters.
- Lib: Add a
ParticleDensityComputationStrategyenum to theSpatialDecompositionParametersstruct. 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 theIndependentSubdomainsstrategy. The preferred way, that avoids the 2x ghost particle margin is theSynchronizeSubdomainswhere 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, theGlobalstrategy, 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 theParticleDensityComputationStrategyenum. - Lib: Fix bug where the workspace storage was not cleared correctly leading to inconsistent results depending on the sequence of processed subdomains
- Lib: Fix bug in the octree splitting where ghost particles of a parent node were actually classified as non-ghost particles in the child node, leading to many subsequent splits
- Lib: Change AABB's
contains_pointmethod such that it now considers the AABB as "open" to its max value, i.e. it checks if the point is in the half-open set[min, max[ - Lib: Implemented an own
profile!macro that also works in multi-threaded code, i.e. with together withrayon - CLI: The CLI now also prints detailed profiling/timing output when running in parallel with domain decomposition thanks to the new
profilemacro - CLI: Add
--domain-minand--domain-maxflags to theconvertsubcommand that allows to filter out particles - CLI: Remove the
--splash-detection-radiusflag as it did not work for a couple of releases - Lib: Update to
vtkio0.6.0
- Rust
Published by w1th0utnam3 about 5 years ago
splashsurf -
- Lib: Fixed bug in triangulation that resulted in at most 4 out 5 possible triangles being emitted. This resulted in holes in surface meshes in some cases.
- Rust
Published by w1th0utnam3 about 5 years ago
splashsurf -
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.
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.
- CLI: The CLI now uses subcommands, the reconstruction is now run using the
reconstructsubcommand - CLI: Added a
convertsubcommand to convert between particle formats. All supported input formats can be read but only output to VTK is currently supported. - CLI: Add flags to enable/disable spatial decomposition and control octree usage
- CLI: Add flag to control number of threads for the worker thread pool
- CLI: Add flags for quiet/verbose output
- CLI: Use
on/offswitches for various command line parameters instead of boolean flags that can only be used to set something totrue - CLI: Support for reading uncompressed BGEO files (previously only compressed BGEO files were supported)
- Lib: Implement domain decomposed reconstruction approach using octree spatial decomposition, the leaves of the octree are processed in parallel.
- Lib: Implement stitching of local meshes resulting from the domain decomposed reconstruction. The resulting meshes appear to be closed (without boundary) in limited testing with a couple of examples if the old global implementation also resulted also in a closed mesh.
- Lib: Introduce thread local "workspaces" to reuse allocated memory. The workspace will be stored in the
SurfaceReconstructionresult object and can be reused to reduce allocations in subsequent surface reconstructions. - Lib: Fix winding order of triangles generated by marching cubes such that triangle normals will actually point outwards from the surface
- Lib: Add benchmarks using Criterion
- Lib: Add functions to approximate the vertex normals and vertex normal directions based on are-weighted averages of the adjacent triangles
- Lib: Reduce severity of most log messages
- Lib: Replace term
kernel_radiuswithcompact_support_radiusto make it less ambiguous - Updated dependencies
Breaking changes
- CLI: The CLI now requires specifying subcommands. The reconstruction is now run using the
reconstructsubcommand - CLI: The input file now has to be provided with the
-ior--input-fileflag and is not a positional argument anymore - CLI: Replace the
--kernel-radiusparameter with the more common term--smoothing-length, it holds thatcompact_support_radius = 2.0 * smoothing_length - CLI: Other small changes in parameter naming, please refer to the
--helpfunction - Lib: Several library API changes
Regressions
- "Splash detection" currently does nothing
- The density map is currently not returned by the reconstruction
- Rust
Published by w1th0utnam3 about 5 years ago
splashsurf -
- CLI: Add support for reading BGEO files
- Lib: Allow passing in an existing
SurfaceReconstructionto reuse allocated memory (currently only memory for the resulting surface mesh is reused) (https://github.com/w1th0utnam3/splashsurf/pull/7) - Lib: Add
Defaulttrait bound toIndexandRealtypes - Update dependencies
- Rust
Published by w1th0utnam3 about 5 years ago
splashsurf -
- Move
vtkioconvenience trait implementations insplashsurf_libbehind a non-default feature flag (flagvtk-extras). Flag is enabled in the CLI crate. - Re-export
vtkiofrom lib if feature is enabled and use this from CLI - Move
coarse_profusage insplashsurf_libbehind a non-default feature flag (flagprofiling). Flag is enabled in the CLI crate. - Re-export
coarse_proffrom lib if feature is enabled and use this from CLI - Instead of directly writing into a global density map (
dashmap) in parallel, use thread local density maps (HashMaps) which are then merged in a second step (in parallel, into adashmap). Improves performance of the test scene in the readme from 20 seconds to 12 seconds. - Fix bug which forced some parts in the library to divide work into 8 chunks, preventing use of more threads
- Rust
Published by w1th0utnam3 about 5 years ago
splashsurf -
- Add support for reading PLY files (https://github.com/w1th0utnam3/splashsurf/pull/1)
- Update dependencies
- Re-export
nalgebrafrom lib, use this from binary
- Rust
Published by w1th0utnam3 about 5 years ago