• Welcome to Dark Bit Factory & Gravity.
 

OpenCTM — the Open Compressed Triangle Mesh file format Unpack routine

Started by energy, February 09, 2011

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

energy

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

va!n

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:

energy

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

hellfire

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:

energy

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

va!n

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:

hellfire

Quote from: energy on February 10, 2011What 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:

energy

coding: jwasm,masm
hobby: www.scd2003.de