POV-Ray : Newsgroups : povray.general : Speeding up mesh parsing? Server Time
16 Nov 2024 23:19:16 EST (-0500)
  Speeding up mesh parsing? (Message 1 to 1 of 1)  
From: Vahur Krouverk
Subject: Speeding up mesh parsing?
Date: 24 Mar 1998 11:02:49
Message: <3517D929.BBAA4D4E@fv.aetec.ee>
Hi!

I got an idea during waiting for the POV-Ray to parse my mesh files: why
not to use binary mesh files, thus speeding up parsing?
I use Rhino for modeling and some POV export files are up to 20 M (with
manual meshing etc.). Naturally this takes considerable time to parse it
in each rendering ( I'm just beginner and it takes lot of trials to get
everything correct.) Therefore if mesh files were binary, then they
would be smaller (ca. 30%) and their parsing would be much faster (read
double from file right into memory area instead of converting it from
text). Implementation of my idea would be following:
 1. Create converter .inc=.pst ([P]OV-Ray [s]mooth [t]riangle). This
would do following:
  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{ ...}
}
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?).

Is this idea feasible? Is anybody out there with enough resources and
time to try this out? I haven't peeped to POV-Ray source and it would
take considerable time to implement this by myself.
Or am I just reinventing wheel?


Post a reply to this message

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