| 1.0 |
9/29/06 |
Initial Release |
| 1.1 |
2/27/07 |
"Edit face data" amended to
included precomputed constant value |
| 1.2 |
1/5/09 |
Added: subface flag, const
neighborhood flag, u/v border modes, separately stored large metadata
items. Clarified triangle texture storage. |
| 1.3 |
10/20/09 |
Corrected size of "keysize" and "datatype" in meta data spec to match implementation. Revised large metadata spec (not previously implemented). Added "editdatapos" to extended header. Added "compatibility barrier" for pre-1.3 file readers. Added minor version to header. |
| 1.3r1 |
6/2/10 |
Corrected details of Constant Data block to match implementation. |
| Header |
description of file contents
(fixed length, will never grow) |
| Extended Header |
additional header data, may grow
in future |
| Face Info |
information about each face |
| Constant Data | pre-filtered, constant valued data for each face |
| Level Info |
information about each level |
| Level Data |
data for each level |
| Meta Data | miscellaneous small data stored
as single block |
| Compatibility Barrier |
barrier preventing pre-1.3 file readers from reading new data sections |
| Large Meta Data |
separately stored large meta
data items |
| (future expansion) |
|
| Edit Data |
incremental edits posted to the
file |
| magic |
char[4] |
magic identifier = string "Ptex" |
| version |
uint32 |
major version number (=1) |
| meshtype |
uint32 |
0=triangle, 1=quad |
| datatype |
uint32 |
0=uint8, 1=uint16, 2=float16,
3=float32 |
| alphachan |
uint32 |
index of alpha channel -1 (0xffffffff) indicates no alpha channel |
| nchannels | uint16 | number of data channels |
| nlevels | uint16 | number of levels |
| nfaces |
uint32 |
number of faces |
| extheader size |
uint32 |
size of Extended Header block |
| faceinfo size |
uint32 |
size of Face Info block |
| constdata size | uint32 | size of Constant Data block |
| levelinfo size |
uint32 |
size of Level Info block |
| minor version | uint32 | minor version number |
| leveldata size | uint64 | total size of all Level Data
blocks |
| metadata zipsize |
uint32 |
on-disk size of Meta Data block
(zipped) |
| metadata memsize |
uint32 |
in-memory size of Meta Data
block (unzipped) |
| ubordermode |
uint32 |
0=clamp (default), 1=black,
2=periodic |
| vbordermode | uint32 | 0=clamp (default), 1=black, 2=periodic |
| largemetadata header zipsize |
uint32 |
on-disk size of Large Meta Data
Header (zipped) |
| largemetadata header memsize |
uint32 |
in-memory size of Large Meta Data Header (unzipped) |
| largemetadata size |
uint64 |
total on-disk size of Large Meta
Data blocks (not including header) |
| editdata size |
uint64 |
size of edit data blocks |
| editdata pos |
uint64 |
absolute file position of first edit data block |
| ures |
uint8 |
log2(number of samples in u
direction) |
| vres |
uint8 |
log2(number of samples in v
direction) |
| adjedges | uint8 | ids of edges on adjacent faces
(0 .. 3) x 4 faces (see notes) |
| flags |
uint8 |
bit0=constant - all pixels in
face have same value bit1=has edits (not stored in file, for api only) bit2=constant neighborhood - all neighboring faces have same value as this face bit3=subface - face is a subface |
| adjfaces |
uint32[4] |
faceids of adjacent faces (0 ..
nfaces) -1 (0xffffffff) indicates a border (no adjacent face) |
| leveldatasize |
uint64 |
size of level's data block
(including level data header) |
| levelheadersize |
uint32 |
compressed size of level data
header |
| nfaces |
uint32 |
number of faces in level |
| facesize |
uint32 (bits 0..29) |
sizes of data block for each face |
| encoding |
bits 30..31 of facesize |
0 = constant valued (1 sample
per channel) 1 = zip compressed 2 = zip compressed w/ differencing 3 = tiled |
| tileures |
uint8 |
log2(number of samples per tile
in u
direction) |
| tilevres |
uint8 |
log2(number of samples per tile
in v
direction) |
| tileheadersize |
uint32 |
compressed size of tile header |
| tilesizes |
uint32 (bits 0..29) |
sizes of data block for each tile |
| encoding |
bits 30..31 of tilesize |
0 = constant valued (1 sample
per channel) 1 = zip compressed 2 = zip compressed w/ differencing |
| keysize |
uint8 |
length of key string (including
null) |
| key |
uint8[keysize] |
ascii character string
(null-terminated) |
| datatype |
uint8 |
0=ascii, 1=int8, 2=int16,
3=int32, 4=float, 5=double |
| datasize |
uint32 |
size of data block (in bytes) |
| data |
uint8[datasize] |
data block |
| barrier |
uint64 |
must be zero |
| keysize |
uint8 |
length of key string (including null) |
| key |
uint8[keysize] |
ascii character string (null-terminated) |
| datatype |
uint8 |
0=ascii, 1=int8, 2=int16, 3=int32, 4=float, 5=double |
| datasize | uint32 | size of data block (in bytes) |
| zipsize |
uint32 |
size of data block on disk |
| edittype |
uint8 |
1=edit face data, 2=edit meta
data |
| editsize |
uint32 |
size of editdata block |
| editdata |
(variable) |
based on edit type |
| faceid |
uint32 | index of face |
| faceinfo |
FaceInfo block |
(as described in FaceInfo
section) |
| facesize & encoding |
uint32 | (as described in Level Data
section) |
| constval |
uint8[pixelsize] |
constant value (average pixel
value, as described in Constant Data section) |
| facedata |
uint8[facesize] |
encoded data block |
| metadatazipsize |
uint32 |
compressed size of meta data |
| metadatamemsize | uint32 | uncompressed size of meta data |
| metadata |
uint8[metazipsize] |
one or more data blocks (as
described in Meta Data section) |