CesiumGS/3d-tiles

Specification of MIME Types (Media Types) in 3D Tiles

javagl opened this issue · 4 comments

This is related to #341 .

This is an attempt to collect the information about media types and file extensions for 3D Tiles, which could go into the specification at some point. (This information is already available to some extent, but summarized and extended here).

File Extensions and Media Types


In the definitions above, "should" means "SHOULD" as in https://www.rfc-editor.org/info/bcp14. Specifically: File extensions are generally considered to be optional. But without any file extension and explicit MIME type determination, it can be hard to differentiate between a Tileset JSON and a glTF JSON, for example (see #341 (comment) for related discussion). The implicit tiling specification originally defined a mimeType field for the conetnt, but this has been removed at some point. Some related discussion about determining the type of image data (and all the options and caveats) can be found in KhronosGroup/glTF#1966 .

A related question is whether there should be efforts to officially register certain MIME types for 3D Tiles, but this might better fit into #341 .

"tileset.json" is so ubiquitous at this point that I think the recommended extension should stay .json.

The subtree file extension should probably be .json as well.

Subtree Binary files should use the .subtree extension, and the application/octet-stream Media Type.

Or .subt if we want something shorter

Quantized Mesh - TODO

Probably out of scope for this

Until we've officially registered media types there's also the option of using vendor prefixes, e.g. application/vnd.3dtiles.tileset+json, application/vnd.3dtiles.subtree+json,application/vnd.3dtiles.schema+json

Sorry, the .tileset was a Copy+Paste error (I shouldn't have submitted it without proofreading, despite the call 2 minutes later...).

I had seen the use of the vnd. prefix for vnd.quantized-mesh, but wasn't sure whether there are plans for registering MIME types.

Also, the question of whether the MIME types are supposed to be encoded in some content { mimeType: "...", ... } property demains to be decided.

The 3D Tiles 1.1 specification contains a section that summarizes the MIME types (Media Types). And it generally says that one should not rely on file extensions. Further clarifications or additions (like a mimeType property in content objects and such) would be a change that could go into the next version.