You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,8 @@ The following changes are present in the `main` branch of the repository and are
10
10
- Lib: Rename `AxisAlignedBoundingBox*d` typedefs to `Aabb3d` and `Aabb2d`
11
11
- Lib: Support reading VTU (VTK XML) files
12
12
- CLI: Support reconstruction of particles from VTU (VTK XML) files, including attributes
13
+
- CLI: Support for specifying an output pattern (e.g. "surface_{}.obj") using `--output-file`/`-o` when 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)
14
+
- 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)
@@ -80,7 +80,7 @@ In the future, flags may be added to switch the internal data structures to use
80
80
81
81
Note that for small numbers of fluid particles (i.e. in the low thousands or less) the multi-threaded implementation may have worse performance due to the task based parallelism and the additional overhead of domain decomposition and stitching.
82
82
In this case, you can try to disable the domain decomposition. The reconstruction will then use a global approach that is parallelized using thread-local hashmaps.
83
-
For larger quantities of particles the decomposition approach will be faster however.
83
+
For larger quantities of particles the decomposition approach will be faster, however.
84
84
85
85
As shown below, the tool can handle the output of large simulations.
86
86
However, it was not tested with a wide range of parameters and may not be totally robust against corner-cases or extreme parameters.
@@ -162,22 +162,34 @@ With these parameters, a scene with 13353401 particles is reconstructed in less
162
162
163
163
You can either process a single file or let the tool automatically process a sequence of files.
164
164
A sequence of files is indicated by specifying a filename with a `{}` placeholder pattern in the name.
165
-
The tool will then process files by replacing the placeholder with indices starting with `1` until a file with the given index does not exist anymore.
165
+
The tool will treat the placeholder as a `(\d+)` regex, i.e. a group matching to at least one digit.
166
+
This allows for any zero padding as well as non-zero padded incrementing indices.
167
+
All files in the input path matching this pattern will then be processed in lexicographical order (i.e. silently skipping missing files in the sequence).
166
168
Note that the tool collects all existing filenames as soon as the command is invoked and does not update the list while running.
167
169
168
170
By specifying the flag `--mt-files=on`, several files can be processed in parallel.
169
-
Note that you should ideally also set `--mt-particles=off` as enabling both will probably degrade performance.
171
+
If this is enabled, you should ideally also set `--mt-particles=off` as enabling both will probably degrade performance.
172
+
The combination of `--mt-files=on` and `--mt-particles=off` can be faster if many files with only few particles have to be processed.
170
173
171
174
## Input file formats
172
175
173
176
### VTK
174
177
175
-
Files with the "`.vtk`" extension are loaded using [`vtkio`](https://crates.io/crates/vtkio).
178
+
Legacy VTK files with the "`.vtk`" extension are loaded using [`vtkio`](https://crates.io/crates/vtkio).
176
179
The VTK file is loaded as a big endian binary file and has to contain an "Unstructured Grid" with either `f32` or `f64` vertex coordinates.
177
180
Any other data or attributes are ignored except for those attributes that were specified with the ` --interpolate-attributes` command line argument.
178
181
Currently supported attribute data types are scalar integers, floats and three-component float vectors.
179
182
Only the first "Unstructured Grid" is loaded, other entities are ignored.
180
183
184
+
Not that currently only the "pure" v4.2 legacy format is supported as documented on [here](https://kitware.github.io/vtk-examples/site/VTKFileFormats/#simple-legacy-formats).
185
+
This corresponds to the `--output-format vtk42` flag of the [`meshio convert`](https://github.com/nschloe/meshio) tool.
186
+
187
+
### VTU
188
+
189
+
VTK XML files with the "`.vtu`" extension are loaded using [`vtkio`](https://crates.io/crates/vtkio).
190
+
Currently only VTU files using ASCII or encoded binary are supported.
191
+
Files using "raw" binary sections (i.e. a `<AppendedData encoding="raw">...</AppendedData>` block) are not supported by `vtkio` at the moment.
192
+
181
193
### BGEO
182
194
183
195
Files with the "`.bgeo`" extension are loaded using a custom parser.
@@ -219,65 +231,77 @@ The file format is inferred from the extension of output filename.
Path to the input file where the particle positions are stored (supported formats: VTK 4.2, VTU, binary f32 XYZ, PLY, BGEO)
245
+
-s, --input-sequence <INPUT_SEQUENCE>
246
+
Path to a sequence of particle files that should be processed, use "{}" in the filename to indicate a placeholder. To specify an output format, use e.g. --output_file="filename_{}.obj"
247
+
-o, --output-file <OUTPUT_FILE>
248
+
Filename for writing the reconstructed surface to disk (default: "{original_filename}_surface.vtk")
249
+
--output-dir <OUTPUT_DIR>
250
+
Optional base directory for all output files (default: current working directory)
251
+
252
+
Numerical reconstruction parameters:
253
+
--particle-radius <PARTICLE_RADIUS>
254
+
The particle radius of the input data
255
+
--rest-density <REST_DENSITY>
256
+
The rest density of the fluid [default: 1000.0]
257
+
--smoothing-length <SMOOTHING_LENGTH>
258
+
The smoothing length radius used for the SPH kernel, the kernel compact support radius will be twice the smoothing length (in multiplies of the particle radius)
259
+
--cube-size <CUBE_SIZE>
260
+
The cube edge length used for marching cubes in multiplies of the particle radius, corresponds to the cell size of the implicit background grid
261
+
--surface-threshold <SURFACE_THRESHOLD>
262
+
The iso-surface threshold for the density, i.e. the normalized value of the reconstructed density level that indicates the fluid surface (in multiplies of the rest density) [default: 0.6]
263
+
--domain-min <X_MIN> <Y_MIN> <Z_MIN>
264
+
Lower corner of the domain where surface reconstruction should be performed (requires domain-max to be specified)
265
+
--domain-max <X_MIN> <Y_MIN> <Z_MIN>
266
+
Upper corner of the domain where surface reconstruction should be performed (requires domain-min to be specified)
267
+
268
+
Advanced parameters:
269
+
-d, --double-precision=<off|on> Whether to enable the use of double precision for all computations [default: off] [possible values: off, on]
270
+
--mt-files=<off|on> Flag to enable multi-threading to process multiple input files in parallel [default: off] [possible values: off, on]
271
+
--mt-particles=<off|on> Flag to enable multi-threading for a single input file by processing chunks of particles in parallel [default: on] [possible values: off, on]
272
+
-n, --num-threads <NUM_THREADS> Set the number of threads for the worker thread pool
273
+
274
+
Octree (domain decomposition) parameters:
275
+
--octree-decomposition=<off|on>
276
+
Whether to enable spatial decomposition using an octree (faster) instead of a global approach [default: on] [possible values: off, on]
277
+
--octree-stitch-subdomains=<off|on>
278
+
Whether to enable stitching of the disconnected local meshes resulting from the reconstruction when spatial decomposition is enabled (slower, but without stitching meshes will not be closed) [default: on] [possible values: off, on]
279
+
--octree-max-particles <OCTREE_MAX_PARTICLES>
280
+
The maximum number of particles for leaf nodes of the octree, default is to compute it based on the number of threads and particles
Safety factor applied to the kernel compact support radius when it's used as a margin to collect ghost particles in the leaf nodes when performing the spatial decomposition
283
+
--octree-global-density=<off|on>
284
+
Whether to compute particle densities in a global step before domain decomposition (slower) [default: off] [possible values: off, on]
285
+
--octree-sync-local-density=<off|on>
286
+
Whether to compute particle densities per subdomain but synchronize densities for ghost-particles (faster, recommended). Note: if both this and global particle density computation is disabled the ghost particle margin has to be increased to at least 2.0 to compute correct density values for ghost particles [default: on] [possible values: off, on]
287
+
288
+
Interpolation:
289
+
--normals=<off|on>
290
+
Whether to compute surface normals at the mesh vertices and write them to the output file [default: off] [possible values: off, on]
291
+
--sph-normals=<off|on>
292
+
Whether to compute the normals using SPH interpolation (smoother and more true to actual fluid surface, but slower) instead of just using area weighted triangle normals [default: on] [possible values: off, on]
293
+
--interpolate-attributes <INTERPOLATE_ATTRIBUTES>
294
+
List of point attribute field names from the input file that should be interpolated to the reconstructed surface. Currently this is only supported for VTK and VTU input files
295
+
296
+
Debug options:
297
+
--output-dm-points <OUTPUT_DM_POINTS>
298
+
Optional filename for writing the point cloud representation of the intermediate density map to disk
299
+
--output-dm-grid <OUTPUT_DM_GRID>
300
+
Optional filename for writing the grid representation of the intermediate density map to disk
301
+
--output-octree <OUTPUT_OCTREE>
302
+
Optional filename for writing the octree used to partition the particles to disk
303
+
--check-mesh=<off|on>
304
+
Whether to check the final mesh for topological problems such as holes (note that when stitching is disabled this will lead to a lot of reported problems) [default: off] [possible values: off, on]
281
305
```
282
306
283
307
### The `convert` subcommand
@@ -286,32 +310,27 @@ Allows conversion between particle file formats and between mesh file formats. F
286
310
is supported. For meshes only `VTK, PLY -> VTK, OBJ` is supported.
287
311
288
312
```
289
-
splashsurf-convert 0.9.0
290
-
Convert particle or mesh files between different file formats
0 commit comments