AXS format

AXS is Axis' native 3D scene format. It's an open format, which conforms to Axis' binary hierarchical serialization standard.

Generally, an AXS file contains a full 3D scene, which can be opened and displayed by Axis.
It can also contain just a resource or a set of resources like meshes, textures, materials and etc.
Resources in an AXS file can have references to external files - for example, a texture usually references an image file. This way multiple scenes can share the same files.
It is important to provide all the referenced files along with the AXS file, maintaining their relative path to the AXS

Embedding

An AXS file may have the external referenced files embedded, either in their original form or decoded to a native format.
For example, a texture resource may, instead of referencing a JPG image file, have it directly embedded in the AXS file itself. The JPG file data may be embedded in its original JPEG-encoded form, or be decoded to a format native to Axis.

Embedding in the original file encoding may produce a smaller AXS file, but will require the proper decoding module available for any Axis program which has to open the scene file.
Embedding allows for a single file to hold all the necessary data for a scene, but this has the disadvantage of a bigger file size and does not allow for sharing of files between scenes.

These options can be selected in Axis Editor from the main menu Scene -> Properties

Serialization

The AXS data is serialized and deserialized by the AxNativeFileWriter and AxNativeFileReader classes respectively.

An AXS starts with its main wrapping chunk, which has an ID value of 0x53495841, which is "AXIS" in ASCII. This is why all AXS files begin with that sequence.
The resources' data is located inside of a chunk with an ID of 0x20000000, which is a subchunk of the main chunk. Inside of it, the resources are stored, each in its own chunk with ID of 0x21000000.
The actual serialization and de-serialization of each resource is done in the Serizalize() and Deserialize() methods of AxResource-derived classes.

Each type of resources has its own kinds of data and subchunks, which can be checked in the implementations of the respective resource classes.

The main chunk may contain other chunks regarding header information, scene parameters, even thumbnails. See the implementation of aforementioned classes for details.

Customization

Because of the chunked hierarchical structure of the AXS format, it allows for custom data to be injected on any level of the serialization process and then retrieved back at deserialization, by customizing the Serialize() and Deserialize() methods of resources or AxNativeFileWriter's Write() method and AxNativeFileReader's Read() method.

If done properly, that is, to have the custom data in its own chunks with unique IDs, the produced AXS format will be perfectly valid and readable to any Axis-driven application.