POV-Ray : Newsgroups : povray.general : Bug (or feature to design around when animating). : Bug (or feature to design around when animating). Server Time
31 Jul 2024 12:25:08 EDT (-0400)
  Bug (or feature to design around when animating).  
From: gregjohn
Date: 6 Feb 2007 12:35:00
Message: <web.45c8bae6605d171340d56c170@news.povray.org>
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.


Post a reply to this message

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