POV-Ray : Newsgroups : povray.programming : Re: Speeding up mesh parsing? Server Time
29 Jul 2024 12:15:37 EDT (-0400)
  Re: Speeding up mesh parsing? (Message 1 to 2 of 2)  
From: Ronald L  Parker
Subject: Re: Speeding up mesh parsing?
Date: 25 Mar 1998 15:04:23
Message: <351a606b.24944728@10.0.2.33>
On Tue, 24 Mar 1998 18:02:49 +0200, Vahur Krouverk <vah### [at] fvaetecee>
wrote:

> 1. Create converter .inc=.pst ([P]OV-Ray [s]mooth [t]riangle). This
>would do following:

This step gets past my first argument, which is with the lack of a
truly standard floating-point representation.  By converting the .inc
file on the same machine on which you plan to render, the format
problem goes away.  But the conversion step will require that you
parse the mesh at least once.  That's probably still a big win for
most of us, since we rarely do only one render of a given file.

>  read (Rhino created)  .inc file. For each smooth_triangle declaration
>read triangle and export it's coordinates binary representation to .pst
>file (just 6x3x8 bytes for each triangle). All other lines export to new
>.inc file, which would look as follows:
>mesh{
>binary_mesh filename.pst
>texture{ ...}
>}

Meshes aren't just smooth triangles; they can also contain triangles.
That's not too hard to deal with.  Each triangle can have its own
texture, too, but textures are limited to untransformed, predefined
textures so you need only store the names of the textures and
reassociate them when you read the .pst file.

>2. Change POV-Ray parser to be able to read binary_mesh (my initial idea
>was to copy double from file to given memory area, but may-be it is
>possible to read mesh from file directly?).

The mesh also contains an internal bounding-box heirarchy, so being
able to read it as a big chunk would be a good thing.  The texture
thing might mess this up, however.

>Is this idea feasible? Is anybody out there with enough resources and
>time to try this out? 

I think it's feasible.  I wish I had the time to finish the POV
programming projects I'm already working on.


Post a reply to this message

From: Vahur Krouverk
Subject: Re: Speeding up mesh parsing?
Date: 26 Mar 1998 14:57:19
Message: <351AB31F.1ACAED9A@fv.aetec.ee.nospam>
Ronald L. Parker wrote:

> But the conversion step will require that you
> parse the mesh at least once.  That's probably still a big win for
> most of us, since we rarely do only one render of a given file.

This was the idea: parse mesh once!

> Meshes aren't just smooth triangles; they can also contain triangles.
> That's not too hard to deal with.

Well, Rhino exports smooth triangles and I use mostly them. But triangles are
event easier to deal with.

Couple of days ago I got my IRTC cd-rom and looked at POV-Ray v. 3.01 source.
As it appears, this should not be too hard to accomplish, so I try it by
myself. At first I try to avoid hard case (each triangle with own tex) and
try to read simple meshes with only one tex per mesh.


Post a reply to this message

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