POV-Ray : Newsgroups : povray.beta-test : sphere sweep bounding problem Server Time
1 Nov 2024 13:22:31 EDT (-0400)
  sphere sweep bounding problem (Message 1 to 2 of 2)  
From: David Necas (Yeti)
Subject: sphere sweep bounding problem
Date: 27 Apr 2002 08:12:08
Message: <slrnacl5co.so7.yeti@monoceros.physics.muni.cz>
The sphere_sweep autobounding either works pretty poorly or not at
all.

Consider following example (a single, very small object - either a
sphere_sweep or a cone - in the center of the image) and render it
with -UR (so user boundings are not removed), and with preview, if
possible.  You'll notice the empty grey background renders pretty
slow.  By uncommenting the USE_BOUNDING line to add an explicit
bounding or by uncommenting the USE_CONE line to replace the
sphere_sweep with some object with working autobounding you make the
render about 6x faster -- namely the background.  This probably means
the sphere_sweep autobounding is broken (the object itself is so small
so that its own rendering time doesn't matter much).

  //#declare USE_CONE = 1;
  //#declare USE_BOUNDING = 1;

  light_source { <-2, 5, -2> rgb 1 }
  camera { location <-50, 0, 0> look_at <0, 0, 0> }
  background { color rgb 0.4 }

  #declare P1 = <0,-2,0>;
  #declare P2 = <0,2,0>;
  #declare R1 = 1;
  #declare R2 = 0.1;

  #ifdef (USE_CONE)
    cone {
      P1, R1, P2, R2
  #else
    sphere_sweep {
      cubic_spline
      5
      P1 R1
      (0.7*P1 + 0.3*P2) (0.7*R1 + 0.3*R2)
      (0.5*P1 + 0.5*P2) (0.5*R1 + 0.5*R2)
      (0.3*P1 + 0.7*P2) (0.3*R1 + 0.7*R2)
      P2 R2
  #end
    pigment { colour rgb <0,1,0> }
    #ifdef (USE_BOUNDING)
      bounded_by { box { <-2,-3,-2>, <2,3,2> } }
    #end
  }


Yeti


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: sphere sweep bounding problem
Date: 27 Apr 2002 10:01:35
Message: <3ccaaf3f@news.povray.org>
In article <slr### [at] monocerosphysicsmunicz> , 
yet### [at] monocerosphysicsmunicz (David Necas (Yeti)) wrote:

> The sphere_sweep autobounding either works pretty poorly or not at all.

Are you sure you had autobounding on in the first place?  If you take a look
at the render statistics you see only a minimal difference in the number of
intersection tests of the spheresweep object, so the bounding box clearly
works.  Of course, as with all complex objects, the autobounding cannot always
determine the perfect bounding box due to the complexity of certain objects.


    Thorsten


Render Statistics (autobounded)
  Image Resolution 800 x 600
----------------------------------------------------------------------------
Pixels:           480000   Samples:          480000   Smpls/Pxl: 1.00
Rays:             480000   Saved:                 0   Max Level: 1/5
----------------------------------------------------------------------------
Ray->Shape Intersection          Tests       Succeeded  Percentage
----------------------------------------------------------------------------
Sphere Sweep                      4147             412      9.93
Bounding Box                      4537            4147     91.40
Light Buffer                       297             297    100.00
Vista Buffer                    480680           31960      6.65
----------------------------------------------------------------------------
Roots tested:                  8294   eliminated:                    0
Calls to Noise:                   0   Calls to DNoise:              10
----------------------------------------------------------------------------
Shadow Ray Tests:               297   Succeeded:                     0
----------------------------------------------------------------------------


Render Statistics (your manual bounding)
  Image Resolution 800 x 600
----------------------------------------------------------------------------
Pixels:           480000   Samples:          480000   Smpls/Pxl: 1.00
Rays:             480000   Saved:                 0   Max Level: 1/5
----------------------------------------------------------------------------
Ray->Shape Intersection          Tests       Succeeded  Percentage
----------------------------------------------------------------------------
Box                               4085            4085    100.00
Sphere Sweep                      4085             412     10.09
Bounding Object                   4085            4085    100.00
Bounding Box                      4378            4085     93.31
Light Buffer                       297             297    100.00
Vista Buffer                    480677           31954      6.65
----------------------------------------------------------------------------
Roots tested:                  8170   eliminated:                    0
Calls to Noise:                   0   Calls to DNoise:              10
----------------------------------------------------------------------------
Shadow Ray Tests:               297   Succeeded:                     0
----------------------------------------------------------------------------

____________________________________________________
Thorsten Froehlich
e-mail: mac### [at] povrayorg

I am a member of the POV-Ray Team.
Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

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