|
|
On Tue, 18 Feb 2003 05:58:01 EST, "idoit" <ido### [at] tiscalise> wrote:
>Could someone with intimate knowledge of the PovRay mesh data structures
>or other relevant experiences advise me if rendering speed could be
>improved by laying out the vertex vectors by iterating over the Z-axis
>values first and keeping the X-axis constan as far as possible.
It's been some years since I messed with this lets see how much I
remember. POV-Ray allocates storage for each object as it's parsed, in
the order the objects are parsed. Then all objects are traversed to
build the bounding tree. Once rendering the system has to page in as
the objects are referenced, thus locality of reference has a lot to
say in avoiding paging. If the bounding tree doesn't fit in real
storage you're in for a really long trace.
>I.E. in pseudo code change:
>for (z = 0; z < z_max; z++) for (x = 0; x < x_max; x++) { print (<x,y,z>)}
>to
>for (x = 0; x < x_max; z++) for (z = 0; z < z_max; z++) { print (<x,y,z>,)}
Should make quite a difference, but reflections and light rays will
cause objects to be referenced 'outside' the area they occupy
on-screen. With 'well-behaved' meshes you can have memory usage up to
4-8 times real memory without much paging, once the bounding tree is
built.
/Erkki
Post a reply to this message
|
|