POV-Ray : Newsgroups : povray.general : Bug (or feature to design around when animating). : Re: Bug (or feature to design around when animating). Server Time
31 Jul 2024 12:22:48 EDT (-0400)
  Re: Bug (or feature to design around when animating).  
From: Alain
Date: 9 Feb 2007 22:53:44
Message: <45cd41c8@news.povray.org>
gregjohn nous apporta ses lumieres en ce 06-02-2007 12:31:
> I have experienced a problem with an extreme render slowdown and I just came
> up with a workaround.

> Consider:

> //BEGIN SOME SDL-------------------
> #switch (clock)
> #range (-2/180,8/180)
>   #include "LOGO_SCENE.pov"

>   // LOGO_SCENE.pov is three lines of text object
>   // and a proximity pattern.
>   // Very few objects and fewer variables are called

> #break

> #range (8.0001/180,28/180)
>     #include "CHARACTER_SCENE.pov"

>   // "CHARACTER_SCENE.pov" has a few objects,
>   // but boxes with layered patterned pigments,
>   // a blob object with hundreds of components and
>   // multi-layered deep object textures,
>   // and maybe a thousand variable declarations.
> #break
> // END SOME SDL----

> Now consider this rendering scheme:

> SF  EF   TIME    WHAT IS IT
> 183 192   18 s   ten frames of "LOGO_SCENE.pov"
> 193 202    4 s   ten frames of "CHARACTER_SCENE.pov"

> Comment: Neither scene takes long to render, if one renders them alone by
> themselves.

> Now consider what happens if your render session contains both (which would
> happen if you let it render overnight):

> SF  EF   TIME    WHAT IS IT
> 188 197   80 s   five frames of "LOGO_SCENE.pov", five of
> "CHARACTER_SCENE.pov"

> Comment: The character scene now takes 36X longer to render!!


> Now consider making povray thinking about all of those variables and objects
> in its first frame (Even if they don't appear on screen!!)


> //BEGIN SOME SDL-------------------
> #switch (clock)
> #range (-2/180,8/180)
>    #include "LOGO_SCENE.pov"

>    // LOGO_SCENE.pov is three lines of text object
>   // and a proximity pattern.
>   // Very few objects and fewer variables are called

>   #include "CHARACTER_SCENE.pov"
>   // HEY, I added this!

> #break

> #range (8.0001/180,28/180)
>     #include "CHARACTER_SCENE.pov"

>   // "CHARACTER_SCENE.pov" has a few objects,
>   // but boxes with layered patterned pigments,
>   // a blob object with hundreds of components and
>   // multi-layered deep object textures,
>   // and maybe a thousand variable declarations.
> #break
> // END SOME SDL----


> SF  EF
> 188 197   13 s   five frames of "MODIFIED_logo_scene", five of
> "character_scene"

> Now there is no render slowdown!



> DISCUSSION.
> It is problematic to have to do this for proper design of an animation
> sequence. Could it be that povray is deciding how much memory to allocate
> for an
> entire render session based solely on the complexity of the very first
> frame?

> I could imagine that either it's an oversight, or something impossible for
> povray to do. I at least now know to #include the most complex scene file
> in frame 1 of an animation.  Hope this note helps others.
How many objects in the first set of frames? Is it less than the bounding threshold?
If the answer the second question is YES, then there will be NO bounding at all 
for the entire animation.
A solution: add 1 or 2 dumy objects, like small sphere with no_image, no_shadow 
and no_reflection or objects placed off field: behind the camera or 
behind/inside some opaque object.
Others have been hit with that problem in animation with a growing number of 
objects: 0 to 2 objects in the first frame and eventualy 1000s in subsequent frames.

-- 
Alain
-------------------------------------------------
The tree of liberty must be refreshed from time to time with the blood of
patriots and tyrants.
Thomas Jefferson


Post a reply to this message

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