2

I write imorter fbx-files, guided the specification located on this link https://code.blender.org/2013/08/fbx-binary-file-format-specification/ . It says that the data sets can be compressed (for example, an array of vertices). Ok. When exporting from Blender, I get the compressed set of vertices, but I can not unpack them, because they did not fit any one library (DotNetZip, SharpZipLib). What's wrong?

Example:

Note: Vertex is a double type

U

ncompressed vertices in ascii fbx file: 

-12.500000,-12.500000,0.000000,12.500000,-12.500000,0.000000,-12.500000,12.500000,0.000000,12.500000,12.500000,0.000000,-12.500000,-12.500000,25.000000,12.500000,-12.500000,25.000000,-12.500000,12.500000,25.000000,12.500000,12.500000,25.000000

Compressed binary data:

    [0] 120 byte
    [1] 1   byte
    [2] 99  byte
    [3] 96  byte
    [4] 0   byte
    [5] 1   byte
    [6] 205 byte
    [7] 3   byte
    [8] 96  byte
    [9] 10  byte
    [10]    78  byte
    [11]    67  byte
    [12]    120 byte
    [13]    64  byte
    [14]    113 byte
    [15]    7   byte
    [16]    28  byte
    [17]    226 byte
    [18]    7   byte
    [19]    160 byte
    [20]    226 byte
    [21]    80  byte
    [22]    121 byte
    [23]    8   byte
    [24]    15  byte
    [25]    73  byte
    [26]    61  byte
    [27]    186 byte
    [28]    248 byte
    [29]    1   byte
    [30]    136 byte
    [31]    10  byte
    [32]    152 byte
    [33]    61  byte
    [34]    150 byte
    [35]    80  byte
    [36]    121 byte
    [37]    116 byte
    [38]    243 byte
    [39]    225 byte
    [40]    226 byte
    [41]    48  byte
    [42]    245 byte
    [43]    80  byte
    [44]    117 byte
    [45]    112 byte
    [46]    113 byte
    [47]    52  byte
    [48]    125 byte
    [49]    150 byte
    [50]    14  byte
    [51]    0   byte
    [52]    146 byte
    [53]    244 byte
    [54]    12  byte
    [55]    117 byte
Sport
  • 8,570
  • 6
  • 46
  • 65

1 Answers1

2

That data is a zlib stream and can be decompressed with zlib. The decompressed result is shown here in hex:

00 00 00 00 00 00 29 c0 00 00 00 00 00 00 29 c0
00 00 00 00 00 00 00 00 00 00 00 00 00 00 29 40
00 00 00 00 00 00 29 c0 00 00 00 00 00 00 00 00
00 00 00 00 00 00 29 c0 00 00 00 00 00 00 29 40
00 00 00 00 00 00 00 00 00 00 00 00 00 00 29 40
00 00 00 00 00 00 29 40 00 00 00 00 00 00 00 00
00 00 00 00 00 00 29 c0 00 00 00 00 00 00 29 c0
00 00 00 00 00 00 39 40 00 00 00 00 00 00 29 40
00 00 00 00 00 00 29 c0 00 00 00 00 00 00 39 40
00 00 00 00 00 00 29 c0 00 00 00 00 00 00 29 40
00 00 00 00 00 00 39 40 00 00 00 00 00 00 29 40
00 00 00 00 00 00 29 40 00 00 00 00 00 00 39 40
Community
  • 1
  • 1
Mark Adler
  • 101,978
  • 13
  • 118
  • 158