Author Topic: OpenCTM — the Open Compressed Triangle Mesh file format Unpack routine  (Read 6432 times)

0 Members and 1 Guest are viewing this topic.

Offline energy

  • Amiga 1200
  • ****
  • Posts: 280
  • Karma: 25
    • View Profile
Hi!
Did anyone played with that lib arround?
OpenCTM — the Open Compressed Triangle Mesh file
http://openctm.sourceforge.net/

It compresses the Wavefront Obj-files in a very good size.
My prob is that im not a C++ coder.
Is there anybody out here,who can strip the Unpack routine
in a single tiny static lib, without all other unneeded functions
??

Thanx in advance...
eNeRGy
coding: jwasm,masm
hobby: www.scd2003.de

Offline va!n

  • Pentium
  • *****
  • Posts: 1435
  • Karma: 109
    • View Profile
    • http://www.secretly.de
i think it would be interested for the guy, who create a decompress lib only, what kind of compression you are used? MG1, MG2, RAW... Seems the packer is based on LZMA...

- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

Offline energy

  • Amiga 1200
  • ****
  • Posts: 280
  • Karma: 25
    • View Profile
Hi va!n !
Nice to hear yu again!
MG2 Compression is used. Model was packed with the OPENCMT viewer. Compressed from 139K to 6K.
Decompressor should be tiny small for use with 64K Intros.So there could be only MG2 decompression in....
coding: jwasm,masm
hobby: www.scd2003.de

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1294
  • Karma: 466
    • View Profile
    • my stuff
If you're heading for 64k it's not a good idea to use compressed data in your binary:
- You'll use some exe-packer anyway and you don't want to spend precious bytes on a second decompressor.
- The exe-packer will be having a hard time trying to pack already-compressed data.

So you better apply only the prediction sheme to reduce entropy and let the packer care about the rest.
Challenge Trophies Won:

Offline energy

  • Amiga 1200
  • ****
  • Posts: 280
  • Karma: 25
    • View Profile
OK.
Which way would yu go to export tiny modeldata from eg. Blender...
What could be a good way to reduce the size of the data?
coding: jwasm,masm
hobby: www.scd2003.de

Offline va!n

  • Pentium
  • *****
  • Posts: 1435
  • Karma: 109
    • View Profile
    • http://www.secretly.de
Hi energy! I think the best way to get a good packrate is to cut down the data but withput packing... In this case probaly the best way is to use the converted dataformat in a uncompressed way (also the MG2 format but not packed... just as raw, so the exepacker can work on this to reach the best packing rate.
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1294
  • Karma: 466
    • View Profile
    • my stuff
What could be a good way to reduce the size of the data?
Here is a simple prediction-scheme for vertex-positions:

Assume you're starting with an initial triangle (v1,v2,v3).
Find a neighbouring triangle which shares an edge with the current triangle.
Now find the centroid of the shared edge and project the unshared vertex (in this case v1) over to the other side.
Instead of storing v4 you just store the delta from the predicted position to the actual vertex.
As these deltas will cover a much smaller range than absolute positions, you can easily quantize them to just a few bits.
Challenge Trophies Won:

Offline energy

  • Amiga 1200
  • ****
  • Posts: 280
  • Karma: 25
    • View Profile
thanx hellfire.
will have a closer look on it!
coding: jwasm,masm
hobby: www.scd2003.de