-
Notifications
You must be signed in to change notification settings - Fork 20
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
RFC: only triangulate surface based on TrianglulationCriteria
, or triangluate_aabb
#191
Comments
TrianglulationCriteria
, or triangluate_aabb
TrianglulationCriteria
, or triangluate_aabbTrianglulationCriteria
, or triangluate_aabb
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 |
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 The 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. |
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. |
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 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 |
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. |
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) |
Hello,
I am using this for reconstruction of a volume of water, however I am only interested in the top surface of the volume, not the sides or the bottom. I thought passing domain_aabb in Parameters to reconstruct_surface might work, but alas this is not the right thing.
I see the internals of the marching cubes allows
TriangulationCriteria
. However this is not exposed.It would be very nice to have either:
an Optional parameter on the
Parameters
struct, i.e.triangulation_aabb: Option<AxisAlignedBoundingBox>
or expose the
TriangulationCriteria
on the crate, and allow for passing in an implementor via theParameters
struct.
Having both would be nice for a) ease of usage of
AABB
basedTriangulationCriteria
, b) maximum flexibility going forward.I'm willing to have a look at this, but any thoughts on changes to the public interface would be welcome.
Also there might be some trickery regarding a global TriangulationCriteria, and merging the results of subdomain TriangulationCriteria. AFAICT TriangulationCriteria is used for stitching subdomains together generated in parallel..?
The text was updated successfully, but these errors were encountered: