orka icon indicating copy to clipboard operation
orka copied to clipboard

Create binary storage format

Open onox opened this issue 5 years ago • 0 comments

glTF has several problems because it was designed for WebGL instead of OpenGL 4.x:

  • Requires PNG and JPG support (needs to be decoded and do not use GPU compression) but does not support KTX textures
  • Requires parsing a JSON file, which slows down loading models
  • Each mesh in a model's scene may use a different vertex format. Although in practice the format of the attributes is the same for all meshes, their index type (uint16 or uint32) may differ
  • No SPDX license identifier for meshes

Create a binary storage format:

  • Based on document container files using the dcf-ada library (already used for locations in #35)
  • Require all files stored in the container to use the "store" compression format
    • Vertex data may be compressed with Draco
  • Optimized for OpenGL 4.3 or later and Vulkan
  • Any software supporting this format must ignore any unknown files in the container
  • TODO Add that assets can be assumed/required to be on SSDs? (No slow storage)
  • TODO Support cameras, lights and speakers?
  • Textures must be stored in one or more KTX files in the container
  • TODO Specify PBR requirements for materials
    • TODO Specify transparency, refraction, and clear coat requirements
  • ~~Vertex attributes must not be interleaved~~
    • TODO Allow quantization parameters?
  • Vertex buffers and the index buffer are stored in separate files in the container
  • Must contain an index buffer
  • Contains a file describing the vertex format
    • Index type must be unsigned short or unsigned int
    • A vertex format has a single specific index type
  • Contains a file describing the bounding boxes of meshes
  • Contains a file with an array of draw commands (GL.Types.Indirect.Elements_Indirect_Command_Array)
    • TODO Multiple arrays for different pipeline state? (Opaque and transparent meshes) (in that case there may be multiple vertex formats as well)
  • Contains a file describing the scene tree
    • TODO Specify how the tree must be stored (a single array of the levels or multiple levels)
  • Contains a file with copyright and SPDX license identifiers of the meshes
    • TODO Contain matrices (or euler or quaternions) and/or visibility flags?
    • TODO Support multiple LoDs?
  • TODO Support skinning and animation?

onox avatar Jun 17 '19 08:06 onox