POV-Ray : Newsgroups : moray.win : Feature Request:PCM Objects : Re: Feature Request:PCM Objects Server Time
28 Jul 2024 22:28:51 EDT (-0400)
  Re: Feature Request:PCM Objects  
From: Charles
Date: 1 Jan 2000 12:45:23
Message: <386E3D24.27F9F4C1@enter.net>
Karl Pelzer wrote:
> I'm not thinking about Chris Colefax Mesh Macros, it is far too complex
> to handle.
> But I think there is no difference if I have the same 2 meg object as a
> UDO file for Moray and replace it in the povray script with my 1 meg PCM
> file.
> The amount of triangles for moray is the same. I just want that moray
> can read PCM files (and of course blowing a 1 meg PCM object to a 2 meg
> internal moray object) and write povray scenes wich include the PCM
> files.
> 
> Hope you kow what I mean .?
> 

I think I understand. But here's the trouble: the PCM _files_ are 
smaller, but the mesh is not. The great thing about PCM files is 
simply that they store the triangle data on disk in the most 
efficient manner possible. But even if you don't use the deformation 
macros, POV stores the triangle data the same when when you use 
read_mesh() to load a PCM file, so if the number of triangles are 
the same, they will need the same amount of memory during render. 

Meanwhile, an UDO is not meant to be the same size as the mesh it
represents. For example, I have had UDOs which are anywhere from
1/8th to 1/20th the size of the mesh they pointed to, because an
UDO doesn't have a wireframe triangle for every triangle in the 
mesh... just enough to see the outline of the shape. So yes, if
you load the PCM into Moray, it will take very much more memory
than the UDO, and, at the same time, when it exports to POV-Ray,
there will be no savings there either.

Now, what I see happening with 3DWin (in my last post) is this:
3DWin would...
1.) Read in the PCM file
2.) Build a Moray UDO to represent it, just as it would for any
    other 3D format
3.) Create an INC file which contains a call to the PCM, the
    same as you currently invoke them in POV. In other words,
    if you have a PCM mesh called "mymesh.pcm", the INC file 
    would simply read...

#ifndef(read_mesh)
     #include "pcm.mcr"
#end
#declare MyMesh =
object {
      read_mesh("mymesh.pcm")
}

So "MyMesh" is now a declared object, which an UDO could 
reference as with any other kind of mesh. Now you would have
an UDO (so Moray doesn't have to use as much wireframe) and
a PCM (so the mesh doesn't take up as much space or take as
long to load or send over the internet or whatever). It would
be the best of both worlds.

In fact, since the INC file is so simple, you could do this
now, assuming only that you started with something 3DWin can
read. You would just convert it to UDO/INC pair, use the
mesh compressor on the INC file, and then write a replacement
INC file as above. But when all you have is the PCM file,
I think it would be helpful if 3DWin could read these directly.

Charles


Post a reply to this message

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