POV-Ray : Newsgroups : povray.beta-test : Strange speed differences between 3.6 and 3.7 with complex media : Strange speed differences between 3.6 and 3.7 with complex media Server Time
7 Jul 2024 07:17:12 EDT (-0400)
  Strange speed differences between 3.6 and 3.7 with complex media  
From: Warp
Date: 29 Aug 2009 12:46:03
Message: <4a995b4b@news.povray.org>
I was developing a scene using media, when I stumbled accross this weird
speed difference between POV-Ray 3.6 and 3.7, which seems to behave strangely.
It seems to be somehow related to having multiple medias inside the object
and defining "samples" for one of them or both. Sometimes 3.6 is faster,
sometimes 3.7, for the exact same scene. I'm not sure if this is a bug in
either version, or both, or none.

  I rendered the scene below in my linux box (Pentium4 @ 3.4GHz) using
POV-Ray 3.6 and 3.7 beta 33, at 1024x768. The transformations in the first
media are there just to make the rendering slower, to get a better
comparison (as far as I can tell, the difference is there even without
those transformations).

  Here are the timings:

Neither media has "samples" defined:
  3.6: 44 seconds, 3.7: 40 seconds.

Only the first media has "samples" defined:
  3.6: 44 seconds, 3.7: 92 seconds.

Only the second media has "samples" defined:
  3.6: 99 seconds, 3.7: 40 seconds.

Both medias have "samples" defined:
  3.6: 99 seconds, 3.7: 92 seconds.

  It seems that 3.6 and 3.7 are interpreting differently what to do when
an object has more than one media with differing "samples" settings. The
question would be whether either one is doing the right thing. If one of
the medias has been specified to need a higher amount of samples, and if
povray nevertheless renders it with a lower amount because the other media
had that lower amount, it would seem to be the wrong thing to do. From those
timings I deduce that both versions are doing the wrong thing, just in the
opposite way: One is taking the samples from the first media and the other
is taking them from the second one, regardless of whether they are different
from each other or not.

//---------------------------------------------------------------------
// 0 = no "samples", 1 = first media has "samples"
// 2= second media has "samples", 3 = both have "samples
#declare Mode = 3;

camera { location -z*5 look_at 0 angle 35 }
sphere
{ 0, 1
  hollow
  pigment { transmit 1 }
  interior
  { media
    { emission 1
      density
      { spherical density_map
        { [0 rgb 0]
          [1 rgb x]
        }
        scale 10
        warp { turbulence .1 }
        scale 1/10
        warp { turbulence .1 }
      }
      #if(Mode = 1 | Mode = 3)
        samples 50,100
      #end
    }
    media
    { emission 1
      density
      { spherical density_map
        { [0 rgb 0]
          [1 rgb y]
        }
      }
      #if(Mode > 1)
        samples 50,100
      #end
    }
  }
}
//---------------------------------------------------------------------


-- 
                                                          - Warp


Post a reply to this message

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