marian42 / mesh_to_sdf

Calculate signed distance fields for arbitrary meshes
https://pypi.org/project/mesh-to-sdf/
MIT License
991 stars 107 forks source link

Possible acceleration methods for sample sdf from mesh? #40

Open Eric-Gty opened 1 year ago

Eric-Gty commented 1 year ago

hi there, I'm writing to ask whether there are possible ways to accelerate the surface sampling process from the mesh vertex to the SDF. I'm working on some personalized datasets with mesh vertex constructing some objects, when I'm trying to sample 800 SDF points from each mesh vertex, the time spent is around 35-40 seconds each, it's very time-consuming with a large dataset.

Also, based on my observation, it's' unlikely to use multi-process, e.g., num_workers in the torch dataloader, to accurate this process. Because when using multi-process, the time even increases by 2 times. Maybe it's because this package doesn't really support multi-process yet.

So, just curious about the potential solution to this. Thanks a lot :))

philippwulff commented 1 year ago

You can pre-process the data and save it in SDF format. Loading that is quicker than converting on the fly.