Comments (6)
I have a very rough (only works single threaded I think) branch, it appears to work on my data. Tests need to be added, and running in parallel as well.
https://github.com/h3mosphere/splashsurf/tree/triangulation-aabb
from splashsurf.
Hi, thanks for your interest in the library. It's nice to hear from people using it.
While I'm generally open to such a feature, can you describe a bit more what your use case is? Depending on the simulations that you run (e.g. by changing parameters or number of particles), I could imagine that if you prescribe an AABB for the mesh (i.e. essentially just cutting away parts of the mesh) that you can get big holes in the mesh e.g. if a wave (or the valley before a wave) extends above/below this AABB. Is this ok for you or does this not happen in your use case? Or how would you identify the "top surface" of the fluid? In more complex simulations, the water surface is not just a height field (i.e. mapping x and y coordinates to a height) but you can have "caves"/bubbles in the water due to waves breaking etc. So to me it's not obvious how you would detect the "top surface" except in some special cases. And if you just use an AABB you could have the aforementioned effect of the surface being clipping by the AABB.
In general, the goal of the library is currently to reconstruct a surface without holes that encloses all particles. In this context domain_aabb
parameter is used at first to filter out particles that are outside of this domain to reconstruct a surface that is inside of the domain and still closed. Maybe I should clarify the documentation on this.
The TriangulationCriterion
was indeed mostly intended for stitching purposes internally for the octree based domain decomposition to run the reconstruction in parallel. At the moment I'm switching to a new approach for the domain decomposition, which just uses a regular grid of subdomains instead of an octree. It doesn't need this implementation detail at all anymore and should be faster, especially for small marching cubes sizes. As a side note: you can try out this new approach by using the current git main branch of the library (e.g. using splashsurf_lib = { git = "https://github.com/InteractiveComputerGraphics/splashsurf" }
in your Cargo.toml
) and specifying a value for the subdomain_num_cubes_per_dim
parameter in the Parameters
struct instead of specifying the spatial_decomposition
parameter. The subdomain_num_cubes_per_dim
parameter can be set to something like Some(64)
in most cases and specifies how big each subdomain (i.e. a reconstruction "task" that is run in parallel) should be in terms of marching cubes cells in each direction (so for subdomain_num_cubes_per_dim = Some(n)
each subdomain will have n^3
cells).
That being said, in this reconstruction process the generation of the triangles themselves is actually quite cheap in comparison to the other parts (e.g. evaluating the fluid density / level-set function for each grid point). So for now you could also try to just generate the full mesh, and then filter out all triangles that are outside of your domain.
We can discuss other solutions if you can clarify the points I mentioned in the beginning.
from splashsurf.
In general, the goal of the library is currently to reconstruct a surface without holes that encloses all particles. In this context
domain_aabb
parameter is used at first to filter out particles that are outside of this domain to reconstruct a surface that is inside of the domain and still closed. Maybe I should clarify the documentation on this.
At least it was intended this way, but it looks like it currently doesn't work at all like this. I might have to fix this. But this is unrelated to your issue at the moment.
from splashsurf.
Hi,
For my use case, the bottom, & sides are largely irrelevant for my purposes, and also alot of unused data to the mesh files that are output. As my meshes are going to be in the order of 100MB+ for a full mesh, being able to ignore 3/4 of the triangles helps alot for file size and performance.
I know the domain AABB
when running my simulation, and can easily manufacture an AABB
that will cover my use cases, i.e an AABB
that is:
slightly smaller in the X & Z dimensions ( to remove the sides), just slightly above the domain minimum Y, and somewhere above the surface of the domain simulation (i.e. domain.aabb.max.y
+ 10.0).
So yes, the simulation output I have does indeed have cavities (3d dfsph), and no clear/easy way to define the 'top' surface. That being said, I can trivially know what the x & z dimension domain boundaries, and also the bottom, or bathymetry height of the simulation.
Having an AABB
aware TriangulationCriteria
works well enough for my use case, but I can also see having an arbitrary TriangulationCriteria could be a more general solution to this problem.
from splashsurf.
Previously I was using the tri_mesh crate for this, but this has some problems with loading meshes & hanging indefinately. Seeing that you already had TriangluationCriterion, made me hopeful that I could just avoid genrating the mesh at all.
from splashsurf.
In general, the goal of the library is currently to reconstruct a surface without holes that encloses all particles. In this context
domain_aabb
parameter is used at first to filter out particles that are outside of this domain to reconstruct a surface that is inside of the domain and still closed. Maybe I should clarify the documentation on this.
This was fairly obvious, and I just tried it in the off chance.
Understood that the intended goal of splashsurf is to generate manifold meshes. The branch I posted just recently, does output non-manifold meshes, and I'm not sure if this will cause problems in the future (for me).
Having manifold meshes makes sense for small/bounded domains (i.e a cup of water, or a container), but I am working with larger domains, that will probably need to be stitched with a larger plane mesh representing the ocean, otherwise the results look.. contrived. Making the domains significantly larger is impractical due the the already large size of the simulations (50GB RAM currently. which increases exponentially)
from splashsurf.
Related Issues (16)
- meshing panics with indeterminate data HOT 12
- Python wrapper HOT 5
- Some kind of odd mesh corruption HOT 1
- Error occured: Unable to detect file format of particle output file HOT 1
- About bgeo file HOT 8
- VTK parsing error HOT 13
- How to specify the output file format of "Sequences of files" HOT 6
- Trouble converting mesh from vtk to obj HOT 3
- normal support HOT 1
- release new crates version with nalgebra 0.27 HOT 7
- vertices and indices out param support HOT 3
- panic during meshing reconstruction in neighorhood_search HOT 2
- optional vtkio dependency HOT 5
- crates release of splashsurf_lib to match salva 0.7 HOT 2
- perf improvements: generate_iso_surface_vertices and generate_sparse_density_map HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from splashsurf.