Skip to content

Instantly share code, notes, and snippets.

@attilaz
Created October 28, 2017 11:30
Show Gist options
  • Save attilaz/acc2e94527f03a63512b9ec34894f24f to your computer and use it in GitHub Desktop.
Save attilaz/acc2e94527f03a63512b9ec34894f24f to your computer and use it in GitHub Desktop.
geometryc benchmark
I have tested two large obj file with geometryc.
ApCity uncompressed zip lzma
No Index compress 1,366,519 486,989 337,053
Index compress 1,244,034 432,734 296,368
Index+Vertex DWORD 1,244,034 388,990 300,717
Salle
No Index compress 28,663,702 17,863,876 11,664,913
Index compress 23,113,376 15,139,086 10,015,495
Index+Vertex DWORD 23,113,376 13,574,481 10,216,997
Horde3D geometry format stores vertex data per channel instead of the interleaved format that geometryc uses.
I tried deinterleaving the data that seems to be good for zip compression but bad for lzma.
We are using lzma for package compression on mobile. So geometryc's method is better.
Vertex DWORD compression
#if 0
int numDwords = stride / 4;
for (uint32_t dw = 0; dw < numDwords; ++dw)
for (uint32_t v = 0; v < _numVertices; ++v)
write(_writer, _vertices + v * stride + dw * 4, 4);
#else
write(_writer, _vertices, _numVertices*stride);
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment