POV-Ray : Newsgroups : povray.beta-test : sstl: mm_per_unit, units Server Time
23 Dec 2024 19:29:22 EST (-0500)
  sstl: mm_per_unit, units (Message 1 to 7 of 7)  
From: StephenS
Subject: sstl: mm_per_unit, units
Date: 11 Apr 2009 20:10:00
Message: <web.49e1311655474e48f5d208390@news.povray.org>
I've made a simple scene based on the subsurface.pov. When I use mm_per_units
0.82, the scene takes about 4sec. When I use 0.81 the scene takes much longer,
more than 10 min, will run it longer tomorrow. Cancelling the render with the
stop icon, POV-Ray says it stoped. Exiting POV-Ray then gives a runtime error
popup window.

Run at 320 x 240
Begin code////
global_settings {
  adc_bailout       0.003
  ambient_light     rgb <1.000,1.000,1.000>
  assumed_gamma     2.200
  irid_wavelength   rgb <0.250,0.180,0.140>
  max_trace_level   5
  number_of_waves   10
  noise_generator   3
  charset           ascii
}

background { color rgb <1.000,1.000,1.000> }

// ****************************************************************************
// referenced scene items and forced visible scene items declaration begin
// ****************************************************************************

#declare Default_Red =
texture {
  pigment {
    color rgbft <1.000,0.000,0.000,0.000,0.000>
  }

}

#default{ texture{ Default_Red } }

#declare Cork =
texture {
  pigment {
    granite
    color_map {
      [0.000 rgbft <0.930,0.710,0.532,0.000,0.000>]
      [0.600 rgbft <0.980,0.810,0.600,0.000,0.000>]
      [0.600 rgbft <0.500,0.300,0.200,0.000,0.000>]
      [0.650 rgbft <0.500,0.300,0.200,0.000,0.000>]
      [0.650 rgbft <0.800,0.530,0.460,0.000,0.000>]
      [1.000 rgbft <0.850,0.750,0.350,0.000,0.000>]
    }

  }

  finish {
    ambient     rgb <0.100,0.100,0.100>
    brilliance  1.000
    crand       0.000
    diffuse     0.600
    metallic    0.000
    phong       0.000
    phong_size  40.000
    specular    0.100
    roughness   0.500
  }

  scale     <0.250,0.250,0.250>
}

#declare Camera =
camera {
  perspective
  location <-4.000,6.000,-12.000>
  up y
  right 1.333*x
  angle 33.000
  sky <0.136,0.904,0.407>
  look_at < 0.000, -0.000, 0.000 >
}  // end Camera

#declare CSG0 =
difference {
  box {  // Box0
    < -0.500000, -0.500000, -0.500000 >, < 0.500000, 0.500000, 0.500000 >
  }  // end Box0

  cone {  // Cone0
    -0.500000*y,0.375000,0.500000*y,0.520000
    translate <0.000000,0.002000,0.000000>
  }  // end Cone0

}  // end CSG0


//------- CSG0 Raw Script Begin -------
global_settings {
  mm_per_unit .81
  subsurface { samples 400, 40 }
}

#declare CSG0=object{
CSG0
texture {
  pigment { color rgb 1 }
  finish{
    specular 0.6 roughness 0.1
    // "artificial" wax parameters
    subsurface { < 1.6732, 1.2806, 0.6947>,< 0.0005, 0.0018, 0.0131> }
  }
}
}//end declare
//------- CSG0 Raw Script End ---------


// ****************************************************************************
// referenced scene items and forced visible scene items declaration end
// ****************************************************************************

light_source {  // Light_Source0
  < 0.000000, 0.000000, 0.000000 >, color rgb <1.000,1.000,1.000>
  fade_power 0.000
  fade_distance 100.000
  media_attenuation off
  media_interaction on
  translate <-10.516600,17.558300,-10.602100>
}  // end Light_Source0

light_group {  // Light_Group0
  light_source {  // Light_Source
    < 0.000000, 0.000000, 0.000000 >, color rgb <0.800,0.796,0.690>*0.800
    fade_power 0.000
    fade_distance 100.000
    media_attenuation off
    media_interaction on
  }  // end Light_Source

  object{ CSG0 }

  global_lights off
  translate <0.000,0.500,0.000>
}  // end Light_Group0

plane {  // Plane0
  y , 0
  texture{ Cork }
}  // end Plane0


camera{ Camera }

End code////


Post a reply to this message

From: StephenS
Subject: Re: sstl: mm_per_unit, units
Date: 11 Apr 2009 20:20:00
Message: <web.49e1330fc7f0d156f5d208390@news.povray.org>
"StephenS" <nomail@nomail> wrote:
..... Cancelling the render with the
> stop icon, POV-Ray says it stoped. ...
Correction: Render cancelled by user, the upper right says 'State: Stopping'

Stephen S


Post a reply to this message

From: clipka
Subject: Re: sstl: mm_per_unit, units
Date: 11 Apr 2009 20:40:01
Message: <web.49e13741c7f0d156dc1687770@news.povray.org>
"StephenS" <nomail@nomail> wrote:
> I've made a simple scene based on the subsurface.pov. When I use mm_per_units
> 0.82, the scene takes about 4sec. When I use 0.81 the scene takes much longer,

I guess this has something to do with certain distances becoming too short or
too large.


Post a reply to this message

From: MessyBlob
Subject: Re: sstl: mm_per_unit, units
Date: 11 Apr 2009 20:40:01
Message: <web.49e1374dc7f0d156addfbead0@news.povray.org>
"StephenS" <nomail@nomail> wrote:
> I've made a simple scene based on the subsurface.pov. When I use mm_per_units
> 0.82, the scene takes about 4sec. When I use 0.81 the scene takes much longer,
> more than 10 min, will run it longer tomorrow. Cancelling the render with the
> stop icon, POV-Ray says it stoped. Exiting POV-Ray then gives a runtime error
> popup window.

I've had this too, with low values of mm_per_unit.
Typical behaviour is that all the info to the Message window has been displayed,
but then that the Stop/Start icon is ghosted, and does not return to showing the
'Start' state.

Here's some guesswork:

It looks like a hanging thread, but it could also be an errant loop exit
condition, or memory mangement problem caused within the SSLT routine. I
typically only get the error either (a) when I terminate the final trace (I
don't understand that), or (b) when one of the threads hangs when pretracing
(makes me think that SSLT sampling might have a problem with some special cases
of geometry shape).


Post a reply to this message

From: StephenS
Subject: Re: sstl: mm_per_unit, units
Date: 11 Apr 2009 21:00:00
Message: <web.49e13ccec7f0d156f5d208390@news.povray.org>
"StephenS" <nomail@nomail> wrote:
> I've made a simple scene based on the subsurface.pov.
....
> CSG0
> texture {
>   pigment { color rgb 1 }
>   finish{
>     specular 0.6 roughness 0.1
>     // "artificial" wax parameters
>     subsurface { < 1.6732, 1.2806, 0.6947>,< 0.0005, 0.0018, 0.0131> }
>   }
> }
....
I didn't use an interior, useing 'interior { ior 1.45 }' works a 0.81, but can
still stall(?) at lower (and negative) values.

Stephen S


Post a reply to this message

From: clipka
Subject: Re: sstl: mm_per_unit, units
Date: 12 Apr 2009 06:50:01
Message: <web.49e1c6fac7f0d15634d4c3f10@news.povray.org>
"MessyBlob" <nomail@nomail> wrote:
> It looks like a hanging thread, but it could also be an errant loop exit
> condition, or memory mangement problem caused within the SSLT routine. I
> typically only get the error either (a) when I terminate the final trace (I
> don't understand that), or (b) when one of the threads hangs when pretracing
> (makes me think that SSLT sampling might have a problem with some special cases
> of geometry shape).

That rings a bell... it doesn't happen with "samples { whatever, 0 }", right?

It's the algorithm rolling dice to pick a point along the refracted ray into the
material using a nonlinear distribution, desperately trying to satisfy the
additional constraint that the point must be *inside* the object. Which is not
so easy if the ray travels only a very short distance (in mm) through the
object >_<.

I also guess POV's random number generator plays a role here: If it repeats the
same random numbers over and over again, the dice-rolling will finish in fixed
time as long as the smallest number generated still gives a point just inside
the object. But woe if it doesn't anymore!

I guess the solution is quite simple - re-rolling the dice is the wrong approach
anyway, as it unrealistically boosts the single-scattering contribution.
Instead, those cases call to be handled by that "zero-scattering contribution"
(straightforward unscattered refraction) I've already been thinking about.


Post a reply to this message

From: clipka
Subject: Re: sstl: mm_per_unit, units
Date: 12 Apr 2009 06:55:01
Message: <web.49e1c83dc7f0d15634d4c3f10@news.povray.org>
"StephenS" <nomail@nomail> wrote:
> I didn't use an interior, useing 'interior { ior 1.45 }' works a 0.81, but can
> still stall(?) at lower (and negative) values.

That was to be expected: As the index of refraction changes, so does the
distance inside the object, and hence the "good range" at which the random
numbers will be accepted.

Oh, and please don't turn the universe inside-out by using negative mm-per-unit
values, as the algorithm doesn't yet work with complex numbers :P


Post a reply to this message

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