POV-Ray : Newsgroups : povray.binaries.animations : Landscape flyover : Re: Landscape flyover Server Time
23 Jun 2024 16:09:31 EDT (-0400)
  Re: Landscape flyover  
From: Peter Hertel
Date: 21 Feb 2008 11:20:01
Message: <web.47bda43e48dc95ce5116a38d0@news.povray.org>
> there's only two plant meshes in this
> scene (one tree and one bush).

If they are exactly the same (included only once, then transformed) the number
of times you use the mesh would not matter much. But if you change the mesh by
rand() calls for every tree or bush (which it seems like to me), I think parse
time would benefit a lot.

> Cranking down the number of leaves/branches per plant made most of the
> difference, but I hit a point of diminishing returns, and reduced the
> total number of trees to squeeze out that last bit of performance.

At this resolution the mesh doesn't need to be very detailed anyway, so you
might be able crank up the number of branches but lower the quality ("sub
division") of the mesh without seeing any difference.

> So, at this point I really don't know if eliminating off-screen meshes
> is going to help. Those mesh files are getting parsed anyway, and the
> overhead associated with large numbers of trees seems to come simply
> from the sheer number of rand() calls.

Dependable on how you parse the trees, it might be difficult to do while still
keeping the same location for the trees during the whole scene. If you don't
parse all the same rand() calls in the same order for every frame, the trees
would change position/apperance. Hard to explain, but if you try to change this
in my code example you see what I mean: (Move the Tree_Location declaration into
the "Z"-loop)

#if((Z > (Camera_Location.z-10)) & (Z < (Camera_Location.z+15)))
#local Tree_Location = <-10+rand(S)*20,0,Z>;
cylinder{Tree_Location,Tree_Location+y*2,0.5 pigment {rgb y*1}}
#end

> I'll play with your idea if I have time, but probably I'll just bite the
> bullet and accept one or two extra seconds of parse time per frame. :-)

Agreed, if you can not benefit more than a few seconds, the time taking to
implement this idea would probably surpass the extra time spent rendering
anyway. :-)

> > Wow.. I think this is my first post here since 2003 or something...
>
> I hope that you'll post more in the future. :-)

We'll see ;-)

Have a nice day.

-Peter


Post a reply to this message

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