POV-Ray : Newsgroups : povray.general : Primitive finite objects turn into infinite over a certain size - bug? Server Time
4 Nov 2024 19:20:42 EST (-0500)
  Primitive finite objects turn into infinite over a certain size - bug? (Message 1 to 5 of 5)  
From: helge h
Subject: Primitive finite objects turn into infinite over a certain size - bug?
Date: 4 Jul 2008 19:50:01
Message: <web.486eb68c12970251c5bb7070@news.povray.org>
I have noticed a strange thing; a primitive object (I've only tested box, sphere
and cylinder) becomes an infinite object (in the Scene Statistics in the message
window) if it's over a certain size. For boxes it's 2715 units on a side, for
spheres it's the same number for the diameter and for a cylinder it's the same
for the diameter, but 2716 units for the height. When these objects are over
this size, the rendering time increases by a factor of about 4 to 8. I do not
have time to investigate further; does anyone know about this? (Didn't find
anything in the docs or by searching the POV site.) I have a 400 MHz G4 Mac,
Mac OS 10.3.9.

--
Scene Statistics
  Finite objects:            0
  Infinite objects:        401
  Light sources:             2
  Total:                   403
--
Scene Statistics
  Finite objects:          400
  Infinite objects:          1
  Light sources:             2
  Total:                   403
--

H


Post a reply to this message

From: helge h
Subject: Re: Primitive finite objects turn into infinite over a certain size - bug?
Date: 5 Jul 2008 12:50:00
Message: <web.486fa4b41a95014ac5bb7070@news.povray.org>
Here is my file and output; the only difference between the two sessions is the
sphere radius - 1357 units makes finite objects that render fast, 1358 units
makes infinite objects that render much slower, and also where there are no
objects.
--
1) The POV file:
--
// Persistence of Vision Ray Tracer Scene Description File
// Vers: 3.6
// Date: 2008.07.05

#version 3.6;

global_settings { assumed_gamma 1.8 }

camera {
 location  <0, 5000, -10000>
 direction 1.5 * z
 right     x * image_width/image_height
 look_at   <0, 1000, 0>
}

sky_sphere {
 pigment {
  gradient y
  color_map {
   [0.0 rgb <0.6,0.7,1.0>]
   [0.7 rgb <0.0,0.1,0.8>]
  }
 }
}

light_source {
 <-30000, 30000, -30000>
 color rgb <1, 1, 1>
}

light_source {
 <30000, 20000, -30000>
 color rgb <1, 1, 1> * 0.4
}

#local Green = texture {
 pigment { color rgb <0.6, 0.7, 0.4> }
 finish { ambient 0 diffuse 1 specular 0.1 roughness 0.5 }
}

#local Blue = texture {
 pigment { color rgb <0.0, 0.5, 1.0> }
 finish { ambient 0 diffuse 1 specular 0.1 roughness 0.5 }
}

plane { y, 0 texture { Green } }

#local theSphere = sphere { <0, 1400, 0>, 1358 } // 1357 does not make infinite
sphere

union {
 #local AZ = 25;
 #while (AZ > 0)
  #local AX = 25;
  #while (AX > 0)
   object { theSphere translate <AX * 2.0, 0, AZ * 2.0> }
   #local AX = AX - 1;
  #end
  #local AZ = AZ - 1;
 #end
 texture { Blue }
}
--
The results in the message window:
A) Start with value 1357 for sphere radius:
--
POV-Ray 3.6 for Mac OS Frontend Build 197


Persistence of Vision(tm) Ray Tracer Version 3.6.1 for G4 (Mac CodeWarrior)
This is an official version prepared by the POV-Ray Team. See the
 documentation on how to contact the authors or visit us on the
 internet at http://www.povray.org/.
POV-Ray is based on DKBTrace 2.12 by David K. Buck & Aaron A. Collins
Copyright 1991-2003 Persistence of Vision Team
Copyright 2003-2004 Persistence of Vision Raytracer Pty. Ltd.
Parsing Options
  Input file: Harddisk ... (edited) ... sphere.pov (compatible to version 3.60)
  Remove bounds........On   Split unions.........On
  Library paths:
    Harddisk:Applications:POV-Ray 3.6:include:
    Harddisk:Library:Fonts:
    Harddisk:System:Library:Fonts:
Output Options
  Image resolution 320 by 240 (rows 0 to 240, columns 0 to 320).
  Output file: sphere.pict, 24 bpp (system format)
  Graphic display.....On  (gamma:  1.8)
  Mosaic preview.......Off
  CPU usage histogram.Off
  Continued trace......Off
Tracing Options
  Quality:  9
  Bounding boxes......On  Bounding threshold: 1
  Light Buffer.........On   Vista Buffer.........On   Draw Vista Buffer....Off
  Antialiasing........Off
  Radiosity............Off
Animation Options
  Clock value....   0.000  (Animation off)
Scene Statistics
  Finite objects:          625
  Infinite objects:          1
  Light sources:             2
  Total:                   628
Preview may be significantly reducing the renderer performance for this scene.
You should consider turning (mosaic) preview off.
Render Statistics
Image Resolution 320 x 240
----------------------------------------------------------------------------
Pixels:            76800   Samples:           76800   Smpls/Pxl: 1.00
Rays:              76800   Saved:                 0   Max Level: 1/5
----------------------------------------------------------------------------
Ray->Shape Intersection          Tests       Succeeded  Percentage
----------------------------------------------------------------------------
Plane                           223343           76800     34.39
Sphere                        20199127         4031031     19.96
Bounding Box                  24984246        20303964     81.27
Light Buffer                  17462472        16939358     97.00
Vista Buffer                   8922975         8723749     97.77
----------------------------------------------------------------------------
Calls to Noise:                   0   Calls to DNoise:              10
----------------------------------------------------------------------------
Shadow Ray Tests:            232906   Succeeded:                  5724
----------------------------------------------------------------------------
Smallest Alloc:                  19 bytes
Largest  Alloc:               38416 bytes
Peak memory used:            623373 bytes

Total Scene Processing Times
  Parse Time:    0 hours  0 minutes  0 seconds (0 seconds)
  Photon Time:   0 hours  0 minutes  0 seconds (0 seconds)
  Render Time:   0 hours  0 minutes 51 seconds (51 seconds)
  Total Time:    0 hours  0 minutes 51 seconds (51 seconds)
--
B) Sphere radius = 1358:
--
Parsing Options
  Input file: Harddisk ... (edited) ... sphere.pov (compatible to version 3.60)
  Remove bounds........On   Split unions.........On
  Library paths:
    Harddisk:Applications:POV-Ray 3.6:include:
    Harddisk:Library:Fonts:
    Harddisk:System:Library:Fonts:
Output Options
  Image resolution 320 by 240 (rows 0 to 240, columns 0 to 320).
  Output file: eng.pict, 24 bpp (system format)
  Graphic display.....On  (gamma:  1.8)
  Mosaic preview.......Off
  CPU usage histogram.Off
  Continued trace......Off
Tracing Options
  Quality:  9
  Bounding boxes......On  Bounding threshold: 1
  Light Buffer.........On   Vista Buffer.........On   Draw Vista Buffer....Off
  Antialiasing........Off
  Radiosity............Off
Animation Options
  Clock value....   0.000  (Animation off)
Scene Statistics
  Finite objects:            0
  Infinite objects:        626
  Light sources:             2
  Total:                   628
Preview may be significantly reducing the renderer performance for this scene.
You should consider turning (mosaic) preview off.
Render Statistics
Image Resolution 320 x 240
----------------------------------------------------------------------------
Pixels:            76800   Samples:           76800   Smpls/Pxl: 1.00
Rays:              76800   Saved:                 0   Max Level: 1/5
----------------------------------------------------------------------------
Ray->Shape Intersection          Tests       Succeeded  Percentage
----------------------------------------------------------------------------
Plane                           223330           76800     34.39
Sphere                       139667610         4227743      3.03
Light Buffer                  91874310        91874310    100.00
Vista Buffer                  48454320        48454320    100.00
----------------------------------------------------------------------------
Calls to Noise:                   0   Calls to DNoise:              10
----------------------------------------------------------------------------
Shadow Ray Tests:            232890   Succeeded:                  5732
----------------------------------------------------------------------------
Smallest Alloc:                  19 bytes
Largest  Alloc:               38416 bytes
Peak memory used:            624401 bytes

Total Scene Processing Times
  Parse Time:    0 hours  0 minutes  0 seconds (0 seconds)
  Photon Time:   0 hours  0 minutes  0 seconds (0 seconds)
  Render Time:   0 hours  3 minutes 20 seconds (200 seconds)
  Total Time:    0 hours  3 minutes 20 seconds (200 seconds)
--


Post a reply to this message

From: Chris Cason
Subject: Re: Primitive finite objects turn into infinite over a certain size - bug?
Date: 7 Jul 2008 01:55:46
Message: <4871afe2$1@news.povray.org>
helge_h wrote:
> Here is my file and output; the only difference between the two sessions is the
> sphere radius - 1357 units makes finite objects that render fast, 1358 units
> makes infinite objects that render much slower, and also where there are no
> objects.

Thanks for the sample, I'll have a look.

-- Chris


Post a reply to this message

From: Chris Cason
Subject: Re: Primitive finite objects turn into infinite over a certain size - bug?
Date: 7 Jul 2008 07:27:00
Message: <4871fd84@news.povray.org>
helge_h wrote:
> Here is my file and output; the only difference between the two sessions is the
> sphere radius - 1357 units makes finite objects that render fast, 1358 units
> makes infinite objects that render much slower, and also where there are no
> objects.

ok, the code behind this is a test in the parser's post-processing that
sets the infinite flag on any object whose volume exceeds a pre-defined
value; in the case of 3.6 and 3.7 this value is 10,000,000,000 (10^10).
the code itself was added in 1994.

there might have been several reasons behind this; one would probably be
related to bounding slab creation. there could be others (such as the
render-time performance of slabs with objects of such large volume present).

it's hard to say how much need there is for this today - if the reasoning
was to reduce the memory use of bounding slabs, then it's probably less
important than it used to be. if it was due to the efficiency of the
bounding, then it's not so clear, as the operation of bounding slabs has
not changed significantly.

one thing that would be worth looking into is whether or not this is needed
or desirable with +bm2 bounding. I suspect it is not.

if you're willing to do an analysis on a large sample of scenes using a
version of POV that allows this above-mentioned volume test to be disabled,
and compare the results to the same scenes without it disabled, then I'll
build a special EXE.

-- Chris


Post a reply to this message

From: helge h
Subject: Re: Primitive finite objects turn into infinite over a certain size - bug?
Date: 7 Jul 2008 09:15:01
Message: <web.487216b01a95014a3ca1592f0@news.povray.org>
Chris Cason <del### [at] deletethistoopovrayorg> wrote:
> helge_h wrote:
> > Here is my file and output; the only difference between the two sessions is the
> > sphere radius - 1357 units makes finite objects that render fast, 1358 units
> > makes infinite objects that render much slower, and also where there are no
> > objects.
>
> ok, the code behind this is a test in the parser's post-processing that
> sets the infinite flag on any object whose volume exceeds a pre-defined
> value; in the case of 3.6 and 3.7 this value is 10,000,000,000 (10^10).
> the code itself was added in 1994.
>
> there might have been several reasons behind this; one would probably be
> related to bounding slab creation. there could be others (such as the
> render-time performance of slabs with objects of such large volume present).
>
> it's hard to say how much need there is for this today - if the reasoning
> was to reduce the memory use of bounding slabs, then it's probably less
> important than it used to be. if it was due to the efficiency of the
> bounding, then it's not so clear, as the operation of bounding slabs has
> not changed significantly.
>
> one thing that would be worth looking into is whether or not this is needed
> or desirable with +bm2 bounding. I suspect it is not.
>
> if you're willing to do an analysis on a large sample of scenes using a
> version of POV that allows this above-mentioned volume test to be disabled,
> and compare the results to the same scenes without it disabled, then I'll
> build a special EXE.
>
> -- Chris

Thanks a lot for your reply, nice to have an explanation, and good to know that
it will be considered in future versions of POV-Ray.

I'm sorry, I don't have the time to do any more on this.

It would be a good thing to make a note of it in the documentation, though,
since it has a significant effect on rendering times - 4 to 8 times as far as I
have seen.

H


Post a reply to this message

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