POV-Ray

The Persistence of Vision Raytracer (POV-Ray).

This is the legacy Bug Tracking System for the POV-Ray project. Bugs listed here are being migrated to our github issue tracker. Please refer to that for new reports or updates to existing ones on this system.

Attached to Project: POV-Ray
Opened by Christoph Lipka - 2013-12-20
Last edited by William F Pokorny - 2016-11-07

FS#318 - method 3 (default) scattering media is too bright & causes artifacts when nested

The following scene demonstrates how media sampling method 3 gives inaccurate results with scattering media.

The scene shows four spheres with uniform media, using (left to right) sampling methods 1, 2 and 3 with default settings, and sampling method 3 with high minimum sample count, respectively.

Note how changing the sample count significantly affects the result, despite the media being uniform.

Code analysis shows that the root cause is an underestimation of the extinction effect on the light scattered by the media, corresponding in order of magnitude to half the distance between mandatory samples (as defined by minimum sample count).

The effect also leads to visible artifacts when nesting hollow objects inside the media, as can be demonstrated by un-commenting the four smaller spheres.

#version 3.7;

camera {
  perspective angle 25
  location  <0.0 , 0.0 ,-20.0>
  right     x*image_width/image_height
  look_at   <0.0 , 0.0 , 0.0>
}

light_source {
  <0,3000,-3000> color rgb 1
}

background { color rgb 0.5 }

plane {
  <0,1,0>, -1
  texture { pigment { checker color rgb<1,1,1>*1.2 color rgb<0.25,0.15,0.1>*0 } }
}

#declare T_Transparent = texture {
  pigment { color rgbt <1,1,1,1> } finish { diffuse 1 }
}

sphere { <-3,0,0>, 1.00 
  texture { T_Transparent }
  hollow
  interior {
    media {
      scattering { 1 color rgb 2 extinction 1 }
      method 1
    }
  }
}

sphere { <-1,0,0>, 1.00 
  texture { T_Transparent }
  hollow
  interior {
    media {
      scattering { 1 color rgb 2 extinction 1 }
      method 2
    }
  }
}

sphere { <1,0,0>, 1.00 
  texture { T_Transparent }
  hollow
  interior {
    media {
      scattering { 1 color rgb 2 extinction 1 }
      method 3
    }
  }
}

sphere { <3,0,0>, 1.00 
  texture { T_Transparent }
  hollow
  interior {
    media {
      scattering { 1 color rgb 2 extinction 1 }
      method 3
      samples 100
    }
  }
}

/*
sphere { <-3,0,0>,0.8 texture { T_Transparent } hollow }
sphere { <-1,0,0>,0.8 texture { T_Transparent } hollow }
sphere { < 1,0,0>,0.8 texture { T_Transparent } hollow }
sphere { < 3,0,0>,0.8 texture { T_Transparent } hollow }
*/
Closed by  William F Pokorny
Monday, 07 November 2016, 13:08 GMT
Reason for closing:  Fixed
Additional comments about closing:  

github commit 5a081e9 was Christoph Lipka, Fri Dec 20 13:30:41 2013 +0100, message: fix < http://bugs.povray.org/task/318> and other media sampling method 3 bogosities

My testing of test scene 3.70 vs 3.71 confirms fixed.

Admin
Christoph Lipka commented on Friday, 20 December 2013, 12:44 GMT

Fixed with GitHub commit 5a081e9255596f21d7af7d475090ce718f51ce38

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing