faster signing, xSDF/1

I’m investing a bit in xSDF, a GPU numerics side project to convert .stl geometry files into signed distance fields for JAXFLUIDS’ levelset.

Anyhow, I was recently at a mini-conference and was pretty impressed by one of the presentations using deepSDF (a neural implicit SDF generator) for parameter-free shape optimization. I was thinking, I have a differentiable SDF generator, and it is quite fast (faster than trimesh atleast), so maybe this could be vastly more useful with a bit more attention (I have some ideas, I’ll jot them down here as this progresses).

I want to first start by making this code faster with a few implementations and hacks from the computer graphics world.

In terms of speed, I see two main bottle necks right now in my current code:

  1. The unsigned, per point-to-triangle distance queries, which are currently Axis-Aligned Bounding Box (AABB) only.
  2. Brute force signing via solid angle.

On my roadmap for this repo, I have the implementation of Bounding Volume Hierarchy (BVH), which I have come across in a specific CFD context from this MSc thesis by R.Hellemans. It seems quite promising and apparently quite fast. This will be to tackle point 1. If I get something working, I have some ideas for point 2.

Main aim atm is start with a vectorized BVH in PyTorch and keep the whole thing differentiable end-to-end.