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 - 2010-12-06
Last edited by William F Pokorny - 2017-01-21

FS#177 - Add support for conserve_energy to shadow computations

The following scene gives a comparison of current conserve_energy handling in standard shadow computations vs. photons.

Note how the rather highly reflective slabs fail to cast shadows, except where the photons target sphere enforces computation of shadow brightness to be done by the photons algorithm.

For more realistic shadowing without the need to enable photons, I suggest do add proper conserve_energy handling to the shadow computation code (which shouldn’t be too much effort).

global_settings {
  max_trace_level 10
  photons { spacing 0.003 media 10 }
}

camera {
  right x*image_width/image_height
  location  <-2,2.6,-10>
  look_at   <0,0.75,0>
}

light_source {
  <500,300,150>
  color rgb 1.3
  photons {
    refraction on
    reflection on
  }
}

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>]
    }
  }
}

plane {
  y, 0
  texture { pigment { color rgb 0.7 } }
}

#declare M_Glass=
material {
  texture {
    pigment {rgbt 1}
    finish {
      ambient 0.0
      diffuse 0
      specular 0.2 // just to give a hint where the sphere is
    }
  }
  interior { ior 1.0 }
}

#declare M_PseudoGlass=
material {
  texture {
    pigment {rgbt 1}
    finish {
      ambient 0.0
      diffuse 0.5
      specular 0.6
      roughness 0.005
      reflection { 0.3, 1.0 fresnel on }
      conserve_energy
    }
  }
  interior { ior 1.5 }
}


sphere {
  <1.1,1,-1.3>, 1
  material { M_Glass }
  photons {
    target 1.0
    refraction on
    reflection on
  }
}

// behind target object
box {
  <-0.2,0,-2.3>, <0.0,4,0.3>
  material { M_PseudoGlass }
  rotate z*1 // just to better see the reflection of the horizon
}

// before target object
box {
  <2.4,0,-2.3>, <2.6,4,-0.3>
  material { M_PseudoGlass }
  photons { pass_through }
  rotate z*1 // just to better see the reflection of the horizon
}
William F Pokorny commented on Saturday, 21 January 2017, 16:17 GMT

Now tracked on github as issue #205.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing