File Types

TODO: This is a stub






UDM (Unified Data Model)

Property Types

ASCII-Name Size in bytes C++ Type Notes ASCII Value format
Trivial Types        
nil 0 void   nil
int8 1 int8_t   ?
uint8 1 uint8_t   ?
int16 2 int16_t   ?
uint16 2 uint16_t   ?
int32 4 int32_t   ?
uint32 4 uint32_t   ?
int64 8 int64_t   ?
uint64 8 uint64_t   ?
float 4 float   ?
double 8 double   ?
bool 1 bool   true/1 or false/0
vec2 8 glm::vec2   [x,y]
vec3 12 glm::vec3   [x,y,z]
vec4 16 glm::vec4   [x,y,z,w]
quat 16 glm::quat   [w,x,y,z]
ang 12 EulerAngles Angles in degrees, rotation order: y-p-r [p,y,r]
srgba 4 uint8_t[4] SRGB color with alpha ?
hdr 6 uint16_t[3]   ?
transform 28 umath::Transform Translation +Rotation [[tx,ty,tz][qw,qx,qy,qz]]
stransform 40 umath::ScaledTransform Translation +Rotation +Scale [[tx,ty,tz][qw,qx,qy,qz],[sx,sy,sz]]
mat4 64 glm::mat4   [[00,01,02,03][10,11,12,13][20,21,22,23][30,31,32,33]]
mat3x4 48 glm::mat3x4   [[00,01,02,03][10,11,12,13][20,21,22,23]]
Non-trivial types        
string Varying (>=1) std::string Null-terminated; ASCII "text"
utf8 Varying (>=1) ?

UTF8 String

Bytes [0-3]: Blob size as uint32

Remaining bytes: Binary data

Base64 encoded
blob Varying (>=8) udm::Blob

Bytes [0-7]: Blob size as uint64

Remaining bytes: Binary data

Base64 encoded

lz4 Varying (>=16) udm::BlobLz4

Bytes [0-7]: Uncompressed size as uint64

Bytes [8-15]: Compressed size as uint64_t

Remaining bytes: LZ4 compressed data

Starts with integer representing uncompressed size, then a semicolon, then the compressed data as Base 64 encoded data string

element Varying (>=4) udm::Element   ?
array Varying (>=5) udm::Array   ?



Field Type Value Notes
identifier char[3] "UDMB"  
version uint32 1  

Immediately after the header follows the root property.



Every element starts with a type, which determines how the following data should be interpreted:

Field Type Value Notes
type uint32_t Type enum  

The type corresponds to the type id column of the Property Types table.


Trivial Types

Trivial types have a constant size


Non-trivial Types

Non-trivial types have varying sizes and special rules associated with them depending on the type.


Strings are ASCII encoded and start with a single byte describing its length:

Field Size in bytes Type Value
length 1 uint8_t [0,255]
longLength 4/0 uint32_t/void  
string length char[length]  

A length of 255 is a special case for long strings! In this case a uint32 (4 byte) follows describing the actual length of the string! That also means that strings cannot be longer than 4,294,967,295 characters.

Immediately after the length follow length number of characters.



Field Type Notes
size uint64_t Size of the buffer
data uint8_t[size] Buffer data


Field Type Notes
compressedSize uint64_t Size of the buffer
uncompressedSize uint64_t Size of the buffer after decompression
compressedData uint8_t[compressedSize] LZ4-compressed data

LZ4 compressed.

Field Type Notes
size uint64_t Total size of the element (including children)
numberOfProperties uint32_t Number of child properties for this element
keyNames std::string[numberOfProperties] Array of key-names for all properties (as null-terminated strings)
properties Property[numberOfProperties] Array of child properties


Field Type Notes
valueType Type Type of the items contained in this array
size uint32_t Number of items in this array
totalSizeInBytes uint64_t/void The combined size of all children in the array.

The "totalSizeInBytes" field only exists if "valueType" is a non-trivial type! For arrays of trivial types, the field can be considered to be of type void!
For trivial array types, the total size can be calculated with size *sizeof(valueType).







Name Type Notes
mass float  
flags.loop bool