|
|
On 12/05/2015 02:23 AM, ILM wrote:
>...
>
> I edited the pov file in a text editor and removed the extra 30.000 declare
> lines. Unfortunately that did not reduce the parsing time.
>
> Furthermore I tried the following:
> - Changed the png file to a 1x1 px file. Parsing now only takes 40 seconds.
> - Changed the png file to a 1x1 px file AND removed the 30.000 declare lines.
> parsing now takes about 15 seconds.
>
> So we found the spot where we have to apply the tweaking.
>
> Something I can do by myself: Use smaller PNG file (even they are not really big
> actually).
>
> The big question is: How can we (or better said the developer) optimize the
> loading of png files. Only removing the declare line has not changed a lot.
>
>
I've not spent much time in the internals of the mesh2 object as these
are usually program generated and I just use them, but one thing which
seems odd is the finish statement being inside the texture_list ->
texture block. I'd expect code more like:
#declare Tcube=texture {
pigment { image_map { png "povincludes/cube.png" } }
finish { ambient 1 diffuse 1 reflection 0 }
}
#declare M_0=
mesh2 {
#include "povincludes/M0c27c969_b190_4ad2_9fb3_0f1f068dc56b_VV.inc"
#include "povincludes/M0c27c969_b190_4ad2_9fb3_0f1f068dc56b_NV.inc"
#include "povincludes/M0c27c969_b190_4ad2_9fb3_0f1f068dc56b_UV.inc"
texture_list { 1,
texture { Tcube }
}
#include "povincludes/M0c27c969_b190_4ad2_9fb3_0f1f068dc56b_FI.inc"
uv_mapping
}
// Then 30 thousand positioned copies of the object
object { M_0 matrix <...> }
object { M_0 matrix <...> }
object { M_0 matrix <...> }
object { M_0 matrix <...> }
....
A guess, but wondering if due the finish block being inside the texture
block of the texture list, whether povray isn't creating many internal
textures for each face/vertice of the mesh instead of referencing just one.
As for macros, there is documentation at:
http://www.povray.org/documentation/3.7.0/r3_3.html#r3_3_2_8 for a start.
Bill P.
Post a reply to this message
|
|