GitHub - IntermediateAsset/spec: Asset Change Specification (original) (raw)

Asset Exchange Specification

Asset Exchange will use (.ae) or Intermediate Asset (.ia) for default file extension. The name "Asset Exchange" may be changed until the spec is completed. The file will be binary not JSON/XML. This will make loading stage faster.

Names Suggessions

Expected Features

Official Loader

AssetKit will be the official loader but some alternative simple loader may be provieded if needed.


Spec

Files are completely BINARY, and must start with start MAGIC number: IAEF.

Format:

| Header | AssetInfo | Sections Header | Sections | Embedded Data | EOF |

1. Header

4: uint32_t - Magic (IAEF)
4: uint32_t - Version
8: uint64_t - File Length

2. Sections Header

4: uint32_t - Sections Count

3. AssetInfo

1: uint8_t  - UP Axis
1: uint8_t  - Front face winding order (Default is counter-clockwise (CCW))
8: time_t   - created at (unix timestamp)
8: time_t   - modified at (unix timestamp)

Up Axis must be one of:

Winding order must be one of:

0: Counter-clockwise (CCW)
1: Clockwise (CW)

4. Sections

Sections are used to group specific types of elements like lights, cameras, nodes, scenes. A section provides section type which identifies itself.

| Type | Length | Section Content |
4: uint32_t  - Type
8: uint64_t  - Length
N: Section Content

Each section will define its own content definition separately.

Section Types:

0:  Unknown / Invalid
1:  Mesh Primitives
2:  Geometries
3:  Materials
4:  Effects
5:  Images
6:  Textures
7:  Samplers
8:  Scenes
9:  Lights
10: Cameras
11: Animations
...

Sections

  1. Mesh Primitives
  2. Geometries