POV-Ray : Newsgroups : povray.general : Compression : Re: Compression Server Time
8 Aug 2024 10:22:11 EDT (-0400)
  Re: Compression  
From: Chris Colefax
Date: 12 Jan 2001 21:05:01
Message: <3a5fb7cd@news.povray.org>
Rune <run### [at] inamecom> wrote:
> I have some general questions about compression.
>
> I don't know much about different platforms. Is the .zip format accessible
> on all platforms? I always zip all my scene files before I upload them to
my
> website, but does that exclude some people from using them?
>
> If .zip is universally supported I have a question about mesh compression:
> what is the reason for the compression used by pcm and mesh2? Zipping a
mesh
> file is more efficient than using any of those formats, and a zipped
regular
> mesh is even smaller than a zipped pcm or mesh2.
>
> I have two guesses myself:
> 1) Zip is not universally supported.
> 2) The file size while sending the mesh over the net is not the reason for
> compression, but rather the file size on the local HD.

This is pretty much the case - ZIP may be an unofficial standard, but it's
not guaranteed to be available on all platforms, and to use the zipped file
you have to unzip it first (so the unzipped file plus the zipped file means
the disk space required while using the file is actually larger than the
uncompressed file!).

It was for these reasons that Warp first approached me with the idea of
creating a portable text format for meshes that could reduce the file size
without reducing functionality.  As it turned out, the format we eventually
developed offers *increased* functionality (deformations, hair growth,
subdivision surfaces, etc.) using the Compressed Mesh macros I and others
were able to create for the PCM format.

To clarify, Warp's Mesh Compressor does not (currently) reduce the number of
triangles in a mesh by replacing multiple, smaller faces with larger
triangles.  Instead it works like the ZIP format, reducing the amount of
repeated information in a file.  It does this firstly by removing common
elements (the triangle keyword, angled and curly brackets), and also by
searching for vertices shared by multiple triangles.

Certainly, it's not the most compact text format possible.  Warp and I
actually tried more compact forms, replacing digits with characters and
such, but found that parsing speed became unacceptably slow.  So, like many
things in POV, what we ended up with is a compromise that works at a
reasonable speed.

The mesh2 format works on the same principle as the PCM format, which (as I
understand it) is also found in other software that uses triangle mesh
surfaces.  In the end, the different compression formats have different
uses - if you have the disk space, an uncompressed mesh might the fastest
and easiest if you don't want to do anything fancy with it, whereas the PCM
gives you direct control over each vertex, and the mesh2 allows easy
conversion from other formats, such as UV-mapped models.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.