POV-Ray : Newsgroups : povray.general : Compression Server Time
8 Aug 2024 18:17:31 EDT (-0400)
  Compression (Message 1 to 10 of 37)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Rune
Subject: Compression
Date: 12 Jan 2001 14:45:45
Message: <3a5f5ee9@news.povray.org>
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.

Ignorantly,

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 6)
/ Also visit http://www.povrayusers.org


Post a reply to this message

From: Christoph Hormann
Subject: Re: Compression
Date: 12 Jan 2001 15:13:57
Message: <3A5F6586.973E5EE6@gmx.de>
Rune 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?
> 

I think ZIP is quite universal, don't know about Macs, but DOS, Windows,
OS/2 and most unix'es are ok.  C-source for ZIP is available, so there
should be some version on most platforms.  TGZ (.tar.gz) is also widely
supported, but it's much less common on the Windows platforms, so it would
not be such a good idea.  BTW, it's much more efficient when packing a lot
of smaller files.  

I personnaly don't see much need to compress single pov code files, since
otherwise you can directly view them and have less work when downloading.

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Gilles Tran
Subject: Re: Compression
Date: 12 Jan 2001 16:23:22
Message: <3A5F7662.D8DFB100@inapg.inra.fr>
Rune wrote:

> If .zip is universally supported I have a question about mesh compression:
> what is the reason for the compression used by pcm and mesh2?

Pcm and mesh2 are text formats, not binary, which makes them portable and
editable, which are too good reasons. I also guess that zip support is not
royaltee-free (I could be wrong).

G.

--

**********************
http://www.oyonale.com
**********************
Graphic experiments
Pov-ray gallery


Post a reply to this message

From: Josh English
Subject: Re: Compression
Date: 12 Jan 2001 17:01:12
Message: <3A5F7F17.EFF37149@spiritone.com>
There is shareware for the Mac that can open .zip files.

Josh

Christoph Hormann wrote:

> Rune 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?
> >
>
> I think ZIP is quite universal, don't know about Macs, but DOS, Windows,
> OS/2 and most unix'es are ok.  C-source for ZIP is available, so there
> should be some version on most platforms.  TGZ (.tar.gz) is also widely
> supported, but it's much less common on the Windows platforms, so it would
> not be such a good idea.  BTW, it's much more efficient when packing a lot
> of smaller files.
>
> I personnaly don't see much need to compress single pov code files, since
> otherwise you can directly view them and have less work when downloading.
>
> Christoph
>
> --
> Christoph Hormann <chr### [at] gmxde>
> IsoWood include, radiosity tutorial, TransSkin and other
> things on: http://www.schunter.etc.tu-bs.de/~chris/

--
Josh English -- Lexiphanic Lethomaniac
eng### [at] spiritonecom
The POV-Ray Cyclopedia http://www.spiritone.com/~english/cyclopedia/


Post a reply to this message

From: Josh English
Subject: Re: Compression
Date: 12 Jan 2001 17:09:39
Message: <3A5F8112.276CFCD5@spiritone.com>
I beleive you're talking about two differnet compression needs. ZIP compresses
text files and encodes them in a way that is smaller than usual. Mesh
Compression, as I understand it, determines if a mesh has useless triangle and
removes them from the mesh, replacing them with larger triangles that fit the
job. So if a mesh was a grid of triangles that formed a flat square, it would
get replaced by two or three triangles.

More importantly, yes ZIP is a great method of making big files small, I don't
think POV-Ray can read the contents of a zip archive and use the code.

Josh
Rune 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.
>
> Ignorantly,
>
> Rune
> --
> \ Include files, tutorials, 3D images, raytracing jokes,
> / The POV Desktop Theme, and The POV-Ray Logo Contest can
> \ all be found at http://rsj.mobilixnet.dk (updated January 6)
> / Also visit http://www.povrayusers.org

--
Josh English -- Lexiphanic Lethomaniac
eng### [at] spiritonecom
The POV-Ray Cyclopedia http://www.spiritone.com/~english/cyclopedia/


Post a reply to this message

From: Chris Huff
Subject: Re: Compression
Date: 12 Jan 2001 17:26:06
Message: <chrishuff-FFB3D6.17274712012001@news.povray.org>
The .zip file format seems pretty universal...the preferred Mac format 
is StuffIt (.sit), but StuffIt Expander can open .zip files, and there 
are other shareware/freeware programs to decompress them. Linux and Unix 
systems also have software to open them.

However, they serve different needs...compressed meshes are just a file 
format that takes up less space while storing the same data, .zip files 
are archived files packed into a single file, usually for storage, 
backup, or transfer to another system, not for general use. Your 
question is similar to asking why there is a PNG or compressed TGA 
format when you can simply .zip up a PPM or plain TGA.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

From: Rick [Kitty5]
Subject: Re: Compression
Date: 12 Jan 2001 18:14:03
Message: <3a5f8fbb@news.povray.org>
> 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 your going toi use compression - and your should - zip is probably your
best bet, its about the closest there is to a 'standard'

much better to use zip than say RAR or ACE...


--
Rick

POV-Ray News & Resources - http://povray.co.uk
Kitty5 WebDesign - http://kitty5.com
Hi-Impact web site design & database driven e-commerce
TEL : +44 (01625) 266358 - FAX : +44 (01625) 611913 - ICQ : 15776037

PGP Public Key
http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x231E1CEA


Post a reply to this message

From: Margus Ramst
Subject: Re: Compression
Date: 12 Jan 2001 20:20:56
Message: <3A5FADBC.FCCBD88D@peak.edu.ee>
Rune wrote:
> 
> I have some general questions about compression.
> 
[snip]

These are two different things.
The mesh compressor is specifically optimized for meshes; I believe it does
things like store coplanar faces as one larger face and maybe keep a separate
list of faces and vertices so coincident vertices are not duplicated (all this
is just my guess, of course).
ZIP and similar compressors use a generic algorithm; it basically looks for
recurring "patterns" in the input file and replaces the duplicates with pointers
to a "library of phrases".
POV can (with appropriate macros) read PCM files directly. ZIP files must first
be unpacked. I suppose it might be possible to make POV unpack and read zipped
files internally; and it shouldn't create serious portability issues. Whether or
not it would be worth the effort, I don't know.
Anyway, if you really want the smallest possible file size, first pass the mesh
through the mesh compresson and then zip it - you'll have the best of both
worlds.

-- 
Margus Ramst

Personal e-mail: mar### [at] peakeduee
TAG (Team Assistance Group) e-mail: mar### [at] tagpovrayorg
Home page http://www.hot.ee/margusrt


Post a reply to this message

From: Rune
Subject: Re: Compression
Date: 12 Jan 2001 20:51:41
Message: <3a5fb4ad@news.povray.org>
"Margus Ramst" wrote:
> The mesh compressor is specifically optimized for meshes;
> ZIP and similar compressors use a generic algorithm;

But my point was that zip is far more effective.

> POV can (with appropriate macros) read PCM files directly.
> ZIP files must first be unpacked.

Yes, I think this is the real reason that PCM files are better.

> Anyway, if you really want the smallest possible file size,
> first pass the mesh through the mesh compresson and then zip
> it - you'll have the best of both worlds.

No, actually a zipped regular mesh is quite a bit smaller than a zipped PCM.
The reason is the separate lists of faces and vertices, which means that
there's less repeats of data for the zipper to work with.

Thanks you all for the replies!

Rune
--
\ Include files, tutorials, 3D images, raytracing jokes,
/ The POV Desktop Theme, and The POV-Ray Logo Contest can
\ all be found at http://rsj.mobilixnet.dk (updated January 6)
/ Also visit http://www.povrayusers.org


Post a reply to this message

From: Chris Colefax
Subject: Re: Compression
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

Goto Latest 10 Messages Next 10 Messages >>>

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