Signed Distance Field Representation of Geometry Extension

I know that GLTF is normally used for triangle mesh representations of 3D geometry, but my work would benefit from having some additional representations of 3D data. I was hoping to write an extension to GLTF file format that allows for use of signed distance values on a regular 3D grid to define geometry, but I have some questions.

  1. Should I extend the definition of “mesh” to include this volumetric representation or should I create a new top level element?
  2. Is GLTF explicitly for triangle mesh surface representations. By that I mean, should I not bother writing this extension to the file type?


SDFs seem like a totally reasonable use of a custom glTF extension to me. :slight_smile:

Presumably you’ll be implementing a loader that reads this extension, so I’d trust your own instinct on where to put the data. But my first guess would be that it might attach to a “node” rather than a “mesh”, if you want to consider it a distinct resource in the scene graph. Alternatively you could consider the SDF shader to be a new type of “material” and extend that instead. Or possibly a combination of the two.